Open timurb opened 9 years ago
While it's possible to sum up total time of requests (so you can divide, and get average). Before you can get useful value you should answer the following questions:
GET /health_check
and very slow such as POST /admin/whatever/save
)Another thing to consider is Websockets. I believe many users use zerogw specifically for websockets. Zerogw processes websocket messages as publish-subscribe. While many applications do emulate request-reply on top of pub-sub, zerogw doesn't know anything about requests, so can't account that.
At the end of the day, we usually account request latency either at the backend, where we can differentiate multiple types of requests, and so have summary of backend performance on different routes. Or client side, i.e. in javascript, to see end-user performance, so we can adjust network latency issues.
Zerogw's attribution to latency very small unless it uses ~100% CPU (which is at point of about 30-100 thousands requests per second depending on CPU) or machine's load-average is too high. In that case just run many instances of zerogw.
It would be nice if there was a stats counter for some kind of response time, for example, average response time since the last time stats were taken.