Tyk Rate limits strange behavior

Good evening!

Tyk Gateway and Tyk Dashboard have the same version: v3.1.2

Requests to different apis (using jwt authorization) with the default policy enabled (each with different restrictions) use the same internal key (the hash of the key is visible when extended logging is enabled in the dashboard).

The data of this key changes depending on the current request.
When trying to send requests to two different apis in turn, they are subject to the same restrictions (one of the policies of those api).
How exactly a particular policy chooses is a mystery to me.

What could be the reason for this behavior and why the same key is used (in redis it really is the same)?

This is a very critical problem for us at the moment. :cold_face:

For better understanding (mostly because of my epic English) I recorded a video.

Files: dump, confs

Hi @ignashkins, could you try enabling rate limiting at the per-API level in the policy rather than at the global level. That should solve the partition merge issue where the previous or first policy is recognized and still being used. You can read more about partitioned policies in our documentation.

Hope this helps.

1 Like

Thank you @Olu , the problem has indeed been solved.

Awesome. Glad to be of help.