Tagged articles
8 articles
Page 1 of 1
Selected Java Interview Questions
Selected Java Interview Questions
Nov 7, 2023 · Backend Development

Implementing Distributed Locks with Redis: Principles, Challenges, and Optimizations

This article explains why traditional local locks fail in distributed systems, surveys common distributed‑lock approaches, and provides a step‑by‑step guide to building a robust Redis‑based lock in Java—including expiration handling, UUID safety, Lua‑script atomicity, re‑entrancy, automatic renewal, and the RedLock algorithm—while comparing its performance against plain local locks.

JavaLuaRedlock
0 likes · 17 min read
Implementing Distributed Locks with Redis: Principles, Challenges, and Optimizations
Java Backend Technology
Java Backend Technology
Aug 12, 2021 · Databases

Mastering Spring Data Redis: From Configuration to Advanced Queries

Learn how to integrate Spring Data Redis with Spring Boot, replace Jedis with Lettuce, define data models using @RedisHash and @Indexed, configure connection properties, implement CRUD and example queries, and understand the underlying key-value storage patterns illustrated with practical code and visual examples.

CRUDJavaLettuce
0 likes · 13 min read
Mastering Spring Data Redis: From Configuration to Advanced Queries
vivo Internet Technology
vivo Internet Technology
Jul 7, 2021 · Databases

Lettuce vs Jedis: Features, Usage, and Comparison of Java Redis Clients

Lettuce, a thread‑safe, Netty‑based Java Redis client supporting synchronous, asynchronous, reactive, Cluster, Sentinel, pipelining and custom codecs, outperforms Jedis’s non‑thread‑safe pooled connections by reducing resource consumption, simplifying Spring integration, and offering advanced features like read‑write splitting, topology refresh, and optional pooling for high‑throughput applications.

AsyncConnection PoolJava
0 likes · 15 min read
Lettuce vs Jedis: Features, Usage, and Comparison of Java Redis Clients
Programmer DD
Programmer DD
Aug 14, 2020 · Backend Development

Switching Spring Boot Cache from EhCache to Redis for Strong Consistency

This tutorial explains why in‑process caches like EhCache can cause consistency problems in clustered environments and demonstrates step‑by‑step how to replace EhCache with Redis in a Spring Boot 2.x application, including dependency setup, configuration, and a unit test that verifies caching behavior.

EhcacheJavaSpring Data Redis
0 likes · 7 min read
Switching Spring Boot Cache from EhCache to Redis for Strong Consistency
Yanxuan Tech Team
Yanxuan Tech Team
Jul 30, 2020 · Backend Development

Why RedisTemplate’s Millisecond Expiry Triggers Heavy Cluster Commands and How to Fix It

During a high‑traffic load test of an e‑commerce product detail page, excessive Redis cluster and PSETEX commands caused CPU spikes, and the investigation revealed that using millisecond‑level expiration in Spring Data Redis triggers frequent cluster node lookups, which can be resolved by switching to second‑level expirations.

ClusterSpring Data Redispsetex
0 likes · 11 min read
Why RedisTemplate’s Millisecond Expiry Triggers Heavy Cluster Commands and How to Fix It
macrozheng
macrozheng
Mar 16, 2020 · Backend Development

Mastering Spring Data Redis: Installation, Caching, and Advanced Usage

This comprehensive guide walks you through installing Redis on Linux and Windows, configuring Spring Cache annotations, setting up JSON serialization with RedisTemplate, using connection pools, and implementing a flexible RedisService with controller examples, providing all the essential steps to integrate Redis into your Spring Boot applications.

Backend DevelopmentJavaSpring Cache
0 likes · 25 min read
Mastering Spring Data Redis: Installation, Caching, and Advanced Usage