What is Memcached and what are its top alternatives?
Memcached is a widely used open-source, high-performance, distributed memory-caching system. It is designed to speed up dynamic web applications by alleviating database load. Memcached stores data in memory to reduce the number of times an external data source (such as a database or API) must be accessed to retrieve data. This results in faster response times and improved overall performance. However, Memcached has limitations such as lack of built-in security features, limited data storage capabilities, and potential data loss in case of server failures.
- Redis: Redis is a popular in-memory data structure store known for its speed and flexibility. It supports various data structures, replication, and clustering features. Pros: Rich data structure support, persistence options, and high availability. Cons: More memory usage compared to Memcached.
- Apache Ignite: Apache Ignite is an in-memory computing platform that provides high-performance, distributed in-memory data storage and processing. It offers features like data replication, SQL queries, and machine learning capabilities. Pros: Scalability, durability, and SQL support. Cons: Higher learning curve compared to Memcached.
- Ehcache: Ehcache is an open-source, Java-based cache library that can be used as a standalone in-process cache or a distributed cache. It supports features like memory management, disk stores, and cache replication. Pros: Simple configuration, integration with Java applications. Cons: Limited to Java ecosystem.
- Couchbase: Couchbase is a NoSQL, distributed database that offers in-memory caching capabilities along with features like data replication, cluster management, and full-text search. Pros: Integrated database and cache solution, high availability. Cons: More complex setup compared to Memcached.
- Hazelcast: Hazelcast is an open-source, in-memory data grid platform that provides distributed caching, clustering, and real-time data processing capabilities. It supports features like data partitioning, event processing, and cluster-wide locks. Pros: High scalability, fault tolerance, and near-zero latency. Cons: Complexity in setting up and configuring.
- GridGain: GridGain is an in-memory computing platform that offers distributed caching, data processing, and analytics capabilities. It supports features like SQL queries, ACID transactions, and machine learning algorithms. Pros: High performance, scalability, and data consistency. Cons: Cost associated with enterprise features.
- RocksDB: RocksDB is an embeddable, persistent key-value store designed for fast storage. It is optimized for SSD storage and offers features like high write throughput, efficient memory utilization, and customizable compaction options. Pros: High performance, low latency reads and writes. Cons: More suitable for persistent storage rather than pure caching.
- Aerospike: Aerospike is a NoSQL database that can be used as a high-performance distributed cache as well. It offers features like scalable architecture, strong consistency, and multi-tenancy support. Pros: High throughput, low latency, and automatic data distribution. Cons: Requires more resources compared to Memcached.
- Gemfire: Apache Geode, formerly known as Pivotal GemFire, is an in-memory data grid platform that provides distributed caching and real-time data processing capabilities. It offers features like data replication, event handling, and transaction management. Pros: High availability, durability, and event-driven architecture. Cons: Complexity in configuration and deployment.
- Infinispan: Infinispan is an open-source, distributed in-memory data grid platform written in Java. It offers features like data partitioning, cluster-wide synchronization, and custom eviction policies. Pros: Scalability, fault tolerance, and near-real-time data access. Cons: Java-centric ecosystem, learning curve for non-Java developers.
Top Alternatives to Memcached
- 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. ...
- Ehcache
Ehcache is an open source, standards-based cache for boosting performance, offloading your database, and simplifying scalability. It's the most widely-used Java-based cache because it's robust, proven, and full-featured. Ehcache scales from in-process, with one or more nodes, all the way to mixed in-process/out-of-process configurations with terabyte-sized caches. ...
- Varnish
Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents. Varnish Cache is really, really fast. It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture. ...
- 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. ...
- 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. ...
- Couchbase
Developed as an alternative to traditionally inflexible SQL databases, the Couchbase NoSQL database is built on an open source foundation and architected to help developers solve real-world problems and meet high scalability demands. ...
- Memcached Cloud
Memcached Cloud is a fully-managed service for running your Memcached in a reliable and fail-safe manner. Your dataset is constantly replicated, so if a node fails, an auto-switchover mechanism guarantees data is served without interruption. Memcached Cloud provides various data persistence options as well as remote backups for disaster recovery purposes. ...
- etcd
etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines. It’s open-source and available on GitHub. etcd gracefully handles master elections during network partitions and will tolerate machine failure, including the master. ...
Memcached alternatives & related posts
- Performance886
- Super fast542
- Ease of use513
- In-memory cache444
- Advanced key-value cache324
- Open source194
- Easy to deploy182
- Stable164
- Free155
- Fast121
- High-Performance42
- High Availability40
- Data Structures35
- Very Scalable32
- Replication24
- Great community22
- Pub/Sub22
- "NoSQL" key-value data store19
- Hashes16
- Sets13
- Sorted Sets11
- NoSQL10
- Lists10
- Async replication9
- BSD licensed9
- Bitmaps8
- Integrates super easy with Sidekiq for Rails background8
- Keys with a limited time-to-live7
- Open Source7
- Lua scripting6
- Strings6
- Awesomeness for Free5
- Hyperloglogs5
- Transactions4
- Outstanding performance4
- Runs server side LUA4
- LRU eviction of keys4
- Feature Rich4
- Written in ANSI C4
- Networked4
- Data structure server3
- Performance & ease of use3
- Dont save data if no subscribers are found2
- Automatic failover2
- Easy to use2
- Temporarily kept on disk2
- Scalable2
- Existing Laravel Integration2
- Channels concept2
- Object [key/value] size each 500 MB2
- Simple2
- Cannot query objects directly15
- No secondary indexes for non-numeric data types3
- No WAL1
related Redis posts
StackShare Feed is built entirely with React, Glamorous, and Apollo. One of our objectives with the public launch of the Feed was to enable a Server-side rendered (SSR) experience for our organic search traffic. When you visit the StackShare Feed, and you aren't logged in, you are delivered the Trending feed experience. We use an in-house Node.js rendering microservice to generate this HTML. This microservice needs to run and serve requests independent of our Rails web app. Up until recently, we had a mono-repo with our Rails and React code living happily together and all served from the same web process. In order to deploy our SSR app into a Heroku environment, we needed to split out our front-end application into a separate repo in GitHub. The driving factor in this decision was mostly due to limitations imposed by Heroku specifically with how processes can't communicate with each other. A new SSR app was created in Heroku and linked directly to the frontend repo so it stays in-sync with changes.
Related to this, we need a way to "deploy" our frontend changes to various server environments without building & releasing the entire Ruby application. We built a hybrid Amazon S3 Amazon CloudFront solution to host our Webpack bundles. A new CircleCI script builds the bundles and uploads them to S3. The final step in our rollout is to update some keys in Redis so our Rails app knows which bundles to serve. The result of these efforts were significant. Our frontend team now moves independently of our backend team, our build & release process takes only a few minutes, we are now using an edge CDN to serve JS assets, and we have pre-rendered React pages!
#StackDecisionsLaunch #SSR #Microservices #FrontEndRepoSplit
Our whole DevOps stack consists of the following tools:
- GitHub (incl. GitHub Pages/Markdown for Documentation, GettingStarted and HowTo's) for collaborative review and code management tool
- Respectively Git as revision control system
- SourceTree as Git GUI
- Visual Studio Code as IDE
- CircleCI for continuous integration (automatize development process)
- Prettier / TSLint / ESLint as code linter
- SonarQube as quality gate
- Docker as container management (incl. Docker Compose for multi-container application management)
- VirtualBox for operating system simulation tests
- Kubernetes as cluster management for docker containers
- Heroku for deploying in test environments
- nginx as web server (preferably used as facade server in production environment)
- SSLMate (using OpenSSL) for certificate management
- Amazon EC2 (incl. Amazon S3) for deploying in stage (production-like) and production environments
- PostgreSQL as preferred database system
- Redis as preferred in-memory database/store (great for caching)
The main reason we have chosen Kubernetes over Docker Swarm is related to the following artifacts:
- Key features: Easy and flexible installation, Clear dashboard, Great scaling operations, Monitoring is an integral part, Great load balancing concepts, Monitors the condition and ensures compensation in the event of failure.
- Applications: An application can be deployed using a combination of pods, deployments, and services (or micro-services).
- Functionality: Kubernetes as a complex installation and setup process, but it not as limited as Docker Swarm.
- Monitoring: It supports multiple versions of logging and monitoring when the services are deployed within the cluster (Elasticsearch/Kibana (ELK), Heapster/Grafana, Sysdig cloud integration).
- Scalability: All-in-one framework for distributed systems.
- Other Benefits: Kubernetes is backed by the Cloud Native Computing Foundation (CNCF), huge community among container orchestration tools, it is an open source and modular tool that works with any OS.
- Way Faster than Redis and Elasticache Redis1
- Easy setup1
- Simpler to run in testing environment1
- Container doesn't have to be running for local tests1
related Ehcache posts
- High-performance104
- Very Fast67
- Very Stable57
- Very Robust44
- HTTP reverse proxy37
- Open Source21
- Web application accelerator18
- Easy to config11
- Widely Used5
- Great community4
- Essential software for HTTP2
related Varnish posts
Around the time of their Series A, Pinterest’s stack included Python and Django, with Tornado and Node.js as web servers. Memcached / Membase and Redis handled caching, with RabbitMQ handling queueing. Nginx, HAproxy and Varnish managed static-delivery and load-balancing, with persistent data storage handled by MySQL.
We're using Git through GitHub for public repositories and GitLab for our private repositories due to its easy to use features. Docker and Kubernetes are a must have for our highly scalable infrastructure complimented by HAProxy with Varnish in front of it. We are using a lot of npm and Visual Studio Code in our development sessions.
- High Availibility11
- Distributed Locking6
- Distributed compute6
- Sharding5
- Load balancing4
- Map-reduce functionality3
- Simple-to-use3
- Written in java. runs on jvm3
- Publish-subscribe3
- Sql query support in cluster wide3
- Optimis locking for map2
- Performance2
- Multiple client language support2
- Rest interface2
- Admin Interface (Management Center)1
- Better Documentation1
- Easy to use1
- Super Fast1
- License needed for SSL4
related Hazelcast posts
- Document-oriented storage827
- No sql593
- Ease of use553
- Fast464
- High performance410
- Free255
- Open source218
- Flexible180
- Replication & high availability145
- Easy to maintain112
- Querying42
- Easy scalability39
- Auto-sharding38
- High availability37
- Map/reduce31
- Document database27
- Easy setup25
- Full index support25
- Reliable16
- Fast in-place updates15
- Agile programming, flexible, fast14
- No database migrations12
- Easy integration with Node.Js8
- Enterprise8
- Enterprise Support6
- Great NoSQL DB5
- Support for many languages through different drivers4
- Schemaless3
- Aggregation Framework3
- Drivers support is good3
- Fast2
- Managed service2
- Easy to Scale2
- Awesome2
- Consistent2
- Good GUI1
- Acid Compliant1
- Very slowly for connected models that require joins6
- Not acid compliant3
- Proprietary query language2
related MongoDB posts
I just finished the very first version of my new hobby project: #MovieGeeks. It is a minimalist online movie catalog for you to save the movies you want to see and for rating the movies you already saw. This is just the beginning as I am planning to add more features on the lines of sharing and discovery
For the #BackEnd I decided to use Node.js , GraphQL and MongoDB:
Node.js has a huge community so it will always be a safe choice in terms of libraries and finding solutions to problems you may have
GraphQL because I needed to improve my skills with it and because I was never comfortable with the usual REST approach. I believe GraphQL is a better option as it feels more natural to write apis, it improves the development velocity, by definition it fixes the over-fetching and under-fetching problem that is so common on REST apis, and on top of that, the community is getting bigger and bigger.
MongoDB was my choice for the database as I already have a lot of experience working on it and because, despite of some bad reputation it has acquired in the last months, I still believe it is a powerful database for at least a very long list of use cases such as the one I needed for my website
I am starting to become a full-stack developer, by choosing and learning .NET Core for API Development, Angular CLI / React for UI Development, MongoDB for database, as it a NoSQL DB and Flutter / React Native for Mobile App Development. Using Postman, Markdown and Visual Studio Code for development.
- High performance18
- Flexible data model, easy scalability, extremely fast18
- Mobile app support9
- You can query it with Ansi-92 SQL7
- All nodes can be read/write6
- Equal nodes in cluster, allowing fast, flexible changes5
- Both a key-value store and document (JSON) db5
- Open source, community and enterprise editions5
- Automatic configuration of sharding4
- Local cache capability4
- Easy setup3
- Linearly scalable, useful to large number of tps3
- Easy cluster administration3
- Cross data center replication3
- SDKs in popular programming languages3
- Elasticsearch connector3
- Web based management, query and monitoring panel3
- Map reduce views2
- DBaaS available2
- NoSQL2
- Buckets, Scopes, Collections & Documents1
- FTS + SQL together1
- Terrible query language3
related Couchbase posts
We implemented our first large scale EPR application from naologic.com using CouchDB .
Very fast, replication works great, doesn't consume much RAM, queries are blazing fast but we found a problem: the queries were very hard to write, it took a long time to figure out the API, we had to go and write our own @nodejs library to make it work properly.
It lost most of its support. Since then, we migrated to Couchbase and the learning curve was steep but all worth it. Memcached indexing out of the box, full text search works great.
Hey, we want to build a referral campaign mechanism that will probably contain millions of records within the next few years. We want fast read access based on IDs or some indexes, and isolation is crucial as some listeners will try to update the same document at the same time. What's your suggestion between Couchbase and MongoDB? Thanks!
Memcached Cloud
- High-availability6
- Heroku add-on6
- Fast3
- Email alerts2
- Fail-safe2
- 24/7 monitoring & support1
- Backups and import1
- Offered by Redis Labs1
- Auto-switchover1
- Seamless scalability1
related Memcached Cloud posts
etcd
- Service discovery11
- Fault tolerant key value store6
- Secure2
- Bundled with coreos2
- Consol integration1
- Privilege Access Management1
- Open Source1