API Endpoints 9x slower when using anything other than "Open" Authentication mode. Is this normal?

I was wondering if it was working as intended for Authentication to add that much overhead to the response times. For example this is what I was testing.

Authentication Mode Open:
Api endpoint 1 response time = ~ 8-15ms

Authentication Mode Basic Auth:
Api endpoint 1 response time = ~ 93-115ms

Am I doing something wrong or is this normal? Thanks for the help.

Different auth middleware have different response time impacts - the BA middleware is pretty old, so it might not be hugely efficient - basic auth has b64 decoding which is slow.

Also, with auth there’s also the rate limiting and quota middleware that is added automatically unless explicitly disabled.

You can see the benchmarks we have here: https://tyk.io/tyk-api-gateway-benchmarks/
Can you provide some info on the type of server you are using and what kind of use case you have in place?

It could be something to do with your setup - I didn’t use BA, but used standard token auth, and the differences in latency are negligible in this (highy scientific :wink:) comparison:

Open

222
132
152
268

Token:

223
192
152
210