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

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