We have a single server that communicates with another internal server via API calls. It takes a long time to handle the request on the API server, so we have 3 endpoints.
//Send all the information to the API to start the background process /start //Request the current status /progress //Get the final result /result We want to share the load over multiple API servers with a load balancer in front. In an ideal situation we would send a request to the load balancer (/start) and it would use round-robin to select an available server and pass back a parameter that it used server X. Then we send request to /progress and /result with parameter X to make sure it goes to the same server.
So basically we receive information back which back end server was used and we can control which server we want to use with a request.
I searched online but I can only find routing to the same back end based on IP or cookies, but that won't work because all request are from the same single client.
Is there a load balancer that can be setup like this on ubuntu?