I'm trying to scale up my app to handle more users at any given second. What I currently have is the client -> server -> database (which lives on the server). What I would like to do is scale up by launching more instances of my nodejs server to access the same database. I want to have my database live on it's own server without anything else on it like a node server. Essentially, the workflow I'm trying to accomplish is the client (makes an API call) -> node server (makes a call to the database which lives on a different instance) -> database returns query results. How do I target the database from my node server if it lives on a different instance? I've only ever queried the databases on the same instance that the server lives on which is straight forward.
client (makes an API call) -> node server (makes a call to the database which lives on a different instance) -> database returns query results.
1.4m articles
1.4m replys
5 comments
57.0k users