Hello,
I was recently troubleshooting high latency resposne for one of my HTTPS endpoints.
Testing leads me to the piece of code which was just doing
ngx.exit(ngx.HTTP_FORBIDDEN)
So I had just replaced it with
ngx.status = ngx.HTTP_FORBIDDEN
return
Latency has dropped significantly, from 500-600ms to 80-120ms.
So I am wondering what is the principal differences between these two behaviors?
Is there any configuration parameters which might affect performance of ngx.exit comaring to ngx.status ?
We are using latest openresty version, with lua-resty-kafka and lua-resty-redis.
Appreciate any feedback.
Thanks