Hoping to establish its place in the emerging world of microservices, Varnish Software has released a monitoring tool to help run speedy microservices-based workloads using its namesake caching-server software.
The software, called Zipnish, provides the administrator with a set of waterfall-styled diagrams that vastly simplify the process of pinpointing of sluggish or non-operational microservices. It could work with stateless services, or those that run in containers.
The idea for the software came from one of Varnish’s users, the Norwegian media company Amedia, wrote Per Buer, founder and chief technology officer for Varnish in a blog post announcing the software.
Amedia redesigned its infrastructure into a microservices-based approach almost a decade ago, before Docker was even a glint in Solomon Hykes’ eyes. Instead of containers, the company used stateless services, which could scale up or down as needed and not require a lot of server space when idle.
To support this somewhat novel architecture, the company took an unusual step in using Varnish as the hub for communications across the different services. Varnish’s Varnish Cache is a widely used open source HTTP engine, though to date it hasn’t been used in many microservices architectures. Varnish also offers a commercial version.
“They decided to stick Varnish in the middle of their microservices. Instead of having the microservices talk directly to each other they would connect them to Varnish and Varnish would proxy the connections,” Buer wrote.
The use of caching software as a broker had a number of immediate advantages. Most notably, endpoints weren’t reliant on specific other endpoints being online. Varnish could be configured to periodically probe the endpoints and redirect traffic to backups should the primary nodes be offline. It also eliminated the need to set up a service directory, as Varnish itself provided that capability.
Zipnish came about as a way of detecting sluggish services. A service with an occasional 50 ms of latency, or one that doesn’t respond to even a small number of requests, could slow overall operations. With Varnish’s help, Zipnish can be used to easily find the troubled services.
The software is based on a distributed tracing tool Twitter developed called Zipkin. The Varnish folks rewrote Twitter’s Scala-based tool so it didn’t rely on the Java Virtual Machine, and so that it could take advantage of the data Varnish collected, through the Varnish logging API that was introduced in Varnish Cache 4.0.
“Since there already is a compelling argument for having Varnish in a microservice architecture and the logging in Varnish is, from a performance perspective, free, why not take advantage of it? Varnish can with a tiny bit of help from the endpoints, know how much time each request takes, what service calls are dependent on what other calls to be fulfilled, what special circumstances occurred during execution of this call and a few other data points,” Buer wrote.
Zipnish is available under a FreeBSD license. The company will hold an introductory webinar on Zipnish on January 13.
The New Stack is a wholly owned subsidiary of Insight Partners, an investor in the following companies mentioned in this article: Docker.