I'm in the situation where we have an application running hapi across multiple ports.Instance 1 http://localhost/Instance 2 (Reporting) http://localhost:81Instance 3 (BI) http://localhost:82Instance 4 (Uploads) http://localhost:83Instance 5 (heartbeat) http://localhost:84This was done because a long time ago in the infinite wisdom of the development team of the time who couldn't understand why the node service was hanging when certain synchronous calls were running (I'm sure you know where this is going). So rather than fix the promises and switch to asynchronous calls they just split the application into multiple services on separate ports. Some of these don't see much action until they get one large request.So we are planning on implementing some load balancing with multiple instances running on a single host. This makes the port mapping a nightmare with a single port but with 5 I believe it will quickly become unmanageable.IIS, Nginx and many other HTTP services support binding additional processes to a single port. Does anyone have any experience with this in Express or HAPI? Is it possible to have:Instance 1 http://localhost/Instance 2 http://localhost/reportingInstance 3 http://localhost/BIInstance 4 http://localhost/UploadsInstance 5 http://localhost/heartbeat
Submitted December 10, 2018 at 09:53PM by Thriven
No comments:
Post a Comment