How to host Node.js Auth service, Match service, Chat service with MongoDB, Neo4j, PostgreSQL, Redis, RabbitMQ?

So I have

Nginx in front

4 Node.js apps where

API Gateway -> services Auth service -> MongoDB Match service -> Neo4j Chat service -> PostgreSQL

Redis pubsub for the server-client connection, mostly for chat and match websockets RabbitMQ message queue to communicate between services

How do you recommend I host this cheaply with room to scale if needed?

Any advice? I know there isn’t a best answer, but any guidance would be highly appreciated!


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

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.

I would recommend setting this up with 5 small droplets as this will provide you more options when it comes time to scale up. Your RabbitMQ can communicate between services over the private network so it’s communications wouldn’t count towards your bandwidth limits.

Starting out with the services and their associated DB on the same server will provide a less expensive deployment and once you begin to really scale you can set up dedicated DB servers to reduce the load on your app droplets.

We’re planning on using a similar structure to you. Be great to understand your thought process behind this structure.

You mention you have an NGINX in front, I presume this is acting as the API gateway which then points to the differing services? Or is this load balancing with a different Node server as the API Gateway?

In terms of chat vs auth services, would it not be better to swap round the types of databases? I would have thought a nosql like MongoDB would be better suited to chat/social media and similarly with Postgres for the Auth service?