0

I have an EC2 instance running which is housing a nodeJS/GraphQL based API application. The application is managed via PM2.

I want to have a setup/configuration which can continuously ping one endpoint (actual API) on the server to keep monitoring the latency. e.g, it can keep hitting login endpoint with some dummy credentials to make sure server the response is received within given threshold time. If the response continuously comes as delayed, the PM2 should restart the node process.

Is there a standard/accepted way of doing this? Health probe check or something. Not sure. Apologies if it's a bit vague/broad question/topic.

beNerd
  • 117
  • 5

0 Answers0