Ensuring Redis Cache and Database Consistency with Delayed Double Deletion
Redis Cache and Database Consistency
Caching improves performance and reduces database load, but introduces potential inconsistencies between cached data and the database. Inconsistent data leads to stale reads from the cache.
Non-Concurrency Scenarios
Update Cache First, Then Database
If cache udpate succeeds but database update fails, the cac ...
Posted on Mon, 18 May 2026 21:24:00 +0000 by DwarV
Implementing Redis Sentinel for High Availability with C#
Redis Sentinel is a system designed to help manage Redis instances, providing high availability through monitoring, notification, and automatic failover. It oversees master and replica instances, promoting a replica to master if the current master fails. This article explains the core concepts of Redis Sentinel and demonstrates how to integrate ...
Posted on Mon, 18 May 2026 10:05:25 +0000 by Cloud
Building and Configuring Redis from Source with systemd Integration
Prerequisites for Building Redis from Source
Before running make test, ensure TCL 8.5 or later is installed:
wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz
tar xzvf tcl8.6.1-src.tar.gz -C /usr/local/
cd /usr/local/tcl8.6.1/unix/
./configure
make
make install
Install the GCC compiler:
yum install gcc -y
Building Redis with syste ...
Posted on Sun, 17 May 2026 21:39:10 +0000 by mechamecha
Configuring Redis for Servlet-Based Services and WebFlux Gateways in Microservices
In modern microservice architectures, Redis is widely used for caching, distributed locking, session storage, and rate limiting. However, the way you interact with Redis differs significantly between a traditional Servlet‑based service (blocking) and a WebFlux‑based gateway (non‑blocking). This guide explains both approaches and provides ready‑ ...
Posted on Sun, 17 May 2026 11:14:36 +0000 by feckless
Redis Eviction Mechanisms and Policies Explained
Redis uses eviction policies to manage memory when the maxmemory limit is reached. These policies determine which keys to remove to free up space for new data.
Eviction Policies
1. noeviction (default): When memory usage reaches maxmemory, Redis does not evict any existing data. Instead, it returns an error for write requests. This means the ca ...
Posted on Sun, 17 May 2026 11:08:43 +0000 by ercantan
Building Distributed Scrapy Spiders with Redis
RedisSpider Overview
RedisSpider extends Scrapy's base Spider class to enable distributed crawling. Instead of using a static start_urls list, this spider reads URLs from a Redis queue.
Key Differences from Standard Spider
The main modifications involve imports, inheritance, and replacing the static URL list with a Redis key:
from scrapy_redis. ...
Posted on Sun, 17 May 2026 03:26:31 +0000 by glassroof
Deploying Redis Sentinel for High Availability
Redis offers three main clustering solutions: Redis Cluster, master/slave replication, and Sentinel mode for automatic failover and fault recovery.
Sentinel Mode Overview
Sentinel mode builds upon the master/slave replication model by introducing monitoring agents that automatically handle failures. Traditional master/slave setups require manua ...
Posted on Sun, 17 May 2026 03:11:19 +0000 by koen
Setting up Redis Server and PHP Extension
Installing Redis
Extract the Redis package in the /usr/local/src directory:
tar -zxvf redis-4.0.8.tar.gz
cd redis-4.0.8
make MALLOC=libc
Install Redis binaries to /usr/local/bin:
cd src && make install
Starting Redis Server
Redis can be started in three different ways:
Foreground Mode
cd src
./redis-server
This method requires kee ...
Posted on Sat, 16 May 2026 21:04:03 +0000 by rochakchauhan
Implementing Nearby Search and Tinder-like Features
Location Reporting
When the client detects a user's geographic location, it reports to the server if the locasion changes by more than 500 meters or every 5 minutes. User locasion data is stored in Elasticsearch.
Dubbo Service
User location functionality is implemented in a new project called my-tanhua-dubbo-es.
POM Configuration
<dependenci ...
Posted on Sat, 16 May 2026 10:42:54 +0000 by TheUkSniper
Implementing Asynchronous Processing and Real-Time Events in Laravel Applications
Laravel's queue system enables background processing of resource-intensive operations through message queues. This approach decouples time-connsuming tasks from user requests, improving application responsiveness while maintaining data integrity.
Queue Configuration Setup
Configure Redis as the queue driver by updating the .env file:
QUEUE_CONN ...
Posted on Sat, 16 May 2026 01:19:38 +0000 by blackmamba