In my previous blog I’ve written about the hard work needed to successfully migrate applications to the cloud. But why go through all that work to get to the cloud? It’s to take advantage of the dynamic nature of the cloud with the ability (and agility) to quickly scale applications. Your application’s load probably changes all day, all week, and all year. Now your application can utilize more or less resources based on the changes in load. Just ask the cloud for as much computing resources that you need at any given time, and unlike at data centers, the resources are available at the push of a button.
But that only works during the marketing video. Back in the real world, no one can find that magic button to push. Instead scaling in the cloud involves pushing many buttons, running many scripts, configuring various software, and then fixing whatever didn’t quite work. Oh, and of course even that is the easy part, compared to actually knowing when to scale, how much to scale and even what parts of your application to scale. And this repeats all day, every day, at least until everyone gets discouraged.
How frustrating to have such a powerful new cloud platform at your disposal but no ability to leverage its dynamic benefits. The only way to realize the full benefits of the cloud is to make your application self-tuning. Luckily the technology is finally available and I’ll show you how to use it. But first, lets take a quick look at the evolution of scaling in the cloud.
The first generation of technology wasn’t really technology; it was manual. Early adapters of the cloud would observe performance of their application and make decisions to add more nodes. Then Ops staff would do the same work that they had done in the data center, installing and configuring software on the new nodes, changing load balancing scripts to include the new nodes, and so on. The only benefit here from the cloud was that you saved time and money by not having to buy hardware for your data center. The data center no longer throttled you, but your staff did, as you could only scale as fast as your team could finish the manual work. The difficulty and time required to do the manual work limited how often you could scale, so while you might be able to scale every few days once you recovered from the previous push, you could not quickly react to sudden spikes in load, or even to daily fluctuations in your application’s usage pattern.
Recently, the second generation emerged. Both startups and cloud providers began offering software to scale applications automatically based on performance. Unfortunately these lacked some key elements like, a.) These new tools lacked the ability to collect complete business relevant performance data and b.) The ability to make decisions based on processing that large amount of data. And so these systems can only measure simple metrics like CPU, memory or heartbeats, and then make haphazard decisions based on them. But how well is your application really performing now? Is it meeting key performance based business SLAs? What effects have past scaling attempts had on your application? These simple metrics didn’t shed much light on this. The tools started scaling your application without really understanding it.
Sounds a bit scary doesn’t it? It should, but many continue to learn the hard way. I recently worked with a large Internet-based company who used such auto scaling technology for the first time. Because the tool was measuring metrics that gave false positives, it went crazy and began to crank out new nodes every minute, greatly stressing the application environment for days while teams investigated the problem.
With all that behind us, we are ready for the third generation of scaling technology, the self-tuning app. Three technologies must work together to make this possible.
First, Cloud-Ready Business Transaction Monitoring. Your monitoring system must be focused on business transactions so that it can be cloud aware. In doing so, it can automatically discover and understand the distributed nature of your application in the cloud. Static monitoring systems will not work if you really have a dynamic application that is constantly changing and taking advantage of the various cloud resources. And the system must also be business aware; distributed Business Transactions are the key unit of measure when looking at your application. You are not interested in various low level CPU metrics; you are interested in the business performance of your application, as that is the ultimate measurement of success.
Second, Analytics on top of this rich monitoring data. A good monitoring system such as I’ve described above will collect large amounts of data, which means you’ll need an analytics system which can help in performing long range analysis and trending to understand the behavior of your application and understand the impacts that scaling has on your application. You can then gain key insights and detect patterns that help you predict when scaling will be required. As a result you can track your scaling history to better optimize each scaling operations.
Third, Cloud Orchestration. You’ll need a system which can take all the information you have and actually perform the scaling operations. It should work with a wide array of cloud providers and be extensible for your custom needs. It must also be closely integrated to your monitoring and analytics system so each is aware of each other’s actions. Your system knows that a threshold has been reached and initiates a scaling operations, the cloud orchestrator is fed all data from the monitoring system so it has the latest information about the various parts of your application, and then the system knows when the scaling operation took place and can measure the results from the operation and make further decisions about when to scale again.
As you see, these three systems work tightly together to study your application, scale it, and study some more. Taken together, they can be considered to be a true Application Performance Management system–which needs to consist of Cloud-Ready Business Transaction-centric Monitoring, Analytics, and Orchestration. This powerful APM engine improves the efficiency and effectiveness of the scaling, allowing your application to perform optimally in the cloud without much human intervention. And now you have a self-tuning application!
Trying to integrate all this yourself from different vendors and tools would have little chance of success. Fortunately, AppDynamics now offers this fully -integrated solution–which should not be surprising considering that AppDynamics was built from the ground up around cloud technologies and next generation APM.
The cloud really does offer amazing opportunities, as long as you have the technology to harness that power. Give it a try; watch your app self tune themselves, and then wonder; what will you do with all your new free time?