Dockerizing a complex node server: which docker "units"?

by Merc   Last Updated January 03, 2018 04:00 AM

I need to "dockerize" a rather complex application which right now runs on a bare server. Now, at the moment, I have:

  • NginX acting as a reverse proxy, routing requests to localhost:port
  • A MongoDb server running on the same host (yes, I know, I know...)
  • A node server running on port 8081, reached via NginX

The idea is to turn this into something as modular as possible; my (novice) idea, although it might be wrong:

  • A docker container for the NginX server
  • Several docker containers for MongoDb; I guess I would have one specific one as the primary mongo instance, and several secondaries
  • Several docker containers for the node servers, each running on a different IP, possibly geographically distant

(The app unfortunately at the moment also uses Websockets, and the client list is in-process. This is something the developers will need to face and solve, and for now I will assume that it's not a problem

Did I "get it right"? Is this how you'd normally set things up? Finally, the NginX server is clearly the single most vulnerable point of failure (if it goes down, goodbye everything). How would you make it more resilient...?



Related Questions


Could not login to docker container

Updated February 22, 2018 10:00 AM

IIS 8 Reverse Proxy to Node Server

Updated April 21, 2015 21:00 PM