Need advice about which tool to choose?Ask the StackShare community!

McRouter

20
64
+ 1
0
twemproxy

14
31
+ 1
4
Add tool

McRouter vs twemproxy: What are the differences?

Introduction

Both McRouter and twemproxy are proxy servers that are commonly used with Memcached and Redis. They provide features such as connection pooling, load balancing, and routing for distributed applications. However, there are several key differences between the two.

  1. Sharding: McRouter supports automatic sharding, where data is automatically partitioned across multiple cache instances. This allows for efficient scaling and distribution of data. On the other hand, twemproxy does not support automatic sharding. It requires manual sharding of data, which can be more complex and time-consuming to manage.

  2. Protocol Support: McRouter supports both Memcached and Redis protocols, making it versatile for applications that use either of these caching systems. Twemproxy, on the other hand, only supports the Memcached protocol. This means that applications using Redis cannot be directly supported by twemproxy.

  3. Routing: McRouter provides advanced routing capabilities, allowing for complex routing logic based on various parameters such as the key, data type, and routing rules. It can route requests to different cache pools based on these parameters, providing flexibility in managing application data. Twemproxy, on the other hand, provides simple round-robin routing, where requests are evenly distributed across cache instances without considering any specific parameters.

  4. Flexible Configuration: McRouter offers a more flexible configuration compared to twemproxy. It supports dynamic configuration updates, allowing changes to be made on the fly without requiring a restart. Twemproxy, on the other hand, requires a restart to apply configuration changes, which can result in downtime for applications.

  5. Monitoring and Metrics: McRouter provides built-in monitoring and metrics capabilities, allowing for easy monitoring of cache health, request rates, and other performance metrics. It also integrates with external monitoring systems such as Graphite and StatsD. Twemproxy, on the other hand, does not provide built-in monitoring or metrics capabilities. External tools or custom monitoring solutions must be used to monitor its performance.

  6. Development and Community: McRouter is actively developed and maintained by Facebook, a large technology company with significant resources and expertise. It has a vibrant community and regular updates, ensuring that it stays up to date with the latest features and improvements. Twemproxy, on the other hand, is an open-source project maintained by Twitter. While it has a dedicated user base, the development and updates may not be as frequent as McRouter.

In summary, McRouter and twemproxy have several key differences. McRouter supports automatic sharding, both Memcached and Redis protocols, advanced routing, flexible configuration updates, built-in monitoring and metrics, and has a strong development community. On the other hand, twemproxy requires manual sharding, only supports Memcached protocol, provides simple round-robin routing, requires restart for configuration changes, lacks built-in monitoring, and may have less frequent updates.

Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of McRouter
Pros of twemproxy
    Be the first to leave a pro
    • 4
      Scalable for Caches

    Sign up to add or upvote prosMake informed product decisions

    What is 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.

    What is twemproxy?

    twemproxy (pronounced "two-em-proxy"), aka nutcracker is a fast and lightweight proxy for memcached and redis protocol. It was built primarily to reduce the number of connections to the caching servers on the backend. This, together with protocol pipelining and sharding enables you to horizontally scale your distributed caching architecture.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use McRouter?
    What companies use twemproxy?
    See which teams inside your own company are using McRouter or twemproxy.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with McRouter?
    What tools integrate with twemproxy?

    Blog Posts

    Dec 22 2020 at 9:26PM

    Pinterest

    Amazon EC2C langMemcached+4
    10
    2624
    JavaScriptGitHubPython+42
    53
    21847
    What are some alternatives to McRouter and twemproxy?
    Redis
    Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.
    See all alternatives