About Memcached
Memcached is an in-memory key/value cache store designed for distributed systems. Applications place frequently read data, such as query results or rendered fragments, in memory so they can skip slower backends. It is a long-established building block of web infrastructure and is released as open source under the BSD-3-Clause license.
The server is written in C, uses multiple threads and an event-based design built on libevent, and keeps its interface simple. Optional build features include TLS support through OpenSSL, process restrictions on Linux through libseccomp, and an experimental proxy mode. It can be compiled from a release tarball or from the git repository using the standard autotools workflow.
The project provides documentation on its website, including a tutorial, a wiki and a guide for diagnosing timeouts and odd behavior. Questions are handled through a mailing list rather than GitHub issues. Because it is a cache, operators typically run it on dedicated machines and avoid swapping when large memory is allocated.
Key features
- In-memory key/value storage for caching
- Multithreaded, event-based server in C
- Optional TLS support via OpenSSL
- Optional libseccomp process restrictions on Linux
- Experimental proxy mode
- Builds from tarball or git source
Good fit for
- →Caching database query results
- →Sharing session data across web servers
- Built with
- C
- Tags
- cache
- key-value
- in-memory
- distributed-systems
- infrastructure
- performance
- self-hosted
Memcached: questions and answers
- What is Memcached used for?
- Memcached is a multithreaded, event-driven in-memory key/value cache used to speed up distributed applications by keeping hot data in RAM. It is a good fit for caching database query results and sharing session data across web servers.
- Is Memcached open source?
- Yes. Memcached is open source under the BSD-3-Clause licence. Its source code is on GitHub at memcached/memcached and is written mainly in C.
- Is Memcached free?
- Yes. Memcached is open source, so the software itself is free to use.
- Can I self-host Memcached?
- Yes. Memcached can be self-hosted on your own server or infrastructure.
- What is Memcached an alternative to?
- Memcached is an open-source alternative to Amazon ElastiCache, Google Memorystore and Momento. Other open-source alternatives to Amazon ElastiCache include Valkey, Redis and Dragonfly.
- Is Memcached actively maintained?
- Yes. The most recent commit to Memcached was on 11 September 2026. The project has 14k stars on GitHub.
Open-source alternatives to Memcached
See all
Valkey
Databases
A flexible distributed key-value database that is optimized for caching and other realtime
BSD-3-Clausevs Upstash★ 27k
Redis
Databases
For developers, who are building real-time data-driven applications, Redis is the preferre
OSSvs Upstash★ 77k
Dragonfly
Databases
A modern replacement for Redis and Memcached
OSSvs Upstash★ 32k
Garnet
Databases
Garnet is a remote cache-store from Microsoft Research that offers strong performance (thr
MITvs Upstash★ 12k
DiceDB
Databases
Open-source, low-latency key/value engine built on Valkey with query subscriptions and hie
OSSvs Upstash★ 11k
etcd
Databases
Distributed reliable key-value store for the most critical data of a distributed system
Apache-2.0★ 52k
SaaS alternatives to Memcached
See all
Amazon ElastiCache
Databases
Managed in-memory caching service on AWS for Redis OSS, Valkey and Memcached
SaaS
Google Memorystore
Databases
Managed in-memory data store on Google Cloud for Redis, Valkey and Memcached
SaaS
Momento
Databases
Serverless cache and pub/sub service with no infrastructure to manage
SaaS
Amazon MemoryDB
Databases
Durable in-memory database service on AWS compatible with Valkey and Redis OSS
SaaS
Aerospike
Databases
Real-time NoSQL database for low-latency, high-throughput applications
SaaS
Amazon DynamoDB
Databases
Serverless key-value and document database from AWS
SaaS

