It is absolutely possible (and sometimes extremely useful) to run several back-end for different purposes. Nevertheless, he opens several cans of worms, depending on what rigor your system expects, who is on your team, etc.:
- State. You want session state to be shared across application servers. The easiest way to do this is to save the external state of the session within the framework of agnostic. I would suggest JSON objects in a key / value store, and you are likely to benefit from a JSON scheme.
- Domains / routing. You need your login cookie to be accessible for both application servers, which means either a single domain routed by Apache / Nginx or separate subdomains routed through DNS. I would suggest separate subdomains for the following reason.
- WebSockets I may be out of date, but as far as I know, neither Apache nor Nginx support website proxying, which means that if you want to use this, you will sacrifice the flexibility of using the http server as a proxy application and instead expose Node directly through the subdomain.
- Not specified requirements. Functions such as monitoring, logging, error reporting, system builds, testing, continuous integration / deployment, documentation, etc. Must be expanded to support a new type of component.
- Skills. You will have to pay on time or money for the skill sets needed to manage a more complex application architecture.
So, my advice would be to think carefully if you need it. It can be a lot of time and thought.
Update . In fact, there are companies specializing in adding real-time existing sites. I will not give any names, but if you are looking for βreal-timeβ in the market for platform hosting applications (such as Heroku), you will find them.
Update 2 : Nginx now supports website support
Richard Marr
source share