apache / apisix

The Cloud-Native API Gateway
https://apisix.apache.org/blog/
Apache License 2.0
13.98k stars 2.45k forks source link

help request: rate limit all requests per route with `limit-conn` and `limit-req` #11335

Open aixi opened 1 month ago

aixi commented 1 month ago

Description

I have multiple user using the same route,I want rate limit apply to all request to the same route, not split by key (consumer remote_addr)

Environment

kayx23 commented 1 month ago

Try setting key_type to constant and using a constant value in key.

aixi commented 1 month ago

Try setting key_type to constant and using a constant value in key.

I think key_type == constant only works in limit-count,not limit-conn,limit-req, but limit-count is fix window and limit-req is leaky bucket, so to me it's not ideal