Monitoring Node.js gRPC Microservices with Chronos

Chronos is a free, open-source developer tool that relieves some of the hassle associated with monitoring gRPC microservices written in Node.js.

Derek Lam
4 min readFeb 4, 2021

What exactly is Chronos?

Chronos is a free, open-source desktop application and NPM package that combine to form a comprehensive microservice monitoring tool. It was created as a tool for developers to help with the design, implementation, and troubleshooting of both gRPC and REST microservices.

When developing a microservice that utilizes both gRPC and Node.js, real-time monitoring is an absolute must. Not only is gRPC in its infancy, having only been released in 2016, but the vast majority of documentation available for gRPC is written in GO. As a result, applying a gRPC architectural style results in a higher level of error than more established styles such as REST or GraphQL.

Thus this heightens the need for live monitoring. However, due to the relatively new nature, Node.js developers who wish to monitor their current microservices after switching to a gRPC architecture are left with three choices:

  1. Rewrite — Rewrite microservice in a language with a higher level of support such as GO or Java. This allows developers access to more documentation and monitoring tools. However, this option is not always possible due to the herculean effort required.
  2. Packages — Use packages such as OpenTelementry to record data and export said data to an additional application like Zipkin or Prometheus. This allows developers to monitor their application for free with a flexible combination of open-source software. However, this option requires users to clunkily chain multiple packages and applications to get a comprehensive view of their microservices’ health.
  3. OutsourcePurchase a license to one of the few monitoring tools that support gRPC and Node.js. This option can be very costly but has the lowest barrier to entry and highest ease of use. However, for small companies this may not be a viable option.

Chronos aims to bridge the gap between the second category’s low cost of entry and the third category’s ease of use. Chronos does this by providing a user-friendly interface in a product completely free of charge.

Once the Chronos NPM package is installed and deployed, the application is as easy as adding a database URI and selecting the type of database. Currently Chronos supports PostgreSQL and MongoDB. For all the night owls out there, Chronos 6.0 adds night mode.

Chronos Features

  • Track the health of the microservices, recording information about server health such as temperature, latency, memory usage and more.
  • Generate metrics such as request status codes, downtime, and latency in easy to understand charts.
  • Trace distributed network requests, generating graphs that show the path of a request from beginning to end.
  • Allow users to store server health data on either PostgreSQL or MongoDB.
  • Alerts users in real-time of errors through Slack or email.
  • A user-friendly desktop application available on Windows, MacOS, and Linux.
Chronos supports the ability to trace network requests across gRPC-js or Express.js routes. Alongside this, Chronos also supports error logging and displays key metrics such as latency, status codes, and server traffic.

How can Chronos help?

Say you have an existing microservice written in Node.js that currently employs a REST architecture that you are converting to gRPC or you are currently designing a gRPC-based application. However, you and your development team have little to no experience with gRPC, but manage to get a working implementation of the application up and running. You implement tests, nevertheless, there is a low level of trust in said application due to the lack of documentation.

This is where Chronos comes in, Chronos serves as the last line of defense in application failure by providing a real-time monitoring service. This supplies developers with peace of mind by allowing developers to be alerted the moment an error occurs. Chronos also provides metrics so that developers can at a glance see the current performance of all services and compare that to the previous REST-based implementations. Tracing requests permits developers to see which microservice in a distributed request failed, lowering the amount of time spent debugging by quickly isolating faulty code. Future updates will include support for more database types such as MySQL or Cassandra, and a web application.

Want to learn more?

For more information about Chronos, visit our website, or the official Chronos Github Page. Feel free to send any questions or comments to our email, teamchronosla@gmail.com.

The Chronos Team

Additional Reading

Blazor’s Future: gRPC Is Key by David Ramel

API design: Understanding gRPC, OpenAPI and REST and when to use them

gRPC — remote procedure calls’ choice for the 2020’s? by Jacek Chmiel , Andrew Petryk, Frederik Berg

--

--