Why You Need Application Performance Management
If You’re Not Gauging Performance, You’re Not Improving
Kent Beck is famous for saying, “Make it work, make it right, make it fast, make it small”. If you haven’t been indoctrinated, Kent is one of the founding fathers of Agile, and the gist of his advice is that you don’t try to optimize before something is built properly, and you don’t worry about building something properly when you’re first getting it to work. Engineers are often “chess players”, and want to think many moves ahead to a perfect design for a new problem. Kent’s advice is that you won’t know what that looks like until you actually begin. If you try to make it fast immediately, you’re likely wasting your time. Henrique Bastos points out, and I agree, that these stages ought to be part of a single cycle of development, part of the Definition of Done for each release.
Putting Beck-ian Principles in Practice
Let’s imagine a shop with the goal of putting a RESTful layer of web services on top of a company’s product inventory. In the past, the business sold directly to customers. Leadership did some analytics and determined that, if the business engaged resellers, then they could increase sales with little additional overhead.
The large constant factor is the transition from legacy relational databases fronted by first generation web applications, to NoSQL databases that can index and search product inventory at lightning speed. While this is far from the road not taken, it’s a large enough job to call for some best practices.
Following Kent’s advice, our developers design their REST APIs, with input from resellers. In this process, they discover that the resellers would like a sample code base showing how to do authentication and consume the output. The developers decide to make the sample reseller app the heart of their testing strategy. Following test-driven development best practices, they code up an app that functions properly with mocked responses, simplifying and lowering the cost of automated functional regression tests.
Now the developers began to swap mock API calls with actual API calls. Each time they implement and exercise a new API, they have immediate feedback that the other APIs are still functioning properly: test-driven development.
Before they even began implementation, the developers knew they would eventually get to “make it fast”. Load and performance testing is the sometimes ignored cousin of functional testing. If you’re not looking, however, it’s going to be bad.
The developers settle on CA Application Performance Management for their testing. CA APM plugs into their Jenkins pipeline. It collects streams of testing data and traces during each build’s automated load test. By using CA BlazeMeter for their load testing, they integrate client and server side metrics, both in BlazeMeter’s interface and in reports generated by CA APM. Not only can they document the performance of their APIs, they can look at how performance changes from build to build.
Having arrived at the Definition of Done, the developers are ready to pass control over to the operations team. The operations team uses the CA APM configuration created by the developers to monitor the application in production. Reports and dashboards show how things are going now, lately, in the recent past, and in the distant past. This customer takes advantage of the APM to Grafana integration for reporting, but CA APM’s SQL feature means they could have used almost anything.
Now the DevOps team has a ship at sea. The Ops side keeps the ship sailing towards its destination, while the development team does the impossible and makes improvements to the ship while at sea. After a voyage or two, they realize that the CA API-M gateway would make building and testing APIs even easier (and perhaps they know this at the beginning). With the gateway, there’s less code to write, less code to debug, less code to optimize. Also, the CA Runscope tool provides API-specific testing, which simplifies the load and performance testing of their APIs.
Why is Application Performance Management Important?
If you’re not gauging your performance, you’re not improving. If you gauge your performance, but you don’t put it in context, you may be improving but you don’t really know by how much. A beautiful report of build-on-build performance gives the context you need to score yourself today, and make the right plans for tomorrow.