![]() ![]() Now that we have a brand new endpoint to check the status of our app, let's collect its uptime and other metrics such as response time, and that we are sure to get notified on time when □ hits the fan. You should also have one health check for each micro-service that you're running! Automate the checks You could additionally add other connectivity checks such as the database or redis. The process.uptime() method is an built in API of the process module which is used to get the number of seconds the Node.js process has been running. Here we'll see how to create a health route that is intended to be monitored using an uptime monitoring service, and make sure your application never goes down without a notice, using Node.js as an example using its most popular framework: Express (my favorite). Reputation - repeatedly downtimes simply tarnish your business reputation.How much money and business would you lose for a minute, an hour or a whole day of downtime? ![]() ![]() Money loss - in some industries, a minute of downtime can cost tens of thousands of dollars.SLA - you are often required to keep up with a Service Level Agreement (SLA) that specifies what uptime you need to commit to.It allows you to monitor this endpoint to get alerted when your API/application goes into trouble. Let's see how you can a add a few lines of code and earn peace of mind! Why would we need a health check endpointįirstly, it is dead simple to make one and doesn't require a lot of technical skills. As your customer base grows, your responsability to provide a functionning service at all time grows too. ![]()
0 Comments
Leave a Reply. |