RUM tests

Introduction to RUM Tests

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).

How Do Real User Monitoring (RUM) Tests Work

The Difference Between Real User Monitoring (RUM) and Synthetic Tests

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 user's internet connection (Wi-Fi, a LTE hotspot, wired connection)
  • Device (an old Android phone will load a page slower than a modern iPhone)
  • Weather conditions in the user's region

Essentially, RUM tests should be paired with synthetic tests for the most accurate results.

More Examples of Real User Monitoring (RUM) Testing

  • Latency to other servers (using embedded JS), through ping
  • Application performance (whether or not, say, an update has improved or made performance to a tool worse)
  • Issues with a page’s programming (measuring if a user has to wait, ex. 10 seconds before they see any semblance of a polished page)
  • How a user experiences and uses an application (this is typically done to improve UI/UX; positioning of certain buttons or fixing hard-to-read links)

A real RUM test

As hinted previously, there is a simple reason why RUM tests shouldn’t be an exclusive form of testing: the tests can be unreliable due to a variety of factors on a user’s device and they may not show the full reason a user experiences poor performance.

RUM tests can be very simple. Here's 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. The testing data is generated completely on a user’s device.

Conclusion

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.

Glossary

Edge Server

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 Test

Real User Monitoring tests. RUM tests collect actual user data to help determine performance.

Ping

A tool to measure latency on the 3rd layer.