scalable meanjs on digitalocean

I’m trying to learn a deployment process that can guarantee a headackeless scaling of a meanjs application (not in the level that people do it in big companies, but also not at a hobby level).

So as long as I understood, this could be a solution to work on:
1. having mongodb on digitalocean on Ubuntu
2. having the meanjs application (all other than mongodb) in a docker

  • Sending spark-submit inside a docker container to a YARN cluster
  • Connect to remote MySQL db from docker container
  • What's the difference between the docker commands: run, build, and create
  • Error response from daemon: Get https://x.x.x.x/v1/users/: x509: certificate signed by unknown authority
  • Docker not working on Windows 10
  • Redis: ERR Rewriting config file: Permission denied when using Docker data volume
  • Then one can scale! Because mongodb could be clustered separately and docker keeps the scaling of the application easy.

    Well, I know it sounds trivial and that’s why I’m asking here: I just want to go and learn docker and want to make sure before investing time on the above assumed solution!

    Do you think this guarantee an easy scaling, say, for a simple online multiplayer game on meanjs please? Thank you.

  • use docker supervisor automatically run a script after start with a variable given in container start?
  • docker “--volumes-from” files not updating to target containers
  • How to convert a Vagrantfile to a Dockerfile
  • Docker Quickstart Terminal crash on Mac OS X
  • making sure a given docker container is running
  • pdf2htmlEX cannot open or read file
  • One Solution collect form web for “scalable meanjs on digitalocean”

    There is no off the shelf solution.

    You can use docker with swamp but for small deployment it brings additional issues of monitoring and networking.

    So here is what I did:

    1. Create a script to generate HAProxy config when you start/stop instance
    2. Have mongo in a cluster or replica or whatever. Database usually does not need to be scaled dynamically. You just have single mongo server then you scale it up and when you can’t scale it vertically anymore you scale it horizontally by creating replica set and then scale it up until you can’t then you do sharding.

    So have HAProxy as load balancer that accepts connections on port 80 and forwards to your droples oven private network.
    You can also write scripts to use DO API to create an image with your deployment and fire it up once you have more traffic either dynamically by detecting response time or cpu load or whatever other metric you have or statically.

    I hope this helps.

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