January 27, 2015
Guest post by Prashant Deva, Founder and CTO of Chronon Systems, parent company of DripStat
If you run an application on a JVM, it is inevitable that you are at some point going to run into issues such as:
Since the above is inevitable, you want to ensure your infrastructure is set to automatically detect and deal with the above issues. Otherwise you are looking at downtime sometime in the future.
With a combination of DripStat and StackStorm, we are moving in a world of fully automated data centers. Let’s see how we can use them to completely automate dealing with above issues so we don’t get any downtime.
DripStat is an APM (Application Performance Management) solution for Java.
DripStat can automatically detect and alert you when:
That covers the first portion of actually detecting issues in your application.
The next stage is where StackStorm comes in.
StackStorm is like IFTTT for Infrastructure Operations. StackStorm can listen to or poll for events and then take actions based on those events with the help of a rules engine and workflow. In our example we will use StackStorm to automatically respond to issues DripStat identifies with a remediation that repairs segregated or failing services.
StackStorm now has a DripStat ‘sensor.’ This sensor automatically detects the above alerts from DripStat and triggers ‘actions’.
StackStorm can integrate with many different internal and external applications with its powerful reactor system. Read more about its architecture.
For example, it can automatically provision new servers in many clouds including: VMWare Virtual Center, Amazon Web Services, OpenStack, Rackspace, Digital Ocean, and any other libcloud compatible cloud, which is what we will need for our task today.
All you need is to configure StackStorm to perform the following actions:
1. On high heap usage
You know you are about to run OutOfMemory very soon.
Start draining the current node from the Load Balancer and then remove it entirely.
You just saved your users from seeing an OutOfMemoryException!
2. On High GC
Add a new node with a larger heap size.
Start draining the current node from the Load Balancer and then remove it entirely.
You just autoscaled your infrastructure based on load!
StackStorm can be installed in less than 30 minutes and it only takes a few more minutes to install DripStat. So you can basically take an extended coffee break and have fully automated infrastructure by the end of it!
Check out the StackStorm community site to learn more about the DripStat integration and more.