I am using HAProxy as a load balancer & i have a lua script which returns the backend name to haproxy.cfg. Wanted to implement rate limiting for my application.
I know that we can use sticky tables (as below) in haproxy.cfg to achieve rate limiting.
stick-table type ip size 1m expire 60s store http_req_cnt
acl exceeds_limit hdr_ip(x-forwarded-for,-1),table_http_req_cnt(incoming) ge 10
http-request tarpit if exceeds_limit
http-request track-sc0 hdr_ip(x-forwarded-for,-1)
Wanted to implement the same using lua. Is it possible to access that sticky table using lua.
Thanks in advance.