New Relic – must have performance analysis in e-commerce

In the case of large, complicated Magento deployments, an extremely useful and often critical tool to maintain the efficiency and performance of the system is software that allows real-time monitoring of the entire application, including servers. Such a tool allows you to check and optimize the application to effectively and quickly eliminate errors in the entire site, which not only affect the low customer satisfaction, but can contribute to their lost.

One of such a solutions is New Relic. It is Robert Żochowski – Delivery Director at Bold Brand Commerce who tells us why it is so important, what it is useful for and what measurable benefits it gives to the client and the implementation partner.

Wha is New Relic?

There are many tools for monitoring server performance. New Relic is unique because it allows not only monitoring of servers work, but also for real-time monitoring of the entire application. Thanks to numerous plugins, it enables easy integration with many services. It also includes a number of functions, including monitoring server parameters, monitoring the operation and the availability of services, monitoring infrastructure, monitoring from the user’s browser, monitoring of mobile applications. From my perspective, considering the features offered, it is worth focusing on APM (Application Performance Monitoring), i.e. application monitoring.

How does New Relic works?

New Relic operates on production servers, which means that it monitors real traffic and the real work of the servers. For sys admin, it is very difficult to predict or be sure about how users will behave, what functions they will use, on what pages they will visit. As you can see, there are many possibilities. For example, there are questions about how many product page views appear in relation to category page views. If there are functions related to wishlist support in the system, how many users would use it. All these answers can be given to us by New Relic, which monitors not only all traffic coming from the Internet, but also operations performed from the server shell level, for example tasks run cyclically by the cron mechanism.

In what cases is New Relic useful?

The first typical situation is when we get a production website with performance issues that needs to be solved. The second case concerns the option when we implement a completely new shop. At the stage just before its launch, New Relic will show the bottlenecks of a given solution. It may happen that the developer will do some trivial error at the level of loading data or will not create the appropriate index in the database and as a result, the time to execute SQL queries will be very long. On the other hand, at the front-end level, it may happen that the front-end developer will load ajax data, and this ajax request will take a lot of time. As a consequence, the product or category page will be returned very quickly, but the execution of additional Ajax requests will be slower and in combination with a large number of requests may result in a decrease in the performance of the entire application. There are many situations in which the application works very well, but there are specific cases differ from the norm, which New Relic also catches and allows you to trace the issue.

Will a non technical person be able to interpret New Relic information on their own?

In addition to the fact that New Relic conducts detailed monitoring, it also gives the knowledge to the non technical person, what is the status of the application. Does it work properly or if there are any problems. The so-called Apdex is used for notification. It is an index that shows in what state the application. This index consists of many factors, including response times, times of how long users wait for the page to load and display, the occurrence of errors at the application code level or cases of incorrect server responses.

In addition, Apdex operates at the level of user satisfaction monitoring. If the index is equal to 1, it means that all users are satisfied with the operation of the application, each page is delivered without errors in a short time. In practice, it is not always the case that the delivery time of each page is just as short.

Is there any scale of user satisfaction determined by the page load time? 

Yes. New Relic allows you to define threshold what time the page is loaded. By default, NewRelic takes 0.5 sec. Which means that if the response times are less than 0.5 seconds, users are satisfied if they take a range of 0.5-2 seconds, they tolerate this behavior. If, however, this time is above 2 seconds, they are totally frustrated and leave the site.

From the developer’s point of view, more detailed data on the operation of the application is important. What does New Relic provide us with? What information can we extract from the system?

Information about the application is divided into sections. One of them is the transaction section, in which all operations performed by the application’s php code are recorded. Operations are grouped using the router / controller / action model, i.e. in the case of the Magento system, all queries for product pages are collected in the catalog / product / view position, and the category displays in the catalog / category / view position. The UX audit carried out earlier will allow to develop an appropriate UX strategy for the new system, taking into account the critical places in the store from the customer’s perspective. Although the store after migration will be new, the clients are largely (at least initially) the same. It is worth taking care and remembering that all changes have an evolutionary character. When designing the interface, try to avoid new products that are more discouraging than they will win the clients’ sympathy. Let us also leave the functionalities that have so far enjoyed a positive opinion and assessment of clients.

Each of the registered transactions or a list of transactions can be previewed at any time.

