CDN Pro collects CPU usage based on NGINX’s “event-driven, non-blocking” architecture. Every request to CDN Pro is put to sleep when waiting for I/O activities, awakened when some data is ready to be processed, and then put to sleep again when the processing is completed. This can occur many times during the lifecycle of a request. CDN Pro uses the function clock_gettime() on Linux to obtain the amount of CPU time, in nanoseconds, spent on each active interval of each request and accumulated along the way. At the end of the request’s lifecycle, we collect the total consumed CPU time for the request, just like how we treat the bytes transferred.