2

I have several stateless app servers packed into Docker containers. I have a lot of load on top of them and I want to horizontally scale this setup. My setup doesn't include load balancer nodes.

What I've done is simply increased nodes count — so far so good. From my understanding Jelastic have some internal load balancer which decides to which node it should pass incoming request, e.g.: user -> jelastic.my-provider.com -> one of 10 of app nodes created.

But I've noticed that lot of my nodes (especially last ones) are not receiving any requests, and just idling, while first nodes receive lion share of incoming requests (I have lot of them!). This looks strange for me, because I thought that internal load balancer doing some king of round-robin distribution.

How to setup round-robin balancing properly? I came to the conclusion that I have to create another environment with nginx/haproxy and manually add all my 10 nodes to list of downstream servers.

Edit: I've setup separate HAProxy instance and manually added all my nodes to haproxy.cfg and it worked like a charm. But the question is still open since I want to achieve automatic/by schedule horizontal scaling.

Edit2: I use Jelastic v5.3 Cerebro. I use custom Docker images (btw, I have something like ~20 envs which all about of custom images except of databases).

My topology for this specific case is pretty simple — single Docker environment with app server configured and scaled to 10 nodes. I don't use public IP.

Edit3: I don't need sticky sessions at all. All my requests came from another service deployed to jelastic (1 node).

Vova Rozhkov
  • 1,582
  • 2
  • 19
  • 27
  • What is the version of the platform you use? Can you also describe the topology? Do you use custom docker containers or Jelastic certified? – Ruslan Jun 21 '18 at 10:03
  • @Ruslan: added details to question. – Vova Rozhkov Jun 21 '18 at 10:46
  • Vladimir, is the sticky session the real problem for you? or the problem is that some nodes do not receive requests at all even if you send them from different browsers/computers? It is important to know. – Ruslan Jun 21 '18 at 14:53
  • Added details about sticky sessions. Not sure about second question, didn't tried it. – Vova Rozhkov Jun 21 '18 at 18:35
  • Ok, then why do you use session cookie if sticky sessions are not needed? As I understand you control the client from which requests are coming. Just do not use (or disable) storing of the session cookie on the client side. – Ruslan Jun 22 '18 at 07:46
  • I'm not sure is my client uses cookies but perhaps yes. So the answer for the initial question will be "by default Jelastic internal load balancer uses sticky sessions so if your request are coming from the same client and this client accepts/sends cookies then all your future requests will be forwarded to the same node". The interesting thing here is that probably requests will be forwarded to the same node even the node is dead (that was the reason of question) – Vova Rozhkov Jun 22 '18 at 11:51
  • Do you have a live env with this issue where our team can check why it does not forward requests when the node is dead? – Ruslan Jun 23 '18 at 13:01

0 Answers0