Redis Core Knowledge for Java Backend Interviews
What is Redis
Redis is a high‑performance, in‑memory key‑value database that also supports optional data persistence. It is open‑source and written in C, widely used both as a cache and as a primary datastore for specialised scenarios.
Why Redis Is So Fast
In‑memory storage – data is served directly from RAM, avoiding disk I/O for most operati ...
Posted on Sat, 16 May 2026 00:09:43 +0000 by dave420
Addressing Cache Anomalies and Advanced Redis Mechanisms
Cache Anomalies
Cache Penetration: Requested data does not exist in the system.
Use a Bloom filter.
Cache Breakdown: A hot key expires.
Implement mutual exclusion locks.
Apply logical expiration (no actual TTL set).
Cache Avalanche: Numerous keys expire simultaneously.
Assign random expiration times.
Deploy a Redis cluster.
Cache Pen ...
Posted on Fri, 15 May 2026 18:47:14 +0000 by tekkenlord
Redis List Operations: Creation, Deletion, Update, and Query
Creating Lists
LPUSH
The LPUSH command adds one or more elements to the beginning of a list.
127.0.0.1:6379> lpush mylist item0 item1 item2
(integer) 3
127.0.0.1:6379> lrange mylist 0 3
1) "item2"
2) "item1"
3) "item0"
127.0.0.1:6379> lpush mylist item3
(integer) 4
127.0.0.1:6379> lrange mylist 0 4
1) & ...
Posted on Fri, 15 May 2026 18:11:46 +0000 by jyushinx
Implementing SMS Authentication and Shop Caching with Redis
SMS-Based Authentication
Sending Verification Codes via Session
When a user submits a phone number, the system validatse its format. If invalid, an error is returned. If valid, a verification code is generated, stored in the session, and sent via SMS.
Login and Registration Flow
The user inputs the code and phone number. The backend retrieves t ...
Posted on Fri, 15 May 2026 17:03:20 +0000 by timolein
Streamlining Local Development: Running Multi-Container Applications with Docker Compose
Docker Compose Overview
Docker Compose is a powerful tool designed to define and manage multi-container Docker applications. When dealing with complex setups involving multiple services like Spring Boot applications, Redis, and MySQL, managing each container individually becomes cumbersome. Instead of manually configuring IP addresses and conne ...
Posted on Fri, 15 May 2026 13:24:49 +0000 by Matth_S
User Registration API Flow: Image and SMS Verification Implementation
User Registration Interface
Image Code Verification Endpoint (Returns JPG Image)
The UUID generation occurs automatically when the page loads. This implementation has been resolved by generating the UUID via JavaScript on page initialization.
Endpoint:
/api/v1_0/image_codes/{image_code_id}
The image_code_id parameter is a UUID generated on the ...
Posted on Fri, 15 May 2026 09:22:06 +0000 by duane
Caching Strategies and Redis Implementation
Understanding Caching Concepts
Buffer vs. Cache
buffer: Primarily used for write operations, acting as a write buffer.
cache: Primarily used for read operations, serving as a read cache.
Both address speed inconsistencies and involve I/O operations.
Key Cache Considerations
1. Storage location (multi-level cache):
Client-side (browser cach ...
Posted on Thu, 14 May 2026 03:41:58 +0000 by Axeia
Redis-Based Distributed Lock and Rate Limiting in Spring Boot Applications
Overview
This article describes a clean approach to implementing distributed locking and rate limiting using Redis in Spring Boot applications. The solution leverages Redis atomic operations for thread-safe state management across multiple service instances.
Why Redis?
Redis provides atomic operations that guarantee complete execution or no exe ...
Posted on Wed, 13 May 2026 10:33:40 +0000 by SQL Maestro
Core Principles of High-Concurrency Backend Systems
Distributed Caching Architectures
Handling Data Discrepancies
Cache Penetration: Occurs when queries request data existing neither in the cache nor the database.
Mitigation strategies include:
Storing null values for missing keys with short expiration times to prevent redundant DB hits.
Implementing a Bloom Filter to probabilistically verify d ...
Posted on Wed, 13 May 2026 10:09:20 +0000 by briand
Deploying a Three-Node Redis Cluster with Bloom Filter on CentOS 7
Enviroment Preparation
Server Layout
Hostname
IP
Instances
Ports
redis-node-0
10.10.101.29
2
6379, 6380
redis-node-1
10.10.101.30
2
6379, 6380
redis-node-2
10.10.101.31
2
6379, 6380
Build Dependencies
# Enable GCC 9
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
scl ena ...
Posted on Wed, 13 May 2026 05:00:36 +0000 by GundamSV7