Get Advice Icon

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

Redis

59.9K
45.9K
+ 1
3.9K
twemproxy

14
31
+ 1
4
Add tool

Redis vs twemproxy: What are the differences?

Introduction:

Redis and twemproxy are both popular software technologies used in building high-performance distributed systems. They have distinct features and purposes, which make them suitable for different use cases. Let's explore the key differences between Redis and twemproxy.

  1. Scalability: Redis is a single-server, in-memory data structure store that can support horizontal scaling through sharding and replication. It allows users to partition their data across multiple Redis instances, enabling high-performance and high-throughput applications. On the other hand, twemproxy, also known as Nutcracker, is a lightweight proxy developed by Twitter that helps in scaling out Redis infrastructure. It acts as a middle layer between Redis clients and Redis instances, providing connection pooling and load balancing while maintaining high availability. Unlike Redis, twemproxy is not responsible for data storage or replication.

  2. Data Persistence: Redis provides persistent storage capabilities by periodically saving data to disk or by appending every command to a log. It can either be configured to store data asynchronously or synchronously, providing flexibility in terms of data durability. Twemproxy, on the other hand, does not have data persistence built-in as it primarily focuses on routing client requests to Redis instances. This makes Redis a more suitable choice when data persistence is a critical requirement.

  3. Transaction Support: Redis supports atomic operations on individual data structures as well as the ability to batch multiple operations within a single transaction. This means that users can group multiple operations into a transaction and ensure that all operations within the transaction are executed in an all-or-nothing manner. Twemproxy, however, does not provide transaction support as it is primarily a proxy that routes client requests to Redis instances.

  4. Configuration and Management: Redis provides a comprehensive set of configuration options that allow users to fine-tune various aspects of its behavior, such as memory management, persistence, replication, and clustering. It also provides built-in monitoring and management tools through the Redis CLI or third-party solutions. Twemproxy, on the other hand, has a simpler configuration model focused on defining pools of Redis instances and their associated weights. Configuration changes in twemproxy usually require restarting the proxy process.

  5. Redis Modules: Redis supports the concept of modules, which allows developers to extend Redis functionality by adding new data types, commands, and functionalities. These modules can be developed independently and integrated seamlessly into Redis. Twemproxy, being a lightweight proxy, does not have built-in support for modules. This makes Redis more powerful and extensible when it comes to implementing custom functionalities beyond the core Redis features.

  6. Deployment Flexibility: Redis can be installed and deployed as a stand-alone server, cluster, or in a master-slave replication setup. It supports various deployment models based on user requirements and can be integrated seamlessly with cloud platforms such as Amazon Web Services (AWS) and Google Cloud Platform (GCP). Twemproxy, however, is typically deployed as a standalone proxy or in a cluster of proxies, routing client requests to Redis instances. It does not have built-in support for replication or clustering.

In Summary, Redis is a scalable, data storage solution with persistence, transaction support, and extensibility through modules. Twemproxy, on the other hand, is a lightweight proxy that provides connection pooling, load balancing, and routing of client requests to Redis instances.

Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Redis
Pros of twemproxy
  • 887
    Performance
  • 542
    Super fast
  • 514
    Ease of use
  • 444
    In-memory cache
  • 324
    Advanced key-value cache
  • 194
    Open source
  • 182
    Easy to deploy
  • 165
    Stable
  • 156
    Free
  • 121
    Fast
  • 42
    High-Performance
  • 40
    High Availability
  • 35
    Data Structures
  • 32
    Very Scalable
  • 24
    Replication
  • 23
    Pub/Sub
  • 22
    Great community
  • 19
    "NoSQL" key-value data store
  • 16
    Hashes
  • 13
    Sets
  • 11
    Sorted Sets
  • 10
    Lists
  • 10
    NoSQL
  • 9
    Async replication
  • 9
    BSD licensed
  • 8
    Integrates super easy with Sidekiq for Rails background
  • 8
    Bitmaps
  • 7
    Open Source
  • 7
    Keys with a limited time-to-live
  • 6
    Lua scripting
  • 6
    Strings
  • 5
    Awesomeness for Free
  • 5
    Hyperloglogs
  • 4
    Runs server side LUA
  • 4
    Transactions
  • 4
    Networked
  • 4
    Outstanding performance
  • 4
    Feature Rich
  • 4
    Written in ANSI C
  • 4
    LRU eviction of keys
  • 3
    Data structure server
  • 3
    Performance & ease of use
  • 2
    Temporarily kept on disk
  • 2
    Dont save data if no subscribers are found
  • 2
    Automatic failover
  • 2
    Easy to use
  • 2
    Scalable
  • 2
    Channels concept
  • 2
    Object [key/value] size each 500 MB
  • 2
    Existing Laravel Integration
  • 2
    Simple
  • 4
    Scalable for Caches

Sign up to add or upvote prosMake informed product decisions

Cons of Redis
Cons of twemproxy
  • 15
    Cannot query objects directly
  • 3
    No secondary indexes for non-numeric data types
  • 1
    No WAL
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    855
    246
    25.5K
    308
    37
    - No public GitHub repository available -

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

    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!

    Jobs that mention Redis and twemproxy as a desired skillset
    LaunchDarkly
    Oakland, California, United States
    What companies use Redis?
    What companies use twemproxy?
    Manage your open source components, licenses, and vulnerabilities
    Learn More

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

    What tools integrate with Redis?
    What tools integrate with twemproxy?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    Nov 20 2019 at 3:38AM

    OneSignal

    PostgreSQLRedisRuby+8
    9
    4803
    Jun 6 2019 at 5:11PM

    AppSignal

    RedisRubyKafka+9
    16
    1722
    GitHubDockerReact+17
    42
    37728
    What are some alternatives to Redis and twemproxy?
    Memcached
    Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
    MongoDB
    MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
    RabbitMQ
    RabbitMQ gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.
    Hazelcast
    With its various distributed data structures, distributed caching capabilities, elastic nature, memcache support, integration with Spring and Hibernate and more importantly with so many happy users, Hazelcast is feature-rich, enterprise-ready and developer-friendly in-memory data grid solution.
    Cassandra
    Partitioning means that Cassandra can distribute your data across multiple machines in an application-transparent matter. Cassandra will automatically repartition as machines are added and removed from the cluster. Row store means that like relational databases, Cassandra organizes data by rows and columns. The Cassandra Query Language (CQL) is a close relative of SQL.
    See all alternatives