Graphite 0.9.14 - the Highlights

2015-11-01 11:11:12 by jdixon

As I mentioned in the previous blog post, we're perilously close to shipping the next Graphite release. Although we typically avoid large, sweeping changes in the stable branch, the long development cycle leading up to this particular release means we have a number of big new features and performance improvements to announce.

Rather than assume everyone will read and understand the significance of all the changes in the 0.9.14 Release Notes, I felt it would be a good idea to touch on some of them here. This collection represents a small handful of highlights among the numerous changes from this release. The sustained level of interest and contributions from the community continue to astound me. I can't thank everyone enough for their continued support of the Graphite project.

Note that I'm mostly covering shiny new stuff in this post. There are a ton of bugfixes and performance improvements in this release. I encourage everyone to read the Bug Fixes section of the release notes for a thorough list of those changes.

Merged timeseries results from remote queries

If you scale Carbon horizontally, you probably understand the hassle involved with keeping Whisper files synchronized. Tools like Carbonate help, but it can't prevent network partitions or similar outages that might result in lost time-series data in the first place.

Prior to 0.9.14, Graphite-Web employed a "first match wins" policy, rendering the first set of data returned among a pool of backend ("remote") servers. Ironically, all else being equal (network transit, disk speed, etc), this result tended to be the _least complete_ set of data (assuming a synchronization disparity). Fortunately, with REMOTE_STORE_MERGE_RESULTS enabled (the default behavior), Graphite-Web now automatically merges any remote datasets to form the most complete set of data available.

In the following examples, we have two servers, each with their own incomplete set of datapoints. Fig 1 demonstrates the legacy behavior, rendering the first partial set returned. Fig 2 reveals the new behavior, merging the results from both backend nodes before rendering the final set (or in this case, passing it back to Grafana).

Fig 1: Old "first match wins" behavior
Fig 2: Merge results with REMOTE_STORE_MERGE_RESULTS enabled

Also worth noting is that remote fetches are now run in parallel using threads. This is a significant improvement over the old sequential behavior, especially when retrieving globbed metrics across a pool of backend servers.

Cache consistency improvements

There are a variety of cache consistency enhancements and bugfixes in this release. Many of them affected the merging of hot datapoints in cache memory and cold datapoints pulled from Whisper archives. One particularly nasty bug discovered by jjneely would appear anytime a query range was smaller than the interval of the Whisper archive, e.g. a 10-second query attempting to retrieve from a 30-second interval. The query would perform a "wrap-read" on the entire archive, causing excessively long query times and returning large arrays of null datapoints. Fig 3 shows the effectiveness of the fix in action.

Fig 3: Bugfix for sub-interval queries

Single-hue color schemes

In the course of writing the Graphite book I needed to make some colorList schemes that rendered well for print. The result was a variety of single-hue color schemes that I've merged into the Graphite-Web project. Check out this PR for examples of each.

Fig 4: ocean2 lineColors scheme
Fig 5: lava1 lineColors scheme

Serving static assets with Whitenoise

Serving static files via Django and WSGI became a little more complicated over the last couple years, forcing administrators to adopt elaborate configurations for serving up static content within the webapp. Graphite-Web now supports serving up static content automatically if the Whitenoise module is installed on the host server.

URL shortener

One of the fun things about being a Graphite project maintainer is all the interesting pull requests we see from outside contributors. I was initially hesitant about adding a URL shortener feature to the webapp, but everyone loved the idea so we merged it in. Like other shorteners you're familiar with, this one exports a URL that redirects to the rendered graph, but it avoids the excessively long links that can be truncated by various chat or messaging services.

Fig 6: Graph export by URL shortener

Timezone fixes

I won't go into all the gritty details, but I'm very pleased with the attention given to fixing timezone bugs in this release. If you encountered problems in the past I urge you to give 0.9.14 a try. As always, please open an issue if you're still experiencing any problems.

Import Graph URLs

Remember my old tip about the Graph bookmarklet? This feature is now built right into the Graphite-Web composer. It supports any valid graph URL, although it doesn't support the shortened URLs mentioned earlier; those would need to be expanded first before imported into this field.

Fig 7: Import graph by URL

IPv6 support

Graphite-Web and Carbon both support IPv6 with this release. This will be a huge relief to the three people currently running IPv6 on the internet (wink).

Reorder metrics

This one is pretty self-explanatory. Sometimes you may want to reorder the list of metrics (especially if you've applied a bunch of functions to them), especially for stacked graphs. This new UI element makes it easy and even supports multi-select.

Fig 8: Reordering metrics

New Functions and Graph Parameters

Add a comment:

  name

  email

  url

max length 4000 chars