Open metasoarous opened 2 years ago
As I know, all scaling feature is deprecated in docker-compose
for years... So I don't think there is any magic that we can scaling out by simply adding some more docker-compose
configurations.
Do it with something like Kubernetes
, or create some load-balancers, distributed database and run docker-compose
on each machine using the same set of load-balancers and distributed database with ssh
manually (or automate it with ansible
)
Hi @NewJerseyStyle; Thanks for commenting here.
As I know, all scaling feature is deprecated in docker-compose for years...
This may be true of ye old docker-compose
, but the ecosystem is a little confusing right now, because there's also now docker compose
built into docker
, and this has now been set up to support deploying to AWS or other cloud providers (IIUC, via docker swarm). So I think it may be possible now, but haven't fully explored this yet, and it's unfortunately often confusing finding out of date information on docker-compose
which doesn't necessarily apply to new features of docker compose
.
That having been said, we do have a Draft PR with a Kubernetes setup: #1399.
I think we'll likely continue to support both options for the foreseeable future, since even if docker compose
is able to auto-scale, it's much newer on the scene than Kubernetes, and I think is intentionally not as sophisticated (and so may be more appropriate in particular circumstances).
the ecosystem is a little confusing right now, because there's also now
docker compose
built intodocker
Oh... I thought docker swarm was End-Of-Life something :see_no_evil:
As far as I can tell, it's still a thing. And actually, after poking at this for a short bit, it seems like most of the answers to "how to get docker compose to autoscale" is actually to look at docker swarm
. It's still not totally clear to me how all the configuration actually fits together when using together, but that's the thread which can be pulled on here.
My sense is that docker compose
with docker swarm
will work for ~98% of the deploys out there, and have the advantage of being closer to the infrastructure being used in development. That having been said, if you're particularly keen on seeing Kubernetes support, you're welcome to help push that forward.
I always think Kubernetes is too heavy for small clusters to maintain (Myth?). I prefer docker swarm
in this case.
Thanks to @geoah, we now are able to support scaling the server (see #1352). However, it's not clear that we'll be able to support auto-scaling through the current
docker-compose
setup.If it's possible to support this via
docker-compose
with some additional configuration or documentation, that would be a great solution. There have been recent efforts by the docker team to makedocker-compose
into more of a production tool by deploying to various cloud providers coupled with docker swarm, so there may be some luck here.But it's also not unlikely that using something like kubernetes would provide more flexibility/power, and may be worth doing even if we sort out how to accomplish it just with
docker-compose
.