How RUM tests work -- their benefits, caveats, and examples.
RUM tests are a crucial monitoring tool for performance-oriented content delivery companies. While they are not exclusive to CDNs, they are important in measuring real-world performance to/from a variety of destinations: whether it is a website’s load time, or latency to an edge node, RUM tests (or Real User Monitoring) measure application performance for both analytics and status monitoring (e.g. seeing degraded performance with users in a specific region due to, say, a fibre cut).
RUM tests are fundamentally different from synthetic tests. The latter generally requires a set of servers, owned and run by a single entity. In other words, synthetic testing can measure performance almost instantaneously, but they typically don’t represent a real-world experience (which RUM tests show).
Unfortunately, even with all the listed benefits of RUM testing, the information is received as users view a page, rather than instantaneously. Also, there are many factors that cannot be measured that can affect a RUM test: the mode of which a user has chosen to connect to the Internet (Wi-Fi, a LTE hotspot, etc), device (an old Android phone will load a page slower than a modern iPhone), and more. Essentially, RUM tests should be taken with a “grain of salt.”
As hinted previously, there is a simple reason why RUM tests shouldn’t be an exclusive form of testing: the tests can be notoriously unreliable due to a variety of factors on a user’s device:
An example of a RUM test can be something simple; here is one written in JS (with jQuery):
$(document).ready(function() {
var startTime = (new Date()).getTime();
$(".dummy").load("pageToMonitor/", function(resp, status, xhr){
if(status == "success") {
var loadTime = (new Date()).getTime() - startTime;
// Send loadTime to server and capture page speed
} else if (status == "error") {
console.log("An error occurred: " + xhr.statusText);
}
});
});
(The code above waits for a page to fully load, then sends a test request to pageToMonitor/
and forwards the result back)
Having said that, you can see pretty quickly why this testing falls apart in certain situations:
Furthermore, the testing data is generated completely on a user’s device! Simply put: while RUM tests are simple conceptually, no data can be fully trusted when analysing results.
RUM testing is an incredibly valuable tool for monitoring users’ experiences. In the case of a CDN, such as bunny.net, RUM monitoring (even when provided by 3rd party services) offers valuable insight to real world changes in network performance compared to synthetic testing servers located in a well-connected datacentre.
An Edge Server is a server used as part of a global CDN or edge network. Usually an Edge Server is just one of hundreds of servers located around the world located in a close proximity to the end user.
RUM Tests (Real User Monitoring).
Ping is a tool used to measure latency, on the 3rd layer, to either a local or remote host.