It is also possible to view transactions that take the most time of the entire server. And this is not about whether a given transaction has been carried out for a long time, or the number of transactions made in connection with their execution time, generate the most time on the server side. We can view transactions with the longest execution time. As an example, you can specify operations for generating a sales report. There is also an option to preview transactions, which from the point of view of users, were the most unsatisfactory, that is, most users used them and they lasted the longest. By entering into the details of such a transaction, we can see what elements make up the transaction time, database queries, specific functions on the php code page and how much time takes.

What else can we view in the New Relic panel?

Another function is the presentation of database operations. It is possible to observe the duration of individual types of queries in relation to the number of operations, giving information about the main sources of database load. The next function is the presentation of registered errors in the php application code and incorrect server responses. For each of the listed functions, you can select the time period that we are interested in, but also if you use more than one application server, you can narrow down the presented data to a specific server.

It is also worth paying attention to the function of tracking calls to external websites. If our system performs calls to another external system, eg an external search engine or to a gateway that supports payments, then such a case is also recorded. We can observe how and at what time external services return answers, if there is no bottleneck at the level of system operation.

As for the procedures – is there any way of handling errors and reporting by developers?

If we know from the beginning that there will be performance problems with a given service, New Relic is a tool that allows you to identify areas whose acceleration will give the greatest satisfaction increase from the customers point of view. Therefore, knowing that there are problems with an application, firstly we identify the most demanding optimizations that take the most of the server’s performance and the most unsatisfactory from the clients’ point of view. We optimize them, introduce and report the effects.

I will give an example from our experience. One of our top customers, Castorama Polska, uses the GSA (Google Search Appliance). It is a tool located on a dedicated server, which we feed with data from Magento. It works as a search engine. We query the server to return the results for the customer (regarding products / inspirations / categories) from the customer’s phrase. New Relic has helped us determine that in some cases we have to wait for a response from GSA longer than we expected. After the implementation of an additional cache on communication with GSA, the problem was eliminated.

Why is this tool so important from the customer’s point of view?

First of all, it is an independent tool. The information presented is helpful not only for us, as the implementation partner, preparing the system, but above all for the client. Thanks to such a monitoring solution, Magento customer has constant insight into what is happening with the application. He can always see that there was a problem, a specific error was registered at the application level or a periodic drop in its performance. So everything is transparent, controlled on both sides by the user.

How does New Relic reduce time, risk and costs which are an indispensable element of the implementation process?

Integrating New Relic with Magento that will be migrated to Magento 2, we can carry out its audit, check whether it is properly implemented, if there are any problems with the operation. The tool is so perfect that when we make changes to the site, it allows us to compare the behavior of the site before and after the changes. We see the effects of our activities, what they have influenced or where they have improved the operation of the system. At the same time I mean the active use of New Relic to identify what is actually happening in the system. In addition to these transaction details, we have quantitative data. So, how many transactions were handled by the entire system, how many transactions were selected, at a given time, etc.

What and how can we monitor?

We can monitor the application in various options, periods and on different servers. When entering an application located on many servers, we choose whether we want to see traffic on all servers, or whether we want to narrow it down to a specific one. There is also an option to choose a period of time that we are interested in. For example, if we know that there was a problem with the application at 1 o’clock, then we can go back to that time and see what happened then.

How do notifications and error messages work?

We define not only the type of notification, depending on errors: e-mail notifications, notifications on mobile (there is a mobile application available), but also on what event we want to be informed. The basic event is the decrease in the Apdex index, each case is reported when the application quality index falls below a certain threshold, regardless of the reason for its decline.

We can also define your own system points that can be monitored from different locations with a user-defined frequency. If a non-availability of such a point is detected, a warning will be generated and a notification will be sent.

How long are the data kept?

It depends on the option purchased. There are several levels. The free version does not show any details, only general traffic and general information about what is happening on the servers. The ESSENTIALS version already presents detailed data and stores it for 3 days, and the highest PRO allows you to analyze data from the 90-day period. In addition, the PRO version allows you to record the moments of changes in the code, making it easier to compare the application before and after the changes


Do you need knowledge about the implementation process, the Magento configuration, or maybe you want to create an internal IT team? Write to us we will organize a series of trainings specifically for your company.

Robert Żochowski,
Delivery Director

+48 502 572 048