Redis VS Memcached for cache

I am exploring the world of technology and playing with them. Like a kid, breaking them and modiy them.
Search for a command to run...

I am exploring the world of technology and playing with them. Like a kid, breaking them and modiy them.
No comments yet. Be the first to comment.
From last year (July~August), I am working on an open source PaaS to deploy and manage applications easily on any VPS. I have a motive to create a solution which you once setup on your cloud, you will get same kind of experience like other platforms ...

This blog is coming after a long time [almost 3 weeks]. Throughout this week, the main tasks involved were - Update the docker setup to make it more convenient Test the docker setup in all OS [Linux, Mac, Windows] Rewrite Documentation Revamp Do...

Finally, On July 14, I received this email about passing the midterm evaluation 🎉🎉. You can check out the blog on the phase 1 report here: https://blog.circuitverse.org/posts/tanmoy_sarkar_phase_1_report/ You should check other blogs here: https:/...

At the start, this week's main focus was completing the RBS integration. But that does not go well due to having issues with rbs_rails Gem. So I raised PR in rbs_rails the gem repository about the issue to get some hints from the maintainers. You can...

This week was more on learning rather than coding. The main objectives of this week were Learn RBS to start working on it Generate code coverage report and write the missing unit-tests Split Solargraph PR to small PRs for better review Learn RB...

Redis is an open-source, in-memory data structure store, used as a database, cache, and message broker.
Memcached is a distributed, high-performance, in-memory caching system. It is used to temporarily store and serve frequently requested data from memory.
Both are key-value storage
Both system store data in memory or RAM
Both Redis and Memcached are capable of running on multiple servers
Redis: This supports various ranges of data types based on the additional module and some built-in support. Some data types: strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperlog, and geospatial indexes with radius queries
Memcached: This support only string as the value in key-value entry
Memcached doesn't support transactions, although its operations are atomic.
Redis provides out-of-the-box support for transactions to execute commands.
Redis uses a single-core architecture.
Memcached implements a multi-threaded architecture by utilizing multiple cores.
I know this portion is a little bit out of topic. But I have seen, in many blogs or youtube videos, shows redis is the key-value store only to just cache or temporary database.
So let's know a little bit about the full potential of Redis.

By enabling different modules, we can achieve the full potential
RedisJSON to store JSON database directly in Redis.
RedisGraph is a graph database built on Redis. This graph database uses GraphBlas under the hood for its sparse adjacency matrix graph representation.
RedisSearch is a high-performance, full-text search engine that is built as a Redis module, offering efficient indexing and querying capabilities for text-based data within Redis.
RedisTimeSeries is a Redis module for efficiently storing and querying time-series data, providing functionality for querying and analyzing time-stamped data, such as metrics, events, and logs.
RedisBloom is a Redis module that provides scalable probabilistic data structures, such as Bloom filters, counting filters, and others, to support high-performance and memory-efficient data analysis and storage operations.
After seeing the modules and capability of Redis, we can only think of this

Here we need to think about the data structure.
The best case to use Memcached over Redis
The cached data format is plain string data to cache like HTML pages, CSS, JS or anything other than that.
The dataset size is going to be very large in future
If these two conditions are satisfied then it will be best to go with Memcached.
In other cases, you can go with Redis.
We have reached the end of this blog.
