You can find statistical data on the Reports tab in the Control Panel.
Stats are used for invoices, traffic analysis, monitoring check-ups. For invoices, we need accuracy, for the rest — efficiency. To get both we use two methods of stats collection:
- Nginx access logs,
- Nginx virtual host traffic status module.
Nginx access logs
These are the resource logs which we collect, store, process and use for billing statistics (Billing Data on the Reports tab). Logs have a lot of data in them, and the number of log files is huge so it takes some time and computational power to process them. As a result, we have accurate data that can be used for invoices. But due to the slow processing, we can't use it for real-time statistics.
Nginx virtual host traffic status module
It is an Nginx module that allows us to get the stats for CDN resources in real time. We use this information to build CDN graphs.
For the clients to see the data with small granularity values we periodically send requests to the module and collect the responses. Then we aggregate and cache the data to deliver it to the clients more efficiently. These manipulations affect the values: they might differ from the billing data. The billing data doesn't go through additional modifications so it is considered more accurate.
Note that in your browser you see the data according to your time zone while for the billing we use the UTC time zone.