Cheetah method to application Performance
Hello friend, today we will be using nature observation to explain you the Cheetah method to achieve optimal application performance. Sounds strange, i know, but keep reading. Start by taking a series of 10 deep breaths, this will sync you to the correct frequency. Ready ? Good, lets start then. Look a good look at the picture below and reflect on what you see.
The Cheetah is the fastest animal on earth and recent research found this very interesting fact about Cheetahs and their "speed secrets"
"Cheetahs and greyhounds are known to use a rotary gallop, and physically they are remarkably similar, yet there is this bewitching difference in maximum speed of almost a factor of 2," study researcher Alan Wilson, from the Royal Veterinary College in the United Kingdom, said in a statement."
Strut & stride
The researchers did find a few important differences. The cheetahs were able to change their stride frequency (strides per second) as they reached higher speeds: At 20 mph (32 kph), they took 2.4 strides per second, but at 38 mph (61 kph), they took 3.2 strides per second. The greyhounds, on the other hand, maintained a constant rate of around 3.5 strides per second no matter how fast they ran.
On technological context, the world is full of similar application architectures with same technical specifications but showing very different performance levels, just as the Cheetah and the greyhound. Now, what does this mean ?
The secret to our champion:
"Cheetah "switch gears" while running, striding more frequently at higher speeds"
The ability to "process faster" each stride is what make Cheetah "twice as fast" as the greyhound. On an application performance context, the Cheetah method focuses on making your application cpu cycles (strides) faster, increasing your overall application performance. But we don't stop there, we apply machine learning techniques to teach your application to adapt to circumstances, just like the cheetah does.
The "nirvana" for the Cheetah method on application performance is described by:
"Our application "switch gears" while running, striding more frequently at higher application concurrency."
So far so good , you look interested and excited. Let me show you how to achieve that goal by going thought 4 different stages.
1 - Collect
Your application deployment interacts with many different components and this components communicate with each-other inside it's architecture. Before we can even begin, we need to build a clear understanding on the architecture we are working with. This initial stage involves capturing architectural information and generate materials to build a clear understanding on what components are involved and how those components communicate.
The following artefacts are the foundation of the Cheetah method.
- Network diagram (includes all ports communications in both directions)
- Cluster communications diagram (all cluster related details, time sync, cluster ports)
- Load-balancing diagram (includes load-balancers ports/rules and configuration)
- Storage diagram (All storages (local, NAS, SAN, SSD)
- Firewall rules
- Authentication / Application Access diagram
- Integration details (Used protocols : cmis, http, ftp, webdav, rest )
- Hardware/Virtualization components (Servers, Memory, Cpus Cores, Storage)
- Configuration details
* Web servers configuratio
* Application server configuration
* JVM Configuration
* Database configuration
* Service configuration
* Logging configuration (Including all log paths)
The Configuration details is a special artifact that will feed our machine learning engine that will be parsing all log files and taking the necessary actions, by changing, deploying and applying configuration changes implementing the Cheetah method.
2 - Observe
"Ultimate awareness means seeing the world and everything in it as it really is, not as we believe it to be or want it to be"
This principle is very important on application performance, we cannot assume that everything is working as it should without having empirical data that can justify those assumptions. You can acquire intelligence by studying, reading, and examining new information — this, however, is considered preparation for your journey. The right awareness can only be achieved through personal experience and observation.
Image the picture above can represent your application talking with your database, making sure than can see each other and communicate, they are "observing" themselves. Same goes for observing third-party components, ldap servers, authentication or micro-service providers and so on. This involves implementing inter-server observation, clustering observation , log monitoring and resource usages (cpu, mem, threads). All of this is done by introducing the watcher into your architecture. Take a series of 10 deep breaths, to sync you to the correct frequency.
1.1 - Watcher 1.0 is a process that uses a stack of open-source compoenents (jenkins, elasticsearch, logstash, camel) to actively act on the environments adjusting to different configurable scenarios by taking pro-active measures to prevent outages, increase application stability and overall performance. It executes a series of continuous checks to guarantee service levels and service continuity.
The watcher can either deploy and apply new configuration changes automatically or notify the Administrators asking for a confirmation before taking the actions on the environment. Besides executing its tasks, the watcher agent is storing and processing data it interacts with feeding its own evolution using machine learning techniques.
3 - Adapt
"The wise adapt themselves to circumstances, just like the Cameleon adjusts itself to its surroundings"
With the watcher, your production application is adjusting to any given situation (concurrency, resource exhaustion, communication failures and so on) and learning in the process of those adjustments. Sounds to much like our friend above the Cameleon, does it not ?
4 - Improve
Constantly knackered, the hummingbird consumes between 3.14 and 7.6 calories a day. That may not seem like much, but if humans (who may eat 3,500 calories a day) had the metabolism of a hummingbird, they would have to consume approximately 155,000 calories a day. That's about 77 times as much as most humans eat! Or 437 meals. Constantly. Knackered.
As you can see, the Cheetah method collected, observed , adjusted and improved your application by tuning its performance and adjusting to different circumstances so it can be as effective as the hummingbird.
I hope you enjoy reading this as much as i've enjoyed writing it. I will be posting more on the Cheetah method, but if you are interested in deeper details, feel free to contact me.
We're together, one love.
Luis