Yeah you can use nginx, varnish, haproxy or similar to perform
balancing between nodes,
with no code changes at all to your application, assuming the app is
built without in-memory
requirements, for say sessions etc. Otherwise the only thing you need
is the ability to bind
to a different port, such as:
$ node app --port 3000
$ node app --port 3001
$ node app --port 3002
$ node app --port 3003
etc and then load balance to those nodes
On Oct 16, 11:30 am, chirag jain <
cj.dev.d...@gmail.com> wrote:
> I completed my expressjs app. I wondering how would i scale my app to
> multiple servers with X cores.
>
> I did some research before posting. Closest i could get was to use nginx as
> load balancer on top of N expressjs app.
> I'm not sure how would i configure this nginx load balancer with N
> expressjs app instances on multiple servers. How much code changes will be
> required?
> Anyone with multiple expressjs deployment in production can share their
> thoughts and architecture.
>
> Best regards,
> Chirag Jain