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
Redis Master-Slave Replication Configuration
Implementing Redis Master-Slave Replication
Redis master-slave replicaiton enables data redundancy and read scalability by allowing one Redis server (master) to replicate its data to one or more replica servers (slaves). The master handles write operations while slaves serve read requests, creating a one-to-many replication topology.
Cofnigurin ...
Posted on Wed, 13 May 2026 02:41:20 +0000 by d99kg
Building Message Features and User Profile Pages
Overview
This tutorial covers implementing the following features:
Likes, loves, and comments notification lists
System announcements
User profile page
Chat with strangers functionality
Who viewed my profile feature
Notification Lists (Likes, Loves, Comments)
The notification center displays interactions from other users on your content. Si ...
Posted on Sun, 10 May 2026 23:19:01 +0000 by usefulphp
Deploying Common Services with Docker: Tomcat, MySQL, and Redis
Standard Workflow
# Search for available images
docker search <image_name>
# Download an image to the local machine
docker pull <image_name>
# Verify the downloaded image
docker images
# Launch a container from the image
docker run [options] <image_name>
# Halt a running container
docker stop <container_id>
# Delete ...
Posted on Sun, 10 May 2026 22:59:14 +0000 by daena76
Implementing Rate Limiting and Counters with Redis
Redis provides efficient counting capabilities suitable for rate limiting and access tracking. Common use cases enclude blog view counters and SMS verification code frequency limits.
Basic counters face challenges like preventing refresh-triggered increments. The solution involves tracking user access within specific time windows and storing da ...
Posted on Sun, 10 May 2026 17:33:56 +0000 by helpmeplease1234
Implementing a Shopping Cart Using Redis Hash Operations
Cart Storage StrategiesDatabase Storage: Traditional relational databases introduce performance bottlenecks under heavy read/write loads.Client-Side Storage: Browsers offer localStorage for persistent key-value data without expiration, and sessionStorage for data cleared upon tab closure. However, these lack server-side synchronization.Redis Ca ...
Posted on Sun, 10 May 2026 05:56:41 +0000 by buildernaut1
Integrating Redis with Spring Boot for Caching, Lua Scripting, and Session Sharing
Integrating Redis as a Cache in Spring Boot
To use Redis as a caching layer in Spring Boot, include the spring-boot-starter-cache and spring-boot-starter-data-redis dependencies. Spring Boot auto-configures a RedisTemplate and, when caching is enabled, a RedisCacheManager.
Required Dependencies
<dependency>
<groupId>org.springfr ...
Posted on Sat, 09 May 2026 21:29:26 +0000 by katlis