Application Performance Management

Nishchay Shah, Vice President Engineering at Editage, Cactus Communications | Tuesday, 23 May 2017, 13:10 IST

Performance management plays a very crucial role in web-based applications, and the end-user experience is of utmost importance. In an era where communication has become digital, there is information overload and extreme competition in all avenues. The demand for faster and more reliable web-based products is at its peak. With distributed computing and third-party tools dedicated for improving the performance of your web application, achieving optimal performance is quite plausible. All you need is dedicated focus on APM.

Application Performance Management in simple terms is basically monitoring and improving end-user experience. It can be broadly classified into the following categories:

1. Backend application code performance

2. Data Manipulation Language (DML) statements’ operation performance

3. External service performance

4. Network performance

5. Client-side script performance

Backend application code is one of the most critical areas, and until a few years ago, run time visibility was difficult. APM tools such as AppDynamics, New Relic, and Datadog run agents on the servers and intercept the code execution to provide insights that point exactly to the location of the bottleneck.

Quick tip: Look for thread profilers that show full stack trace of a single request. In most cases, this will help identify the line of code where the bottleneck lies.

For highly transactional and/or relational data, in most cases, the performance bottleneck stems from badly written SQL statements. One of the most common best practices is to enable slow query logging. Once done, look for definite signs of problems in the query plan of slow queries. Is the query running without an index? Are there too many table joins? Are composite indexes used in the wrong order? Are you fetching more than what you need?

APM tools can also help by referencing and packaging the request stack trace with the database performance trace.

Quick tip: Look for database call response time and slow SQL report.

One of the most annoying issues is when your application is dependent on an external service and that service has performance issues. Now, if the issue is consistent then a simple test request can provide proof and you can escalate the issue with the service provider. However, more often than not the issue is infrequent; in this case, the APM tool trace will let you know at a request level on the amount of extra time spent on that particular external service.

Quick tip: Build a service map and a data flow diagram of your application that plots connections and order of external services.

Considering the advancement in fiber optics and data transfer protocols, one would think that network performance should be a non-issue, but network performance is still one of the top reasons for slow application performance. At Editage, we monitor the following when it comes to network performance -

● Network performance within stack (app servers to data base, KV store to API, front-end server to API, etc.)

● DNS lookup time

● Upstream connect time

● Header and response time

● Last mile connectivity

All of the above listed parameters are quite simple to track, except for last mile connectivity.

Quick Tip: Use a DNS provider that has the highest number of edge locations in the geographies you serve and increase the TTL to the maximum possible.

Client-side script performance is the most talked about and least straightforward of all the performance management categories. With a combination of browsers, operating systems, browser plugins, as well as the added complexity of various versions for each, client-side script performance becomes difficult to carry out. Client-side errors cause the largest untraced/unknown dropouts from your application. However, there are various tools such as TrackJs and Bugsnag that detect errors and issues with client-side JavaScripts. Most of the APM tools mentioned above also have a JavaScript error tracker plugin that yields similar results.

Quick Tip: Don’t use multiple JavaScript frameworks and avoid making changes to the framework core.

Few points to remember - first, you can’t fix things you don’t know, so monitor, track, and log every possible transaction, layer, service, device and more; second, use APM tools, log management/analysis, and alerting systems with step thresholds so that you are aware when performance is degrading and you can take action before it is too late. Finally, there is a solution available for all problems; in most cases, you need not have to create solutions. Blogs and forums such as High Scalability, Hacker News, Reddit, and Stackoverflow are always available to keep you updated with real problems and solutions. 

Don't Miss ( 1-5 of 25 )