Linux 按URL参数设置的Haproxy速率限制

Linux 按URL参数设置的Haproxy速率限制,linux,load-balancing,haproxy,rate-limiting,Linux,Load Balancing,Haproxy,Rate Limiting,我们有一个haproxy,需要通过URL参数(token\key)对每秒对API的请求进行速率限制。 现在,我们已经从文档中测试了一个配置: frontend website bind *:443 ssl crt /etc/ssl/private/crt.pem stick-table type string size 100k expire 1s store http_req_rate(1s) acl exceeds_limit_key url_param(key)

我们有一个haproxy,需要通过URL参数(token\key)对每秒对API的请求进行速率限制。
现在,我们已经从文档中测试了一个配置:

frontend website
    bind *:443 ssl crt /etc/ssl/private/crt.pem

    stick-table type string size 100k expire 1s store http_req_rate(1s)

    acl exceeds_limit_key url_param(key),table_http_req_rate() gt 1000
    acl exceeds_limit url_param(token),table_http_req_rate() gt 1000

    http-request track-sc0 url_param(key) unless exceeds_limit_key
    http-request track-sc0 url_param(token) unless exceeds_limit

    http-request deny deny_status 429 if exceeds_limit_key or exceeds_limit
    default_backend servers
但我们需要更改每个令牌的限制,目前我们正在尝试使用此配置的
rates.map

frontend website
    bind *:443 ssl crt /etc/ssl/private/crt.pem

    stick-table type string size 100k expire 1s store http_req_rate(1s)

    http-request track-sc0 base32+src

    http-request set-var(req.rate_limit)  url_param,map_beg(/etc/haproxy/rates.map,500)

    http-request set-var(req.request_rate)  base32+src,table_http_req_rate()

    acl rate_abuse var(req.rate_limit),sub(req.request_rate) lt 0  
    
    http-request deny deny_status 429 if rate_abuse
    
    default_backend servers
和费率。地图:

#token
DB6sa5rdASVDGhasd67rdasd        100
但是在这种配置中,我们总是有默认限制
url\u参数,map\u beg(/etc/haproxy/rates.map,500)

对于
rates.map
文件中的我的意见问题。问题是,
url\u param
rates.map
文件应该是什么形式