What is Redis and what is it used for? Cache, sessions and queues explained
Published on 2026-10-20 by frfrand
Redis explained from scratch: what it stores in memory, when to use it for caching, sessions or queues, and why it doesn't automatically replace PostgreSQL.

Short answer: Redis is a fast data server that works mainly in memory and offers structures such as strings, hashes, lists, sets, and streams. In applications it is used to store temporary results, count events, manage sessions, or coordinate certain tasks. It is not an automatic replacement for PostgreSQL: it depends on the problem.
The coffee shop example
If every time a customer asks the price of a coffee the waiter has to go down to the storeroom to get the list, there is a lot of repeated work. It is more convenient to keep an updated copy next to the cash register. That illustrates the idea of a cache, one of the best-known uses of Redis.
Data that is frequently queried can be stored temporarily to avoid repeated calculations or queries. The difficult part is not storing them: it is knowing when they are no longer correct.
Why is it fast?
Redis uses memory as the central piece of its operation. RAM usually allows faster operations than reading from disk, although the network, the chosen operations, and the size of the data also influence.
Unlike a simple text file, Redis knows structures. You can increment a counter, add elements to a set, or read messages from a stream without implementing all that manually in your application.
Three uses that make sense
Product cache. A store shows the same categories to hundreds of visitors. The application queries PostgreSQL once and keeps the response for a short period. Subsequent requests can reuse it. But if prices or stock change, you need to invalidate the copy or set a sensible expiration.
User sessions. Some architectures store temporary states with expiration. Redis can be useful, provided you don't confuse speed with security: protect access and design what happens when it restarts.
Job queues. A website needs to process a PDF without blocking the response to the user. Some solutions use Redis as part of the coordination between application and workers. The entire system must contemplate repeated tasks, failures, and confirmations.
Can it lose data?
Redis offers persistence options, such as snapshots and operation logs, with different performance and recovery trade-offs. But using Redis does not guarantee that your data is backed up. Keys can also expire, and certain policies may delete them to free up memory.
If you store critical information, verify persistence, recovery, replication, and backups before putting the service into production. For a shopping cart, for example, losing information can have very different consequences than losing an image cache.
Redis vs PostgreSQL
PostgreSQL organizes relational information and allows complex queries and transactions. Redis can speed up accesses and work with specialized structures. They often coexist: real orders remain in PostgreSQL and certain repetitive results are stored for a while in Redis.
Do not add Redis to a small project just because it appears in a famous architecture. First measure if there is a bottleneck.
Common mistakes
One: opening Redis directly to the Internet without protecting credentials or the network. Two: storing temporary information without controlling its expiration. Three: using the cache to hide poorly designed queries. Four: thinking that a queue does not need to manage failures if it works in tests.
Redis in ArduMaker
In ArduMaker, Redis is one of the apps installed on a VPS from the panel (or via MCP). It is installed with a password and a memory limit of 256 MB by default, and from the panel you see its status and configuration, manage keys, change the password, and can force a disk save (SAVE or BGSAVE).
By default it remains accessible only from within the VPS. If another server needs to connect, external access is enabled, encrypted with TLS and limited to an IP list; another ArduMaker VPS in the same location, instead, connects via an SSH tunnel. It is the answer to the first error in the previous list: there is no need to open Redis to the entire Internet. The persistence policy and backups of what you store remain your decision.
In summary: Redis stands out for its speed and its data structures. Choose it for a specific case, not to indiscriminately replace other databases.
Frequently Asked Questions
Does Redis need a password if I only use it on my server?
It is advisable that it has one anyway. Having it listen only on the local machine greatly reduces exposure, but a password (or users with ACL) prevents any process or person with access to the server from reading or deleting the keys.
What is the difference between Redis and Memcached?
Both serve as in-memory cache. Memcached is limited to simple key-value pairs; Redis adds data structures (lists, sets, hashes, streams), persistence options, and replication. For a simple cache, either one can work.
Sources: Data types in Redis · Persistence in Redis · Databases: why there are different types.
