I am using HA Proxy for load balancing purpose. I have two servers (S1) and (S2) getting requests from devices via HA proxy.
Number of devices is more than 2000.
Those devices sending multiple requests (download an item) to HA proxy and HA proxy forwarding those requests to S1 & S2.
The problem is if a device1 (D1) send a request to download a item (image/movie) and response takes time because of downloading the item; meanwhile device2 (D2) boots up and send the same request to download and again this request lands to server (S1 or S2) via HA Proxy and download start happening, since download still in progress, a device3 (D3) boots up and send the same request to download. Like this all devices are start sending same request to download the same content loading my servers (S1 & S2) hugely.
What i need is some how, if we can stop the same download request to get forwarded by HA Proxy to Servers (S1 or S2).
My intention to find a solution at HA Proxy level to stop sending the same requests again and again. If one request is still in progress then, all subsequent same request either queued or discared by HA Proxy.
Please help.