Hello all, hope you’re well.
Here is my context:
I have a Lua script that registers an action on http_req, and make a HTTP call to a third party on each incoming request.
This works fine.
The issue is that the third-party host I’m reaching has multiple IPs defined in the DNS record, and I need to distribute the load of incoming requests to all those IP.
If I don’t, the load will is too large for one single LB of the third-party.
By default, as the DNS is resolved only once at startup, and the connections are kept open, my instance of haproxy sticks to one single IP, and overloads it, resulting in timeouts to get a response.
How can I properly load-balance between differents IP ?
I tried to use socket.dns.toip("third-party-host.com") to get a different IP to use, but this generates a certificate issue (using https) - that can not be disabled with the current httpclient implementation.
I’ve tried multiple things, but the basic problem is how to properly use multiple A records for the same FQDN in Lua Http client ?
All ideas are welcome !
Thanks a lot !
1 post - 1 participant