Quantcast
Viewing all articles
Browse latest Browse all 4731

Load balancing HTTP requests based on unique ID

I am trying to load balance traffic amongst 2 servers which have their own separate databases. Once a file is submitted for processing, the server responds back with a unique ID. Subsequently, another request is sent to the server to check the outcome of the request referencing the unique ID that was generated earlier. With round robin and least Conn load balancing algorithms, and with no control over the client making the requests (cookie set and received in the first request is not used in the subsequent request), is there a way wherein all unique IDs and the corresponding cookies generated in the first request are saved, and based on the unique ID in the subsequent request, the appropriate cookie is inserted by the load balancer. The problem i am facing now is the first request is going to one of the servers, wherein the file is submitted for processing and unique ID returned, and the subsequent request to query the result using unique ID, is sent to the other server, which does not have any information about the unique ID as it was generated by the other server. Any help would be much appreciated.

Client file submit → haproxy → load balanced to server A → response contains unique ID and cookie

Client result query using Unique ID (without cookies) → haproxy → load balanced to server B → response contains error unique ID not found

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4731

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>