0

I'm trying to deploy an app in Jelastic that is Dockerized, and i want horizontal scalability, for that i need a load balancer and thought about nginx, but how can i deploy nginx as load balancer via docker on Jelastic?

My specific doubt is because until now when i deploy the load balancer, it ins't configured automatic, like when you deploy an app to tomcat using the Java tab from wizard GUI, i know i can configure nginx for some nodes after i set them up, the problem is, if it auto scale how it will be reconfigured?

Kennedy Oliveira
  • 2,141
  • 2
  • 20
  • 25
  • 1
    In addition to the answer bellow if you keep LB (green) layer empty then the traffic will be distributed automatically to your nodes at your CP (blue) layer by Shared Load Balancer https://docs.jelastic.com/shared-load-balancer. So no extra work/configuration is required. This approach works fine if you do not need a public IP and if traffic is not very high. – Ruslan May 24 '17 at 14:29
  • Hey @Ruslan, thanks for your comment, i know about the shared-load-balancer, but for my business there will be alot of requests, so this doesn't apply, and i need a public IP :D – Kennedy Oliveira May 25 '17 at 01:43
  • that's great, let me know if HAProxy is good enough for you or if you need nginx. Also, as the team mentioned, in the nearest releases we will remove some limitations for certified load balancing containers, so it will work with custom docker containers w/o extra configurations. – Ruslan May 25 '17 at 05:53
  • ok, found the answer on my question at the comments below :) – Ruslan May 25 '17 at 05:54

1 Answers1

1

Load balancing feature with Horizontal Auto Scaling for Docker containers is expected since Jelastic version 5.5. However, we are ready to suggest you another solution based on HAproxy load balancer. It's container with HAproxy load balancer which automatically changes own configs when application layer is scaled. Here is manifest which can be installed using Dashboard (import). Auto Scaling feature for Docker containers is described in our documentation.

Manifest import

Paste JSON manifest

enter image description here

enter image description here

Virtuozzo
  • 1,993
  • 1
  • 10
  • 13
  • thank you for the answer! This worked perfectly! In fact, my containers doesn't even use standard ports and i saw ha proxy was configured for 80 and its woking. I still have a doubt, this container is on `payara` server, it's using payara for something there or just HAproxy? – Kennedy Oliveira May 25 '17 at 01:46
  • 1
    Looking on Github i noticed that the manifest is just an add-on from other add-on basically haha, so this is really using just the HAproxy, i got my answer, thank you! – Kennedy Oliveira May 25 '17 at 01:56