Mcrouter is a memcached protocol router for scaling memcached deployments.
C++ Python C M4 Ragel in Ruby Host Shell Makefile
Latest commit 6d49b6b Jan 19, 2017 @glamtechie glamtechie committed with facebook-github-bot fixing contbuild_memcache_build failure
Summary: Fix to mcrouter/lib/carbon/connection/PooledCarbonConnectionImpl.h:47:9: error: operation on ‘clientId’ may be undefined [-Werror=sequence-point]

Reviewed By: jmswen

Differential Revision: D4433604

fbshipit-source-id: d7aee84c591da42aec7ea51c6aad252014500c55
Failed to load latest commit information.
mcrouter fixing contbuild_memcache_build failure Jan 19, 2017
.travis.yml Move Travis to Ubuntu 14.04 Feb 9, 2016
LICENSE Update README Feb 20, 2016
PATENTS Update Patent Grant Apr 14, 2015 Update README Feb 20, 2016

Mcrouter Build Status

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.

Mcrouter is developed and maintained by Facebook.

See to get started.

Quick start guide

See for more detailed installation instructions.

Mcrouter depends on folly (

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 \
                  "route":"PoolRoute|A"}' \
    -p 5000
$ echo -ne "get key\r\n" | nc 0 5000

(nc is the GNU Netcat,


  • Memcached ASCII protocol
  • Connection pooling
  • Multiple hashing schemes
  • Prefix routing
  • Replicated pools
  • Production traffic shadowing
  • Online reconfiguration
  • Flexible routing
  • Destination health monitoring/automatic failover
  • Cold cache warm up
  • Broadcast operations
  • Reliable delete stream
  • Multi-cluster support
  • Rich stats and debug commands
  • Quality of service
  • Large values
  • Multi-level caches
  • IPv6 support
  • SSL support


Documentation: Engineering discussions and support:


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

Licensed under a BSD license: