How to scale horizontally with Swarm #186
-
Hey all,
I'm using The endpoint I use on ApacheBench is a simple
and the AB command:
Relevant ENV variables:
Using Hetzner, which describe vps as: Results 1:
Results 2:
I did plenty of tests this past days, and I know results will be surprising, but I want a good baseline. Results 3
I have deploy scripts and ansible in place, so any tests you would like to see, just let me know, and I will setup the thing and run it. I'm right about these results, they don't make sense do they?? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
I went read again https://serversideup.net/open-source/docker-php/docs/reference/environment-variable-specification Should I have
After changing to this, I get from running
So it seems there's even less than before?? |
Beta Was this translation helpful? Give feedback.
-
Thanks for opening this on GitHub Discussions! As for any set up like this, it gets complicated 🤪 In order to fully diagnose the issue, unfortunately you might have to draw more things out and post your configurations to make this repeatable. Instead of going through the effort of that -- here's a few things you might want to research. The VPS servers may be differentAlthough you buy the same package from the same host, your performance may vary server to server. This may be due to other tenants on the same box as you. I've even seen totally different processors deployed within the same package. Ensure your servers are in the same datacenterYou want the servers to be as close as possible. Even two servers sitting next to each other will have increased latency compared to a single box. Consider using
|
Beta Was this translation helpful? Give feedback.
-
They are in the same datacenter. I made everything as similar as possible. But I think we both agree that 1xSERVER cannot be more performant than 4xSERVER Swarm, right? even if shared etc etc... I'm not worried at this point to save resources and bring costs down. Just want to have control over the process, then I can fine tune. ALso, just noticed this, you say |
Beta Was this translation helpful? Give feedback.
-
Hey now we're getting somewhere!!
I put |
Beta Was this translation helpful? Give feedback.
-
So now I figure we're OK with the containers, and Swarm networking is the new bottleneck, that will be solved by Traefik, right?? At least that's what I think.. I'll let you know, also let me know if I'm thinking something wrong The docs need update, right?? Would you accept PR? |
Beta Was this translation helpful? Give feedback.
Hey @jaydrogers
It turns out, it's a multitude of stuff. SwarmMode is supposed to do round-robin to a service (layer 3 - IP address). With Traefik we can do that at host name (layer 4) - all good here.
Thing is, after I monitor CPU, and instant network throughput (bmon), I then realized the networking between swarm nodes wasn't fully functioning, not even inside the private network.
In a gist, it depends on the cloud provider we're using.
Regarding this image, and what could be changed, I suggested a change to the docs, because I overlooked or needed to check the official docs.
It would be nice to know there's the
static
option also, without having to go into the official docs. That was it.