Skip to content
Andre Azevedo edited this page Jan 21, 2015 · 28 revisions

Welcome to mcrouter

Mcrouter is a memcached protocol router for scaling memcached deployments. It's a core component of cache infrastructure at Facebook and Instagram where mcrouter handles almost 5 billion requests per second at peak. See FB engineering blog post about mcrouter.

Mcrouter is developed and maintained by Facebook.

Because the routing and feature logic are abstracted from the client in mcrouter deployments, the client may simply communicate with destination hosts through mcrouter over a TCP connection using standard memcached protocol. Typically, little or no client modification is needed to use mcrouter, which was designed to be a drop-in proxy between the client and memcached hosts.

Mcrouter supports typical memcache protocol commands like get, set, delete, etc. and specific commands to access stats, version and so on.

Features

News

  • Initial open source release (mcrouter 1.0) (September 15, 2014)

Getting Started

See installation for more detailed installation instructions.

The installation is a standard autotools flow:

autoreconf --install
./configure
make
sudo make install
mcrouter --help

Assuming you have a memcached instance on the local host running on port 5001, the simplest mcrouter setup is

mcrouter \
    --config-str='{"pools":{"A":{"servers":["127.0.0.1:5001"]}},"route":"PoolRoute|A"}' \
    -p 5000

To test, send a request to port 5000. For example, using Netcat:

echo -ne "get key\r\n" | nc 0 5000

For a complete list of command line arguments, check mcrouter --help.

Links

Engineering discussions and support: https://www.facebook.com/groups/mcrouter

License

Copyright (c) 2014, Facebook, Inc. All rights reserved.

Licensed under a BSD license: https://github.com/facebook/mcrouter/blob/master/LICENSE