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!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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?
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.