HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
antirez
redis
C2009–2020
antirez / redis

redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.

142Distinct people
165Mentions
3Explicit recommenders
169GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.

GitHub

Where it is used

  • Sidekiq — Sidekiq uses Redis as the storage engine for all job and operational data. It connects to Redis by default and provides guidance for production configuration. Source

What people are saying

Ah I see. I didn't realize it was old, I just picked server.c since it just sounded like it'd have a decent mix of stuff. I think the only 'taste' things I mentioned is the…

mehrdadn used a recommendation phrase. 3 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 2:59:53 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year165 dated mentions

Observed mentions: 2009-09-03 00:45:38 UTC to 2020-06-30 21:42:49 UTC.

01020302009-01-01 00:00:00 UTC to 2010-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20092010-01-01 00:00:00 UTC to 2011-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2011-01-01 00:00:00 UTC to 2012-01-01 00:00:00 UTC (exclusive): 12 mentions; 3 submissions, 9 comments2012-01-01 00:00:00 UTC to 2013-01-01 00:00:00 UTC (exclusive): 18 mentions; 5 submissions, 13 comments2013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 12 mentions; 0 submissions, 12 comments2014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 7 mentions; 2 submissions, 5 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 17 mentions; 3 submissions, 14 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 26 mentions; 5 submissions, 21 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 16 mentions; 2 submissions, 14 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 27 mentions; 8 submissions, 19 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 16 mentions; 3 submissions, 13 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2020

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20092009-01-01 00:00:00 UTC2010-01-01 00:00:00 UTC211
20102010-01-01 00:00:00 UTC2011-01-01 00:00:00 UTC615
20112011-01-01 00:00:00 UTC2012-01-01 00:00:00 UTC1239
20122012-01-01 00:00:00 UTC2013-01-01 00:00:00 UTC18513
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC12012
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC725
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC17314
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC26521
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC16214
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC27819
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC16313
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC606

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
This document serves as both a quick start guide to Redis and a detailed resource for building it from source. New to Redis? Start with What is Redis and Getting Started Ready to build from source? Jump to Build Redis from Source Want to contribute? See the Code contributions section and CONTRIBUTING.md Looking for detailed documentation? Navigate to redis.io/docs Table of contents What is Redis? Key use cases Why choose Redis? What is Redis Open Source? Getting started Redis starter projects Using Redis with client libraries Using Redis with redis-cli Using Redis with Redis Insight Redis data types, processing engines, and capabilities Community Build Redis from source Build and run Redis with all data structures - Ubuntu 20.04 (Focal) Build and run Redis with all data structures - Ubuntu 22.04 (Jammy) / 24.04 (Noble) Build and run Redis with all data structures - Debian 11 (Bullseye) / 12 (Bookworm) Build and run Redis with all data structures - AlmaLinux 8.10 / Rocky Linux 8.10 Build and run Redis with all data structures - AlmaLinux 9.5 / Rocky Linux 9.5 Build and run Redis with all data structures - macOS 13 (Ventura) and macOS 14 (Sonoma) Build and run Redis with all data structures - macOS 15 (Sequoia) Building Redis - flags and general notes Fixing build problems with dependencies or cached build options Fixing problems building 32 bit binaries Allocator Monotonic clock Verbose build Running Redis with TLS Code contributions Redis Trademarks What is Redis? For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine. Key use cases Redis excels in various applications, including: Caching: Supports multiple eviction policies, key expiration, and hash-field expiration. Distributed Session Store: Offers flexible session data modeling (string, JSON, hash). Data Structure Server: Provides low-level data structures (strings, lists, sets, hashes, sorted sets, JSON, etc.) with high-level semantics (counters, queues, leaderboards, rate limiters) and supports transactions & scripting. NoSQL Data Store: Key-value, document, and time series data storage. Search and Query Engine: Indexing for hash/JSON documents, supporting vector search, full-text search, geospatial queries, ranking, and aggregations via Redis Query Engine. Event Store & Message Broker: Implements queues (lists), priority queues (sorted sets), event deduplication (sets), streams, and pub/sub with probabilistic stream processing capabilities. Vector Store for GenAI: Integrates with AI applications (e.g. LangGraph, mem0) for short-term memory, long-term memory, LLM response caching (semantic caching), and retrieval augmented generation (RAG). Real-Time Analytics: Powers personalization, recommendations, fraud detection, and risk assessment. Why choose Redis? Redis is a popular choice for developers worldwide due to its combination of speed, flexibility, and rich feature set. Here's why people choose Redis for: Performance: Because Redis keeps data primarily in memory and uses efficient data structures, it achieves extremely low latency (often sub-millisecond) for both read and write operations. This makes it ideal for applications demanding real-time responsiveness. Flexibility: Redis isn't just a key-value store, it provides native support for a wide range of data structures and capabilities listed in What is Redis? Extensibility: Redis is not limited to the built-in data structures, it has a modules API that makes it possible to extend Redis functionality and rapidly implement new Redis commands Simplicity: Redis has a simple, text-based protocol and well-documented command set Ubiquity: Redis is battle tested in production workloads at a massive scale. There is a good chance you indirectly interact with Redis several times daily Versatility: Redis is the de facto standard for use cases such as: Caching: quickly access frequently used data without needing to query your primary database Session management: read and write user session data without hurting user experience or slowing down every API call Querying, sorting, and analytics: perform deduplication, full text search, and secondary indexing on in-memory data as fast as possible Messaging and interservice communication: job queues, message brokering, pub/sub, and streams for communicating between services Vector operations: Long-term and short-term LLM memory, RAG content retrieval, semantic caching, semantic routing, and vector similarity search In summary, Redis provides a powerful, fast, and flexible toolkit for solving a wide variety of data management challenges. If you want to know more, here is a list of starting points: Introduction to Redis data types The full list of Redis commands Redis for AI Redis documentation What is Redis Open Source? Redis Community Edition (Redis CE) was renamed Redis Open Source with the v8.0 release. Redis Ltd. also offers Redis Software, a self-managed software with additional compliance, reliability, and resiliency for enterprise scaling, and Redis Cloud, a fully managed service integrated with Google Cloud, Azure, and AWS for production-ready apps. Read more about the differences between Redis Open Source and Redis here. Getting started If you want to get up and running with Redis quickly without needing to build from source, use one of the following methods: Redis Cloud Official Redis Docker images (Alpine/Debian) docker run -d -p 6379:6379 redis:latest Redis binary distributions Snap Homebrew RPM Debian Redis quick start guides If you prefer to build Redis from source - see instructions below. Redis starter projects To get started as quickly as possible in your language of choice, use one of the following starter projects: Python (redis-py) C#/.NET (NRedisStack/StackExchange.Redis) Go (go-redis) JavaScript (node-redis) Java/Spring (Jedis) Using Redis with client libraries T
Read the full README on GitHub

