Home

Andre Azevedo edited this page May 1, 2018 · 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

  • Release v0.14.0. (November 25, 2015) Starting today, we will sync all mcrouter commits continuously to the master branch of our GitHub repo. In addition, we will be cutting a biweekly release branch that is intended to be stable and resilient to third-party incompatibilities. This week's release appears as the release-14-0 branch in our GitHub repo.
  • 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) 2015, Facebook, Inc. All rights reserved.

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