Tyk Dashboard doesn't show rate limit exceeded only shows it as forbidden

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:09:51 +0000.
Sender:Khirod Kant Naik.
Date:Friday, 17 April 2015 07:01:11 UTC+1.

Hi Martin,

I am pleased to tell you that we are almost a step away from deploying Tyk. I came across a few glitches when I was trying to setup dashboard. I noticed that the dashboard shows the rate-limit errors as forbidden. I think dashboard should specifically show when an Error was for Rate Limit Exceeded. The optimal output for the dashboard should be like this.

But sadly I can only see forbidden errors instead of Rate-Limit Exceeded errors :expressionless:

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 17 April 2015 08:11:37 UTC+1.

Hi Khirod,

Yes I see what you mean. I believe it will be because of the error code being returned by tyk, and being misinterreted by the dashboard. I’ll look at it and see if we caan;t remedy this for 1.6.

I’m araid there won’t be much we can do until then :-/

Thanks for the heads up!

Martin

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 17 April 2015 08:36:26 UTC+1.

Checking in the code, it’s returning a 403. I’ve changed this to be HTTP Code 429 (Too many requests) for rate limiting only (Quota Exceeded is a different category, and all the iterature I can find on the subject seems to say 403 is the way to go). The dashboard actaully currently interprets 429 as a rate limit error (It will say “Rate limit or quota exceeded”, in 1.6 it will just be “rate limit exceeded”).

If you are feeling brave, you can checkout the 1.5.1 tag (GitHub - TykTechnologies/tyk at 1.5.1), and change the returned code here from 403 to 429 and recompile, if you drop the new binary into your environment it should start recording analytics appropriatly.

Cheers,
Martin

  • show quoted text -