Redis
Welcome to the Redis learning hub. This section covers Redis’s in-memory architecture, internal workings, and best practices for building high-performance applications.
Articles
Core Concepts
-
Redis Internals: How It Achieves Sub-Millisecond Performance
- O(1) hash table lookups and bucket structure
- Single-threaded event loop with IO multiplexing
- Incremental rehashing and collision handling
- Why Redis is blazingly fast
-
- Docker, macOS, Ubuntu, CentOS, Windows installation
- Build from source
- Redis Cloud setup
- Basic commands and configuration
Data Structures
-
- Basic string operations and counters
- Session tokens, page views, rate limiting
- JSON storage and caching patterns
- Node.js and Python examples
-
- Queues (FIFO) and Stacks (LIFO)
- Activity feeds and chat messages
- Blocking operations and producer-consumer patterns
- Node.js and Python examples
-
- Unique item tracking and memberships
- Finding common items (intersection, union, difference)
- Tagging systems and permissions
- Node.js and Python examples
-
- User profiles and product inventory
- Session data and shopping carts
- Efficient object storage
- Node.js and Python examples
-
- Leaderboards and rankings
- Rate limiting with sliding windows
- Priority queues and trending topics
- Node.js and Python examples
-
- Activity logs and audit trails
- Chat messages and event processing
- Consumer groups for reliable delivery
- Node.js and Python examples
Setup & Operations (Coming Soon)
- Persistence — RDB snapshots, AOF logging
- Scaling — Replication, clustering, high availability
Learning Path
- Start with Redis Internals to understand how Redis achieves its speed
- Set up Redis locally using Docker or your preferred method
- Learn Strings — the foundation for caching and counters
- Explore Lists for queues and Sets for unique items
- Use Hashes for objects and Sorted Sets for rankings
- Master Streams for event-driven architectures
Each article includes Node.js (ioredis) and Python (redis-py) examples for practical implementation.