In partnership with
When our engineering team creates a web application, it’s crucial that we can track its performance.
Using various metrics like page speed, throughput, and error rate, we can gain a critical understanding of its accessibility and the general user experience.
RUM is a form of passive monitoring of a user’s interactions with an application, tracking the events happening in the app and measuring performance. This is usually achieved by embedding small pieces of code that act as virtual gauges and recorders into the application’s code. Almost every action made by a user, such as clicking a button, navigating to a particular page, or submitting a form, is then captured, together with information about the user's environment, device, and network activity. All of this collected data is continuously delivered to a remote server to be analyzed and visualized, bringing useful insights to the development and management teams.
In this article, I’m going to introduce the RUM model, explaining how it differs from other monitoring systems, and how you can use it to build better, more cost-effective software.
RUM vs. Synthetic monitoring
Synthetic monitoring (STM), which is probably more known and widespread among developers, is another great approach for evaluating an application’s performance and stability. The key difference with synthetic monitoring is that all the tracked activities on a website are simulated and performed by a computer acting in accordance with a predefined scenario in a predefined controlled environment. This makes STM good for benchmarking and testing a website and helps to quickly detect performance issues before customers get the product. For example, if synthetic monitoring is a part of your CI/CD process, you can use its results as one of the acceptance criteria for releasing new versions of your website or application.
On the other hand, RUM is the only way to understand a real end user’s experience and behavior, which is often unpredictable and different from the expected one.
Google Analytics: not a RUM
Although Google Analytics (GA) has a lot in common with RUM and can also bring some performance insights, it is much more focused on SEO and marketing and is more helpful in achieving corresponding benchmarks.
GA helps you identify which pages are performing more or less, how users navigate across the application, and other things related to user engagement. But GA can’t do what a proper real user monitoring tool does: provide detailed and real-time information that’s rich with performance data, helping to answer why a particular user (or group of users) experienced an issue and the reason behind it.
Common RUM features
In order to provide a service that is as effective and informative as possible, RUM implementations may include a bunch of various mechanisms to collect, aggregate, and process data. However, there are a few key features usually present in a good RUM tool or service:
- Sessionization: You have to be able to group collected data by a particular user visit and particular time frame. This makes it possible to reproduce all the actions performed by that user in the same order to understand how they interacted with the application and which events occurred, as well as to measure the performance in that particular case.
To achieve this, sessionization, also known as a bucketing approach, lets you assign a temporary unique identifier to a given user; every single piece of data regarding that user sent to the RUM server is then marked with that identifier.
- Browser tracing & data capture:
Traditionally, RUM collects various event data and site measurements via related code (executed in the background) that instruments some global objects and methods like “fetch” with additional functionality. This enables RUM to track all browser events emitted on the page: clicks, navigation, storage, etc. Various WEB APIs available in the browser are also used to log as much information as possible.
An even more advanced way of collecting data is browser tracing, which allows a RUM tool to track and capture literally any kind of user activity. This method utilizes current tracing capabilities and APIs available in modern browsers together with the tracking of network activity; combined with a special server-side code, it is then possible to correlate frontend and backend activities – like sessionization, described above, but for the whole client-server chain!
Browser tracing essentially makes the client-side application a part of distributed tracing, allowing you to track what is going on at every single step: from a button-click by the user to a cloud database query.
- Problem detection & alerting:
When talking about RUM as a service, we usually mean a platform with corresponding capabilities, real-time updates, and pretty visualizations. However, it’s obvious that nobody can monitor a dashboard 24/7, so it is almost impossible to detect a negative trend in some metrics immediately. That is why a solid RUM tool should have problem-detection mechanisms implemented under the hood and why it is essential for such a tool to send a notification as soon as any abnormal activity is detected, this way, developers can react quickly and resolve an issue effectively.
Services offering RUM
Unfortunately, there are not many services available on the market that have all or almost all of the features and requirements listed above. Besides Epsagon, which offers browser tracing that can handle the monitoring of an entire client-server flow, there are a handful of other platforms that provide good functionality.
AppDynamics is another solution that offers real user monitoring. It supports both browser and mobile RUM, allowing you to see how your application is performing on users’ devices. There is a two-week free plan for evaluating the product and its possible benefits for your business. Other services include Datadog and New Relic.
The benefits of using RUM
There are many ways to leverage the data that you’ve collected from your end users. Now that you have a ‘helicopter view’ of how your software product is performing, here are a few key ways you can use it to your advantage:
- Improve the quality of your product:
Even if you have a mature and experienced team of QA engineers running regression testing before each release and writing end-to-end and integration tests to make sure everything is stable, there is still room for unpredictable issues to appear. The overwhelming majority of users never report performance issues or bugs they come across in an app, so detecting such hidden problems can be literally impossible.
But with a proper RUM implementation, the chance of revealing these is dramatically increased, allowing developers and marketing teams to evaluate how critical the issue is and assigning it a corresponding priority.
- Optimize costs:
Although RUM is more about client-side monitoring, it can also indirectly help you to reduce your infrastructure costs. Detecting slow pages or poor-performance features potentially will encourage developers to focus on the corresponding server-side code of those features and implement performance improvements.
Whether you have a serverless or traditional architecture, such performance improvements will reduce the execution time and load on your backend – and hence your monthly bill.
- Test a new feature or change an existing one:
Because of its extremely detailed reports, RUM is a great way to evaluate the success of a new feature (or change made in the existing one) from both a technical and marketing perspective. Combine RUM with A/B testing, and you will get an exceptional instrument for analyzing the results of innovations made in your application and choosing optimal variants for better performance and user experience.
Implementing any kind of monitoring is never superfluous. Modern RUM services are relatively easy to set up, usually requiring very minor changes to your application source code, which means the time spent on configuration will definitely be worth the final outcome. Moreover, RUM will not conflict with any other testing or analytical tools you probably already use.
Although RUM is becoming more prevalent among many businesses, there are still a lot of companies ignoring this great technology. To make sure you’re on the right track, don’t miss an opportunity to leverage all the advantages RUM has to offer.