Best Practices for Load Balancing in Docker Swarm

0
0
Asked By TechieTurtle42 On

Hey everyone! I'm working on a project where I'm setting up a Docker Swarm cluster. I've got 3 worker nodes and 3 management nodes in mind, and everything is going smoothly so far. Now I'm trying to figure out the best way to expose my containers to the rest of the network. I read a post about deploying HAProxy and using keepalived to set up a load balancer across the nodes. This seems like a good setup because it provides quick failover in case a node becomes unavailable. I'd love to hear how you all manage load balancing in your Docker Swarm setups. Any feedback or tips would be greatly appreciated! Thanks!

5 Answers

Answered By CloudCatcher99 On

Using the ingress routing mesh and publishing service ports has worked really well for me. I also set up Kong Gateway in front of my swarm, directing traffic to each node at the published service port. It's been a solid solution!

DevDude88 -

I have a similar setup, actually.

BalancingBeast -

That sounds interesting! I've been looking into deploying a load balancer outside the cluster too.

Answered By ConfusedCoder On

I’m not quite sure I get the full picture. Isn't your plan already detailed in the post you referenced? What additional info are you looking for?

Answered By ContainerCaptain On

What specific services do you plan to expose through the swarm? That might help narrow down the best approach for your load balancing needs.

Answered By LoadBalancerGuru On

Your plan for HAProxy with keepalived sounds good! I've had success with it, and the failover speed should be impressive. If you're looking for a simpler alternative, ClawCloud Run might be worth considering. It's easy to set up, and it takes care of scaling and load balancing for you, which has saved me a lot of time.

Answered By DockerDiva On

Have you considered using Traefik? It's a useful option for load balancing, especially if you're looking for high availability with a lot of features.

TechieTurtle42 -

I'm more focused on the deployment and usage aspect right now. Any tips on how to achieve HA?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.