Test the speed of an application
Measure how fast an application answers from Azion with real-user data from Edge Pulse and the request metrics of Real-Time Metrics.
You can measure the speed of an application on Azion from two sides. Edge Pulse collects what real users’ browsers see, and Real-Time Metrics charts what Azion served for every request. To compare a page before and after the move to Azion, refer to the last section.
Prerequisites
- An application served by a workload on Azion. To set them up, refer to Migrate an application to Azion or First deploy.
- Access to the HTML of the pages you want to monitor, to add the Edge Pulse tag.
Measure what real users see with Edge Pulse
Edge Pulse is Real User Monitoring. A JavaScript tag in your pages collects navigation, availability, latency, and bandwidth data from real visitors’ browsers. Each browser tests three addresses of Azion’s infrastructure at a time, once every 30 minutes. The collection does not burden the visitor. To add the tag:
Access Azion Console > Edge Pulse.
Select Copy to Clipboard on the tag you need. The Default Tag runs after the page loads. The Pre-loading Tag is for pages whose Content Security Policy blocks inline JavaScript.
Paste it in the HTML of each page, before the closing body tag.
The browsers of your visitors start sending measurements, and you read the collected data with the GraphQL API that Real-Time Events serves. For how to send a first query, refer to GraphQL API first steps.
Read the request metrics in Real-Time Metrics
Real-Time Metrics charts every request Azion served, in near real time. For speed, the useful number is how much of the traffic the cache answered without waiting for your origin. To open the charts:
Access Azion Console > Real-Time Metrics.
In the Data Transferred subtab, compare Saved Data with Missed Data. The first is what the cache answered. The second is what reached your origin.
Use the time filters to compare the window before a change with the window after it.
A larger share of saved data after a change means fewer requests waited for your origin.
Compare a page before and after the move
Before you point the domain to Azion, your own computer can reach the application through the hosts file. Everyone else still reaches the current provider, so you get the same page from both places. To compare:
- Load the page from the current provider and note the load time your browser’s developer tools report.
- Stage the application through the
hostsfile. For the steps, refer to Test an application through the hosts file. - Load the same page twice in a private browser window and keep the second time. The first load fills the cache. The second is what visitors get.
The difference between the two times is what Azion adds for that page. Repeat it with the pages your users open most.