Can docker-compose services/containers span multiple droplets? (In DO, of course)

April 10, 2018 2.5k views
DigitalOcean Scaling Configuration Management Clustering Deployment

I’m fine with installing/using docker/docker-compose on a single host (a la my current dev environment). In DO’s IaaS, though, can I achieve something like Kubernetes, where my compose services would run in their own (independently scalable) droplets with networking between them?

Use case: my app has 8 services that have very different demands and usage trends. My ETL extractor will fetch every hour, with a huge spike in network activity and subsequent Translate/Load.

  1. It would stink if that activity interfered with my React/Express client service(s).
  2. It would equally stink if I had to keep my whole Droplet scaled to mitigate that load.

^— granular scaling is pretty important there :)

2 Answers

I found this - in my Medium bookmarks of all places lol.
“A Kubernetes quick start for people who know just enough about Docker to get by” @adnanrahic https://blog.sourcerer.io/a-kubernetes-quick-start-for-people-who-know-just-enough-about-docker-to-get-by-71c5933b4633

Looks like the Kubernetes examples are ON digitalocean, so I have to say it’ll work.

Sorry, this answer is waaaaaaaaaay overdue. But, yes. You can connect multiple Droplets in a cluster either with Kubernetes or Docker Swarm. I’ve tried both. However, you need to make sure you have a private network between the droplets. Or, use the managed Kubernetes service DigitalOcean is offering. :)

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!