Closed petermorlion closed 7 years ago
This response time varies mainly depending on the network connection between your location and the 3scale data center running on AWS-East. The actual authorization service itself is very fast.
You are correct that it would be good to cache the auth responses. This is a reason that many customers choose to go with the APIcast Gateway because we integrate an eventual consistency cache by default.
At the end of the day the choice is yours.
Great, thanks for the quick reply. I will look into these options.
I'm working on a NodeJS application that calls 3scale to see if the calling client is authorized to call our endpoint. This is a simple as calling the
client.authorize
function. However, I've measured it, and it takes about 300-400 ms. Only then can my code continue. We're very focussed on performance now and business wants to achieve speeds of 300-500 ms. As you can see, this leaves little room for our application logic.This is how I measured it:
We also report endpoint usage (via the separate function, not yet via
authrep
), and those calls are significantly faster (12ms for example).Is the 300-400 ms for authorizing something expected? Or could I be doing something wrong?
If it's something expected, do you see workarounds to increase performance? One option would be to cache the authorization responses, so we don't need to request it every time the endpoint is called.