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

Posted April 10, 2018 4.4k views
DigitalOceanScalingConfiguration ManagementClusteringDeployment

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 :)

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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

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. :)