Design approach for hosting multiple microservices on the same host [closed]

I’m working on a Web application that I decoupled it in multiple containerized microservices. I have now around 20 services, but the whole system will definitely need more than 300. Most of the services now and some in the future will not need an entire machine so I’ll deploy multiple services on a same host. I’m wondering how others deal with interservice communication. My preferred way was to go with a REST based communication but…

Isn’t it too heavy to have multiple web servers running on the same machine? I’m developing in Ruby, but even a lightweight web server like Puma can consume a good amount of memory

  • How to start Aerogear unified push server with Mysql in docker environment
  • How can I make multiple copies of a docker container WITH configuration data?
  • is it possible to run virtualbox inside a docker container
  • Add additional ip's to lo interface in docker container
  • Does 'docker run' modify image state?
  • gsub encoding error when running on Linux Docker Container Invalid byte sequence in US-ASCII
  • I started writing a custom communication channel using UNIX sockets. So, I’d start one web server and my “router” app would communicate with the currently running services on that host through UNIX sockets. But I don’t know if it’s worth the effort and on top of that, all services have to be written and customized to use this kind of communication. I believe it would be hard to use any framework like Ruby-on-Rails or others, even different languages which is the whole appeal with microservices architecture. I feel like I’m trying to reinventing the wheel.

    So, can someone suggest a better approach or vote for one of my current ones?

    I appreciate any help,


  • Passing or setting password parameter to mercurial during docker build
  • Connect to Docker Swarm for Continuous deploy
  • How to use Docker for Dev env
  • Dockerfile build using complex powershell script on windows container
  • Import Error: paho.mqtt.client not found
  • How to enable faster container rescheduling with Docker Swarm and Consul?
  • One Solution collect form web for “Design approach for hosting multiple microservices on the same host [closed]”

    Looks like you may want to look into docker swarm, they’re actively working on these use cases. I wouldn’t recommend building your own communication channel, stick with http or maybe use spdy if you’re really concerned about performance. Anything you introduce will make using these upcoming solutions more difficult. Also keep in mind you don’t need a heavy-duty web server in most cases, you can always introduce a layer above one or more of your services using nginx or haproxy for example.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.