I am trying to set up load balancing for an application that utilizes multiple ports. The application's initial connection being made on TCP port "A" and a secondary connection being made on TCP port "B".
Note - The application is not browser based.
How can I guarantee if first connection goes to Node X then the secondary connection will also send to the Node X, and not Node Y?
Here's what I want:
USER1 --> Nginx --> Node X:A
USER1 --> Nginx --> Node X:B
Here's what I don't want since it will break the app:
USER1 --> Nginx --> Node X:A
USER1 --> Nginx --> Node Y:B
Does anyone have any suggestions/recommendations on how to approach this configuration in Nginx? Remember, the application is not browser based so standard browser-centric approaches using cookies, profiles, etc., don't seem to apply - at least none that I've found.
Any assistance would be greatly appreciated.
Thanks