What Hacker News says

16 sources
randomdrake·Jul 14, 2017Recommendation phrase
antirez, this is easily one of my favorite comments I've seen on Hacker News in a number of years. In looking into what you've said here, I've learned that this is a bigger movement in software than I was aware of with projects like Drupal[1], CouchDB[2], and Django[3] taking similar stances. The github issue[4] spawning your change contains even more profoundly good ways of thinking about how software can do more, in the code itself, to "be the change you want to see." Bravo and thanks for pushing the envelope forward. Regardless of whether you agree with the changes, the fact that these discussions are occurring about the code that we write is really great. I love seeing how we can take code to a much different level than the 1s and 0s it is often reduced to in the mind. I'd love to see some other examples of similar movements in softwa
Read the rest
re whereby we are taking great care of the code we write as an author, historian, or any other writer would take care of their own words. [1] - https://www.drupal.org/node/2275877 [2] - https://issues.apache.org/jira/browse/COUCHDB-2248 [3] - https://code.djangoproject.com/ticket/22667 [4] - https://github.com/antirez/redis/issues/3185
In Redis 4.0
No, it doesn't work swimmingly. All of those projects have ended up either using void∗ or macros, or both, in order to roll their own generic data structures. > Look at Redis, https://github.com/antirez/redis/blob/unstable/src/adlist.h — generic doubly-linked list with void∗ https://github.com/antirez/redis/blob/unstable/src/dict.h — generic hash table with void∗ > or git https://github.com/git/git/blob/master/hashmap.h — generic hash table with void∗ https://github.com/git/git/blob/master/list.h — generic doubly linked list implemented with macros > or postgresql https://github.com/postgres/postgres/blob/master/src/include... — generic doubly linked list implemented with macros https://github.com/postgres/postgres/blob/master/src/include... — generic red-black tree with void∗
In Go and Simplicity Debt
The problem for many third party softwares that motivates them to bypass the package management is that the lag time for Debian and Ubuntu LTS releases is huge. People going the apt route are going to be stuck with redis 3.0.6 from 2015 for years. * http://packages.ubuntu.com/xenial/redis-server Some softwares, such as MySQL Community Edition, come with third-party-made packages, and the instructions are "Add us to your package manager's list of repositories; and pull Debian/Ubuntu packges from us.". The downsides of this are: ... for the system administrator, the necessity of a degree of trust that the third-party package repository will not sneak in bad versions of other packages. Package managers are not good at allowing system administrators to control and to limit what systems will pull from individual repositories. ... for the th
Read the rest
ird party developers, the need to know how to build Debian/Ubuntu packages, and to keep up to date with all of the integration work that the Debian/Ubuntu maintainers would be doing for them, including all of the Debian/Ubuntu patches. * https://sources.debian.net/src/redis/2:3.0.6-1/debian/patche... This highlights a problem with the quickstart guide that you got wrong. It does not make the user install systemd service scripts. It makes the user install van Smoorenburg rc scripts, complete with PID file nonsense, run levels, hand-rolled log management, and a lack of correct (or indeed any) LSB headers. This is two init systems behind the times for Ubuntu, which was upstart before it was systemd, and which hasn't been van Smoorenburg rc for over a decade now. Ironically, the systemd service units are some of the very things that are added on by the Debian/Ubuntu maintainers that one loses by not going the Debian/Ubuntu packaging route: * https://sources.debian.net/src/redis/2:3.0.6-1/debian/redis-... * https://sources.debian.net/src/redis/2:3.0.6-1/debian/redis-... Adding systemd service units to redis proper, in contrast, has been stalled for a while now: * https://github.com/antirez/redis/pull/2004 * https://github.com/antirez/redis/issues/3251
In Properly setting up Redis and Sidekiq in production on Ubuntu 16.04
Yeah I agree splitting functionality into separate headers is a good idea. But I feel like the rule "don't include headers in headers" is good advice in lots of situations. Redis is often thrown around as an example of an excellent, clean C source code base. Look at server.h. It has 34 include statements. Would you rather that every C file that includes server.h have to include these 34 files before including server.h? Seems insane to me. https://github.com/antirez/redis/blob/unstable/src/server.h
In Notes on Programming in C – Rob Pike (1989)
A URL to the actual source helps, I think, to put it in context: https://github.com/antirez/redis/blob/d680eb6dbdf2d2030cb96e... The parent poster didn't link, so I lacked the context to really evaluate it. Your persistence at waving this away as "making sense with background knowledge of the algorithm internals" drove me to find it. > If I recall correctly, the file you grabbed these from had a lot of comments that thoroughly explain how it works It's fairly light on comments. Not completely devoid of them, but the code can't stand in isolation. The algorithm itself, LZF, seems to be a variation of LZO, but not notable enough to make Wikipedia. > They could have named it "FIRST" or whatever FRST is short for. The fact that you're unsure of this fact defeats your next point, at least for me: > That would have made zero impact to the code
Read the rest
quality Why? One extra letter immediately disambiguates it, and now we know that it at least means "first". > a longer name would make things clumsy If you look at the file it's used in, it has exactly two uses. The readability gained from the extra vowel in this case is well worth it, and would in no way make the code "clumsy". A four-byte (five if you count the commented out code) change so that the reader doesn't need to play guess-the-word? Worth it, in my opinion. The documentation above it too, > just believe me, it works ;) But why does it work? We'll never know, b/c that's bound up in the author's head.
In Ask HN: What are some examples of good code?
Not Ruby but for C code, I like Redis's code: https://github.com/antirez/redis/tree/unstable/src I don't personally use the product, but I find the source well written and always share it as an example of nicely done C code. Here is some nice Erlang code I like -- network packet parsing: https://github.com/msantos/pkt/tree/master/src Notice how concise this is: codec( <<4:4, HL:4, ToS:8, Len:16, Id:16, 0:1, DF:1, MF:1, %% RFC791 states it's a MUST Off:13, TTL:8, P:8, Sum:16, SA1:8, SA2:8, SA3:8, SA4:8, DA1:8, DA2:8, DA3:8, DA4:8, Rest/binary>> ) when HL >= 5 -> ... This is due to the beauty of binary pattern matching. You could kind of do it in C by casting to a struct but notice here it is also calculating header length (HL) as part of the match operation. So it can do a bit more than ju
Read the rest
st casting a binary blob to a struct. Another thing here is that it is also big endian by default so there is not need for htons(), htonl() and such functions sprinkled throughout the code.
In Ask HN: What are some examples of good code?
There's a huge difference between abusing people and refusing to coddle them, and I'm not sure this article reflects that very well. "unless I help create environments where all participants are willing to speak up" is an example of actively trying to appeal to a group of people, not an example of not abusing people. It might be a worthy goal, but let's not use words like "abuse" so lightly. > abuse newcomers for still being in the process of learning Project maintainers have a finite amount of available time, and dealing with inexperienced people who are wasting your time, even if they have perfectly good intentions, is simply not practical. To pick on Linus, since he's mentioned in this article, he has no choice except to be an asshole to people who try to add shitty stuff to Linux, because if he didn't scare those people off, he would
Read the rest
waste all his time politely turning them away and never get anything done. I have a few projects I've done over the years that have evidently reached a fair number of people, and I have to ignore probably 90% of the emails and github interactions I receive from people because the requests are often very stupid and unproductive. I can't imagine how bad it must be for a huge project like Linux. And then, towards the beginning and end of the article, the author gets into stuff like encouraging diversity (not sure what they mean by that) and going to feminist workshops. Maybe that's a good idea for some people, who knows, but not really wanting to spend your time on stuff like that does not mean you are "abusing" contributors in some way. It's a dishonest and dirty rhetorical trick to try to conflate "extensive personal abuse" and failing to sufficiently immerse oneself in the political culture advocated in the article. Ironically, one of the things that scares me the most about interacting with the open source community is people like this, who demand that you invest time and resources into whatever "inclusive" political ideology they're trying to sell you, or else you're actively harming (abusing!) other people in the community. They try to subvert otherwise productive communities, making politically motivated and technically useless pull requests (e.g. https://github.com/antirez/redis/issues/3185) or institute political rules called things like "codes of conduct" that allow them to exclude people that don't agree with whatever they're advocating under the banner of inclusivity.
In Abusing Contributors is not OK

Showing the 15 most recent of 16 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.