Reputation: 545
I have a question about how clusters and scaling are related, which I couldn't work out from the docs. The architecture page is pretty clear, but maybe I'm making some incorrect assumptions.
If I set up a cluster of, say 4 CoreOS hosts, when I git push my apps to the cluster, a docker container with my app will be deployed to each of those hosts, right? So, now I have 4 running instances of my app which will be load balanced via the deis router (nginx, right?). Or is nginx going to be load balancing within each host? What load balances to the cluster in that case?
If I scale using the deis scale command, then does that scale containers within each host?
So if I run deis scale web=4
, does that mean I now have 16 (load balanced) instances running?
If it doesn't work this way, how does it work?
With a PaaS like Heroku, the "cluster" isn't a thing, so this is the new part, to me, anyway. With Heroku, when you run heroku scale
, we get new drones running across servers but I don't have to set up where they are going to run (the cluster). So, I'm trying to wrap my head around it.
I'm a developer, dipping my toes into ops, so hopefully you can excuse me if I'm being daft.
Upvotes: 3
Views: 551
Reputation: 545
So, I think I can answer my own question now, having successfully gotten a DEIS cluster running on EC2.
To see what is running, where, run (from your Deis directory):
make status
Which is actually running fleetctl list-units
.
That shows the running services in their containers, spread across your cluster. In my instance, I have 3 hosts in my cluster.
If I deploy an app/site, using deis create
, then it will deploy 1 instance of that app, on one of my three hosts, inside a Docker container.
If I scale the app, using deis scale
, then I will have multiple containers, each running of any of the 3 hosts. They could all be on one of those hosts, or any combination.
So, if you run deis scale web=4
across a 3 host cluster, there will be 4 running instances of the app, not 12.
Upvotes: 4