Getting too many requests error (429) error in tyk, even the requests are lower than the rate limit

Hi

We are having a tyk instance with a custom middle-ware implementation for rate limiting.
rate limit is set with 200 tps but APIs are failing even on 20-25 tps (hits in logs/pump csvs).

following are the fields that are being set in custom middle-ware and then sent back in header:
object.Session.Rate
object.Session.Allowance
object.Session.Per

tyk version: v2.5.1

Can that be a rate limiting issue or logs (hits in logs/pump csvs) can also be misleading.

Thanks!

Hi,

Thanks for posting your question in our community. Can you please provide your API Definition as well as your custom middleware?