Faced with the challenge of overseeing the health of large caching systems, a Facebook engineer developed heat-map software to quickly pinpoint problems in the social network's data centres.
The visualisation monitoring tool, called Claspin, uses the heat map format to portray the working status of Facebook's servers.
"As Facebook grew both in size and complexity, it became more and more difficult to figure out which piece was broken when something went wrong," said Sean Lynch, an engineer with Facebook's cache performance team.
The idea of using heat maps in overseeing data centre operations is an emerging one. At least one Oracle engineer has investigated ways of using heat maps to quickly convey potential problems in the data centre.
Whenever the popular social networking service experiences technical difficulties, the cache performance group must make sure that the caching mechanisms are not the problem, or part of the problem. A heat map could be an efficient way of representing operational status of a large number of components. Each component is represented as a cell on a large matrix, and the colour of the cell represents the health of the component. A green cell may represent a node that is operating within acceptable bounds, while a red cell may represent one not operating correctly.
Facebook uses two major cache systems. One uses Memcache, and the other relies on a caching graph database called TAO.
Both of these systems produce copious performance metrics - on various latency, request rate, and error rate statistics. According to Lynch, the caching team was already using a generic heat map to monitor performance. The software, however, could not easily fit the visual data into a single screen. The colours the heat map software used to represent different values offered little intuitive indication of whether a server was performing adequately. And the software didn't interpret the source data in a way that could immediately indicate whether an individual host was running within acceptable bounds.
Lynch designed Claspin, named after a protein that monitors for DNA damage in cells, so that each cluster of servers would get its own heat map, ordered by the rack number within a data centre. So problems at the rack level or at the cluster level would become readily apparent by simply viewing the heat map.
With this heat map, a black box indicates an individual host is down. A green block means the host is performing adequately and a red box means that some aspect of the operation, such as a large number of timeouts, is beyond acceptable levels. In addition to providing a visual glimpse into operations, Claspin allows the users to drill down to specific metrics, by running the mouse pointer over a specific host.
Thus far, the tool has been a success within Facebook, Lynch noted. Additional engineering groups have also started using the heat maps to watch over their own servers. Also, more servers seem to be operational due to the engineers being able to consult Claspin.
"When I first deployed Claspin, the view above had a lot more red in it. By making it easier for more people to spot server issues quickly, Claspin has allowed us to catch more 'yellows' and prevent more 'reds,'" Lynch wrote. "I suppose there's no better validation of one's choice of statistics and thresholds than to have things start out red and then turn green as the service improves."
Facebook is considering releasing Claspin as open source, like it has done with numerous other internally developed tools, though releasing it as a stand-alone application might prove difficult given how deeply connected it is with other Facebook-specific infrastructure, according to the company.
Find your next job with techworld jobs