Hacker News new | ask | show | jobs
by v_ignatyev 4177 days ago
Probably you want to expose REST API to the web application. Everything you need is just set up domain for your RESTful service and setup CORS settings to access REST API from application server, no matter where web application server would be. The database should have no public IP and should be in the same network as your REST server is. If I were you, I set up for the first time everything on the same server on EC2 instance for example. Then using Docker I 'd set up accurate deployment system. Then "scale" it to three separate servers. You should keep DB on dedicated instance because of performance and because you probably will need (if so) to use master/slave replication or kind of scaling.

Don't do it on early stage. Just make it somehow working for the first time, until existing infrastructure become unstable/laggy.