We often underestimate the importance of application performance monitoring during cloud migrations. Basic before-after tests aside, a healthy monitoring culture within an organization helps to facilitate the migration.
There are two main factors that impact the performance of a program, its Algorithmic efficiency and Execution Context that the program runs on. As developers, we do our best to improve Algorithmic efficiency and in the process, we make assumptions about the execution runtime context.
Let’s unpack what "Context" means; Wikipedia defines Execution Context succinctly:
"Execution in software engineering is the process by which a computer or a virtual machine performs the instructions of a computer program. The instructions in the program trigger sequences of simple actions on the executing machine. Those actions produce effects according to the semantics of the instructions in the program. The context in which execution takes place is crucial. Very few programs execute on a bare machine. Programs usually contain implicit and explicit assumptions about resources available at the time of execution. Most programs execute with the support of an operating system and run-time libraries specific to the source language that provide crucial services not supplied directly by the computer itself. This supportive environment, for instance, usually decouples a program from direct manipulation of the computer peripherals, providing more general, abstract services instead."
Execution (computing). (2016, November 17). In Wikipedia, The Free Encyclopedia. Retrieved 16:44, November 17, 2016.
In production environments, problems rarely stem from algorithmic inefficiencies or bugs (we tend to catch these during an earlier, preproduction phase). Production environments typically suffer from failed resource assumptions about the execution context made during development and testing. Maybe while designing our application we expect file systems to respond at a certain rate or have assumed a certain thread pool utilization rate. If we are to maintain our throughput goals, all resource assumptions must hold when our application is migrated to the cloud.
Now meet Andrew, the application monitoring enabled DevOps engineer.
Andrew is asked to migrate all non-revenue generating business operations to the Cloud. Since Andrew has been working on a distributed legacy application that makes calls to other legacy applications and various persistency technologies, he gets overwhelmed trying to figure out which software components must be migrated to the cloud so that the experiences his services offer can continue to function and meet his performance goals.
Andrew quickly realizes he needs to model the deployment architecture of his application, but in a fast paced environment he doubts all the documentation. Andrew decides he cannot rely on design documents, tribal knowledge and folklore but he needs hard evidence. Therefore, he opens his monitoring tool to see the distributed transaction’s cross runtime topology and the deployment structure supporting it. He sets up a filter to isolate non-revenue business transactions. APM Team center clearly shows him what software components are called and what hosts are used to support these operations. He then notes all software dependencies and collects information about the resources that they require. He finds out that he will need to migrate his customer database to the cloud as one of his revenue-generating business transactions depend on it.
After completing the migration, Andrew wonders if his cloud service is as performant as his on-premise version. He installs the monitoring agent on his cloud application and then directs 10% of his traffic to his new cloud service and starts monitoring their performance on APM Team Center. He then creates a Cloud Perspective on APM Team Center and groups his components based on the datacenter they run on, contrasting his on-premise execution rates with his cloud transaction execution rates.
After running some basic performance tests against his new cloud service, Andrew wonders if his overseas customers are still served with acceptable response times. He logs on to his APM Synthetic Monitoring UI (CA App Synthetic Monitor) and records his test interactions. He then deploys his test to 50 different regions around the globe. Results indicate that his Australian customers would experience a performance degradation during the 'Add to Cart' transaction. Being the most complex transaction that moves most data with his UI, he figures he can solve this problem by replicating his application on his cloud vendor's South Pacific data center.
Andrew can now be confident that opaque dependencies and resource assumptions are all accounted for and won’t be haunting him. Application Performance Monitoring offers excellent end to end visibility into distributed applications, operations these applications support and the environments these applications depend on, hence it is an excellent tool to assist in the migration to cloud.
Erhan Giral is a Consulting Architect at CA Technologies.