Closed subi-kp closed 5 years ago
3 seconds is a big difference but I don't know what's going on in your setup. It makes sense that hapi had a smaller number since it's the deeper measure covering less processing than nginx.
hapi v13 is too old for me to help you with.
May I know, how the response time is calculated ? will it includes event queue delay time ?
Just look at the code. When the request is received a timestamp is taken, and when it is replied to, duration calculated. So yes, it includes actual time passed from start to finish, not cpu time.
Thanks for your prompted response. But in my case, we are seeing the difference in response time between proxy and application. My assumption is below for the issue.
nginx[40 sec] -->[3 sec]application[37 sec]
Application took 37 sec to process the request. Application received the request from nginx and started processing request after 3 sec - No proof for this. Is there any way we can calculate this ? Nginx/proxy recorded as 40 sec as response time with the waiting time of 3 sec instead of 37 sec.
We need to measure this delay, could you help to understand and fix this? @hueniverse
Sorry, I don't have any free time. You can try asking around Slack but honestly, you need someone to look at your code and config and figure out where the time is being spent.
Noticed application is computing/writing response time incorrectly in logs on heavy/peak load(ie: 500 request/ second). Hapi logged in the log response time as 37 seconds. And I have a nginx proxy running behind the application and where I have noticed that application took 40 seconds to process the request in nginx access logs. Also to improve application performance we are using async logging. Any idea on this?
Context node version: 6.11.5 hapi version: 13.5.3