Heart Beat system track the health of some external/internal components/services that your application talks to.
If your application talks to some external service A and that service A happens to be down for X number of minutes/hours, then your application will be building up a backlog of connection because each connection now stay open longer because the timeout value is typically set to a value higher than an average response from this service. Over time your application could create a huge backlog to the point where the clients connecting to your application would experience slowness or failures. For a website with high traffic this could mean loss of thousands of dollars in minutes.
This is a where a Heart Beat system helps. Your Heart Beat system would track the health of this service A. Your application would check with the Heart Beat system if it's worth spending resources and even making a call to this service A. If the service A is down, your application with the help of Heart Beat system would not make unnecessary calls and consequently it would NOT build up a backlog of connections; that means there is not impact on your end customers which is what the business is all about.
There are two types of Heart Beat systems in my book:
- Heart Beat systems that works independently of your application and pings external/internal services that your application talks to. It periodically checks the health of these services and informs the application.
- Heart Beat systems that require your applications to feed it information/failures and then the Heart Beat system feeds back the decisions to your application when your application needs it. I like to compare this system to hybrid systems in hybrid cars which use the braking energy to feed the battery. It might be a perfect comparison but I like it :)
Here is the link to this demo:
- almirsCorner.com -
#software #softwareEngineering #programming #programmer #developer #code #coding #heartbeat #robustness #softwaredevelopment