Vas*_*nth 5 lua haproxy internal-load-balancer
我使用 HAProxy 作为负载平衡器,并且我有一个 lua 脚本,它将后端名称返回到 haproxy.cfg。想为我的应用程序实施速率限制。
我知道我们可以在 haproxy.cfg 中使用粘性表(如下)来实现速率限制。
Stick-table type ip size 1m expire 60s store http_req_cnt
acl 超出限制 hdr_ip(x-forwarded-for,-1),table_http_req_cnt(incoming) ge 10
http-request tarpit 如果超出限制
http-request track-sc0 hdr_ip(x-forwarded-for,-1)
想使用 lua 实现相同的功能。是否可以使用 lua 访问该粘性表。
提前致谢。