Memcached vs. Redis
Let's compare Memcached and Redis.
Introduction
This lesson discusses some of the real-world implementations of distributed cache that are widely adopted. Our focus will be on two well-known open-source, highly scalable, highly performant, and robust caching tools - Memcached and Redis. Both these techniques follow the client-server model and achieve a latency of sub-millisecond. Let’s dive deep into each one of them and then compare their usefulness.
1. Memcached
Memcached, introduced in 2003, is a key-value store distributed cache designed to store objects very fast. Memcached stores data in the form of key-value pair. Both the key and the value are strings. This means that any data stored will have to be
Memcached has a client and server component each of which is necessary to run the system. The system is designed such that half the logic is encompassed in the server whereas the other half is in the client. However, each server follows the Shared-Nothing architecture. i.e., servers are unaware of each other and there is no synchronization, data sharing, and communication between the servers.
Due to the disconnected design, Memcached is able to achieve almost a deterministic query speed (O(1)) serving millions of keys per second using a high-end system. Thus, Memcached offers a high throughput and low latency.
As evident from the design of a typical Memcached cluster, Memcached scales well horizontally. The client process is usually maintained with the service host that is also interacting with the authoritative storage (backend database).
Facebook and
...Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy