Enhance Your Site’s Performance With NewRelic

Over the past few years as a Software Engineer, I’ve worked on several Enterprise grade projects. That means tight, ridiculous deadlines on our part. When that happens, no one, QA leads included, cares about quality as long as your code is in the code base on time. No, the regret comes later when all hell break loose.

Once I worked with a guy who checked in some half-cooked code just to close the issue for then before it sets the alarm bell ringing within. However, that particular piece of code completely went on to run for hours and blew up in our face when the app went live. By then a slew of modules were built over this, and we (cough I cough) had to revisit it later on, make numerous changes to the design before that flow was usable. In this process we wasted several thousand dollars which could have been avoided if we had some sort of process in place. Sadly, most of the software world works the same way.

Big Deal! Hire a performance guy and optimize the DB performance, some might suggest. As valid as the idea is, not all bottlenecks are I/O related, though traditionally this is where most applications fail. It could be due to a poor coding as well or lack of sufficient hardware power. NewRelic is a service which analyses these issues and help you optimize your product. Does it work? Join me after the jump to find out.

What is NewRelic

NewRelic is a San Fransisco based SaaS offering that monitors your applications and help identify what is bogging you down before things spiral out of hand. Their hosted service allows you to measure server hardware utilization, I/O throughput code performance, and maintain a track of the processes which impacts the agility. You can also scrutinize how a server issue is threatening to bring havoc upon you. Sometimes it could just be poorly written code which was overlooked during review. The NewRelic agents scans your code base for potential issues and points out the remedies. Interesting, ain’t it.

Wait…How does that work exactly

At this point if you’re confused how NewRelic differs from Automated testing, don’t worry, it is perfectly OK. From a SDLC stand point testing validates whether the functionality works as per the requirement. It doesn’t care if your approach is efficient as long as it works. Sure, performance testing does show what is slow, but it cannot say why it is slow. That’s where NewRelic comes in.

An agent is deployed in your working environment which collects all network and database activity, and records the activity to the NewRelic servers. This collected data is then processed and interpreted into a much user friendly form as charts and tables. What started as a code performance management tool has evolved into a complete application performance manager with the agents monitoring how the code performs for each user across spatial locations, CPU utilization, and I/O throughput among others, making it a powerful tool for developers.

Monitor… Measure… Manage

What you can’t measure, you can’t manage is an old saying in the management world. The same adage applies to the development sphere. As a developer we make a lot of assumptions while coding. However how well that assumptions work is and an entirely different matter. In my one of my day jobs a project backfired and I was roped in to troubleshoot. My role was to optimize the application, improve the turn around on defects and reduce the development effort. What I saw there was alarming. Every page took more than 15 seconds load and some requests would die intermittently without any warning. In the name of Rich UI, the User Experience was completely botched. At first glance the code looked alright. All the conventions were followed, though it went astray here and there which was expected in such a huge project, nothing serious.

End User Report

End User Report

Later I deployed a NewRelic application monitoring agent to see what was causing the issue. Within a few hours NewRelic started sending me reports and I was really stunned. There were several bottlenecks in both code and our queries. One seemingly innocent query was taking ages to run which would have gone undetected without NewRelic. We also identified several slow movers and we were able to speed up by 80% in no time.

Transactions are the key to successful web apps. As developers can only do so much to optimize each transaction and reduce the failure rate. But there are so many factors that can trip you along the way and the penalty would be humongous. Till NewRelic came along we were depending on Automation scripts to monitor these critical flows. But it required a lot of tester-developer coordination and would taking too much time. Also since these errors were user specific, finding out the root cause is tricky more often than not. NewRelic’s Key Transactions Monitor can help us in these cases. It allows you to define what is a key flow and monitor the Apps performance from the dashboard and in case something goes awry it can automatically send alerts saving precious time. It also identifies which part of the transaction is slow and lets you deep dive into it.

Geo-Spatial Breakdown

Geo-Spatial Breakdown

End User Monitor provides useful insights how your app performs across various platforms and environments. This should give enough pointers as to how well your front end is designed. The chart is broken down component, making it easier on us to gauge what is slow. The Geographical split up of speed is another cool feature that’d save me a lot of embarrassment.

Full Throttle

Full Throttle

It’s not always your code that fails you. For instance what is running good in the US might be slower in Asia. It could be because of the Network latency and you might need to consider deploying a CDN there. NewRelic’s latest expansion into the Server monitoring domain could help us make informed decisions.

Wrapping Up

NewRelic is a great start up. It’s one of those apps that deserves to be in every developer’s tool kit. It can potentially save you thousands of dollars in cash and perhaps avert a catastrophe. If you’ve a website, or are in a capacity to manage somebody else’s app, I would strongly recommend you to check them out.


A powerful application performance manager for your app.