Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REST API heart beat standard

For a SaaS product which provide its services via REST API, is it a standard requirement to have a heartbeat API?

I have a debate on this subject at work, in my point of view, the heartbeat API is redundant - in case of outages we have a status page which is exactly for those kind of issues, status page + proper communication,

And for the regular usage of our API -> the API should be consumed as is, and it should have a failover with a proper handling - depends on the consumer and the response code (writing to log, retry, etc...)

Also, I have never encountered an API product which provides a heartbeat endpoint, and while looking online I encountered Opsginie heartbeat proxy capability and other few heartbeats which I don't consider them as standard APIs,

Have you encountered such requirement for an API or encountered an API product which provides a heartbeat endpoint ? That will be really useful for me.

like image 436
planben Avatar asked Sep 10 '19 16:09

planben


People also ask

What is heart beat API?

The Heartbeat API is a simple server polling API built in to WordPress, allowing near-real-time frontend updates.

What is heartbeat in Opsgenie?

Our Heartbeats feature can be used to ensure that your environment is able to connect to Opsgenie continuously and that: There are no network problems between your system and Opsgenie. Your Heartbeat sender system is working as expected.


1 Answers

It's a good question. My suggestion is to focus on the consumers of your API and their expectations - ie how mission critical is the API?. If your system was experiencing a severe issue, would your consumer:

  1. probably be annoyed and look for notifications / status information (ie wait)?
  2. panic and start raising priority one support calls?

If your consumers consider your API to be mission critical, they may well be looking for an automated way of detecting an issue even if they aren't currently using the API for it's main purpose. A lot of mission-critical systems are hooked into monitoring systems of the client and so a heartbeat might be considered highly important for some users/clients/consumers.

If not typically mission critical, then your consumers will probably never use it so no need to implement.

I hope that helps.

like image 171
Paul Jowett Avatar answered Sep 19 '22 00:09

Paul Jowett