0

I haven't found an solution so far, so I'm asking here:

This is the situation I'm locking an solution for:

We are planing an architecture that contains the following components

  1. Docker Container (auto load balancing as load requires it) Application Server that Handles incoming Data (import, backend storage, web api)
  2. Queue Server
  3. Docker Container (auto load balancing as load requires it) Application that Processes each item on the queue and stores it to an elastic search server and MySQL Database (ES is used for queries and output to customers)
  4. Docker Container (auto load balancing as load requires it) Application that Handles outgoing data collection

I have almost everything completely setup. The only thing I don't have an solution for is the Load Balancing to the Frontend (Frontend Nginx Server). I only require this for the Communication to 1 and from 4. Their Count can vary so Nginx should be capable to know how many containers exist. Session Handling is working (Redis Backend) (Tested with Load Balancing on 8 App Servers and an Stress test Tool.). But I don't have an clue on how to handle the communication between the Varying number of app servers and Nginx. If any one could give me an clue how to configure this. Any clue on solving this is appreciated.

Chris

  • Are you self hosting or placing it on Amazon or other provider? The best solution varies depending on your answer. – Matt Nov 12 '18 at 3:15
  • Actually it will be deployed on three bare dock hosts – Chris West Nov 21 '18 at 16:12
  • The nginx servers are placed on two nginx Server with an fail over up address – Chris West Nov 21 '18 at 16:13
  • Docker swarm provides this I believe. Although I haven't yet tried using it. In the past I would have used registrator + etcd + nginx servers providing HA to the IP with vrrp. But swarm mode appears to simplify everything. Worth looking at. – Matt Nov 22 '18 at 8:10
0

opensvc provides a solution for that https://docs.opensvc.com/latest/agent.configure.gobtw.html

there is a screencasted demo of such a cluster on the homepage

Why I suggest this solution :

  • opensvc cluster can be configured to have a private cluster wide DNS management solution. Based on PowerDNS, the cluster maintains DNS records of all opensvc services deployed in the cluster. As soon as a new docker container is spawned, a new SRV record appear in the DNS map.

  • in such a setup, you also have to deploy cni+weave to have the private stretched network ipam working cluster wide, in order to provides private ip address to new containers.

  • opensvc complete the picture with the deployment of an ingress gateway. On one side it holds the public IP address, where application end users connects to, and on the other side, it maintains the list of all docker containers actually serving the application.

  • All this stuff is made dynamic by adding an opensvc janitoring docker container, which listen to cluster events (like "new container spawned"), and auto configure the ingress gateway to add one more docker container in the backend.

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review – Patrick Mevzek Nov 9 '18 at 23:03
  • @PatrickMevzek answer updated with more details. – Chaoxiang N Nov 11 '18 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.