Something very similar can be achieved in HAProxy using a powerful feature called stick tables. [1] [2] [3]
[1] https://www.haproxy.com/blog/introduction-to-haproxy-stick-t...
[2] https://www.haproxy.com/blog/bot-protection-with-haproxy/
[3] https://www.haproxy.com/blog/using-haproxy-as-an-api-gateway...