Tagged articles
Jedis
76 articles · Page 1 of 1
This tutorial demonstrates setting up Redis on Windows, configuring a Maven project with Jedis 4.1.1, building a connection pool utility, and providing JUnit test examples for operating Redis Strings, Lists, Hashes, Sets, and Sorted Sets with Jedis API.
JUnitJavaJedis
0 likes · 13 min read

This comprehensive guide details a systematic approach to diagnosing and resolving high Redis client connection counts, covering connection models, configuration tuning, CLI analysis commands, application-level connection pool fixes, temporary mitigation tactics, and long-term monitoring best practices with real-world case examples.
CLIENT LISTConnection LeakConnection Pooling
0 likes · 35 min read

An online education platform experienced a cascade failure when Redis reached its maxclients limit, causing authentication, session, and cache services to become unavailable; the article details the connection mechanism, root‑cause analysis, rapid mitigation steps, and long‑term best practices for preventing similar outages.
Circuit BreakerJedisTimeout
0 likes · 18 min read

The article introduces Redis's official search module RediSearch, compares its memory usage and query performance against Elasticsearch, presents benchmark results showing faster indexing and four‑times higher throughput, and provides step‑by‑step installation, index commands, and Java integration examples.
ElasticsearchJavaJedis
0 likes · 10 min read

An online education platform experienced a massive outage when Redis hit its maxclients limit, causing authentication, session, and cache services to fail, which cascaded into a business avalanche; the article walks through the connection mechanism, root‑cause analysis, rapid mitigation steps, and long‑term safeguards.
Jedisconnection poolmonitoring
0 likes · 20 min read

The article explains how Redis guarantees atomic operations through single‑command atomicity, MULTI/EXEC transactions, and the WATCH optimistic‑lock mechanism, providing Java/Jedis code examples and discussing their role in ensuring data consistency in distributed systems.
JavaJedisOptimistic Lock
0 likes · 6 min read

Redis Cluster can lose writes due to asynchronous replication, network partitions, inadequate persistence settings, or unconfirmed client operations, but enabling AOF, configuring replication acknowledgments, using Sentinel or built‑in HA, and adding client retry logic can mitigate these risks, as demonstrated with a Java Jedis example.
AOFJavaJedis
0 likes · 7 min read

Redis stores data in memory, so when usage reaches the maxmemory limit it triggers one of six eviction policies—noeviction, allkeys‑lru, volatile‑lru, allkeys‑random, volatile‑random, and volatile‑ttl—each suited to different scenarios, and can be set via redis.conf or CONFIG SET, as illustrated with a Java Jedis example.
JavaJedisLRU
0 likes · 6 min read

Redis uses both time‑based and lazy expiration, marking keys as expired at their TTL but only removing them on the next access or during periodic cleanup, so expired keys are not deleted the instant they expire.
JavaJedisKey Expiration
0 likes · 5 min read

Redis uses multiple expiration and eviction mechanisms—including lazy deletion, periodic scanning, and memory eviction—to balance performance and memory usage, and this guide explains each strategy, shows how to configure them, and provides Java/Jedis code examples for setting TTLs, handling large objects, preventing cache avalanches, and monitoring stats.
CacheJavaJedis
0 likes · 7 min read

A Java Spring application repeatedly stalled due to Redis connection pool deadlocks, and the investigation walks through using system tools, JVM thread dumps, and Arthas to pinpoint the issue, then shows how proper pool configuration and safe Redis access prevent the API from freezing.
ArthasJavaJedis
0 likes · 9 min read

This guide explains the need for Redis clustering to achieve high availability, walks through Redis 3.0's decentralized cluster configuration, shows how to modify redis.conf, start multiple nodes, create the cluster, use hash slots, handle failures, and connect via Java Jedis, highlighting both advantages and limitations.
ClusterConfigurationHigh Availability
0 likes · 13 min read

The article explains how to reduce latency in SparkStreaming jobs that heavily interact with Redis by using connection pools, batch sizing, pipeline techniques, and custom JedisCluster pipelines, while also covering Redis deployment modes, Codis proxy, and practical Java/Scala code examples.
JavaJedisPipeline
0 likes · 18 min read

This article explains how to reduce Spark Streaming latency caused by heavy Redis interactions by using connection pools, batching commands with pipelines, understanding Redis slot architecture, and implementing custom pipeline logic for both Codis and native Redis clusters, complete with code examples.
ClusterJedisPipeline
0 likes · 17 min read

This guide explains why Redis clustering is needed for capacity, concurrency and failover, describes Redis 3.0's decentralized cluster architecture, provides step‑by‑step commands to configure, launch and combine six nodes into a cluster, demonstrates slot calculations, client usage with Jedis, and outlines fault recovery, pros and cons, and cleanup procedures.
ClusterDevOpsHigh Availability
0 likes · 24 min read

This article explains Redis Pipeline—a technique that batches multiple commands in a single request to cut round‑trip latency, details how to implement it in Java using Jedis, and outlines its advantages, drawbacks, and ideal scenarios for high‑throughput backend applications.
JavaJedisPipeline
0 likes · 6 min read

The article explains how to use Apache Commons Pool to create reusable object pools in Java—showing Maven setup, a custom PooledObjectFactory, pool configuration, borrowing and returning objects, and demonstrates a Redis Jedis connection pool built on the same framework while detailing the pool’s initialization, borrowing, and return mechanisms.
JavaJedisapache-commons-pool
0 likes · 8 min read

This article introduces the lightweight Lua scripting language, outlines its key features and typical use cases, and provides a complete example of using Redis together with Lua scripts (and a Java client) to enforce IP‑based login‑attempt limits for improved security.
IP rate limitingJavaJedis
0 likes · 13 min read

This article explains the principles of object pooling in Java, introduces the Commons Pool 2 library and its use in Redis client Jedis, compares pool and non‑pool performance with JMH benchmarks, and details the fast HikariCP database connection pool along with configuration tips and interview questions.
Commons-PoolHikariCPJMH
0 likes · 15 min read

This article introduces RediSearch, compares its memory usage and query performance with Elasticsearch on modest hardware, shows installation steps, demonstrates core index commands and Java integration, and concludes with practical advice on using RediSearch as a lightweight full‑text search engine.
ElasticsearchJavaJedis
0 likes · 11 min read

A week‑long API freeze in a sandbox environment was traced to Redis connection pool misconfiguration, where threads waited indefinitely for a Jedis resource, leading to Tomcat request threads blocking and 500 errors, and the issue was resolved by adjusting pool settings and using proper connection release patterns.
BackendJavaJedis
0 likes · 9 min read

Jedis uses Apache Commons’ GenericObjectPool to manage Redis connections, with Spring‑Data‑Redis creating a JedisConnectionFactory that holds a configurable pool where borrowObject and returnObject handle idle queues, eviction and validation settings (testOnBorrow, testWhileIdle, etc.) can be tuned, and JMX metrics aid troubleshooting.
ConnectionPoolGenericObjectPoolJava
0 likes · 10 min read

This article walks through a production incident where a Redis Cluster pipeline caused Dubbo threads to block and eventually deadlock, detailing the root‑cause analysis, code inspection, and verification steps using jstack, jmap, and MAT to confirm the deadlock and propose fixes.
JavaJedisPipeline
0 likes · 13 min read

The article details a week‑long investigation of a sandbox environment where Spring Boot APIs became unresponsive due to Redis connection pool blocking, describing the use of system tools, JVM thread analysis, and code inspection to identify mis‑configured pool settings and recommending proper connection handling with Spring's RedisTemplate.
ArthasJedisSpring Boot
0 likes · 8 min read

This article examines a Redis 3.x cluster failure caused by a master‑slave switch, detailing how improper Jedis timeout and retry settings triggered a service avalanche, and provides step‑by‑step analysis of the incident, code paths, and recommended configuration adjustments to prevent recurrence.
JedisService Avalancheconnection timeout
0 likes · 12 min read

The article details how a Dubbo thread‑pool exhaustion incident was traced to a deadlock in Redis Cluster pipeline usage, caused by Jedis pools lacking a borrow timeout, which let threads block indefinitely while holding cross‑node connections, and recommends configuring maxWaitMillis or enlarging the pool to prevent recurrence.
DubboJavaJedis
0 likes · 14 min read

During a Redis 3.x cluster master‑slave failover, the default Jedis connection timeout of two seconds combined with six automatic retries caused each request’s Redis calls to accumulate up to sixty seconds of latency, triggering Nginx timeouts and a service‑avalanche, which was resolved by lowering timeout and retry settings.
Backend DevelopmentCluster FailoverConnection Retry
0 likes · 13 min read

A service‑wide avalanche occurred when a Redis 3.x master‑slave failover coincided with Jedis’ default 2‑second connection timeout and six retry attempts, causing up to 60‑second latencies; adjusting connectionTimeout, soTimeout to 100 ms and reducing maxAttempts to two limited latency to about one second and prevented cascade failures.
ClusterConnection RetryFault Analysis
0 likes · 13 min read

This article explains the principles of object pooling in Java, introduces the Commons Pool 2 library, demonstrates its use with Redis client Jedis, compares performance with JMH benchmarks, and discusses the high‑performance HikariCP database connection pool, including configuration tips and interview questions.
Commons-PoolHikariCPJMH
0 likes · 14 min read

This article explains the principles of object pooling in Java, introduces the Commons Pool 2 library, demonstrates its use with Redis client Jedis, compares performance with JMH benchmarks, and details the configuration and advantages of the high‑performance HikariCP database connection pool.
Commons-PoolHikariCPJMH
0 likes · 17 min read

This article compares the three popular Redis Java clients—Jedis, Redisson, and Lettuce—detailing their features, advantages, drawbacks, and providing practical recommendations and code examples for selecting and configuring the best client in Spring Boot applications.
JavaJedisLettuce
0 likes · 11 min read

This article explains why the Lettuce asynchronous Redis client, built on Netty, outperforms the traditional Jedis client for high‑concurrency caching, covering Redis client differences, Netty NIO fundamentals, Redis Cluster architecture, smart client redirection handling, and practical Java code examples.
CachingClusterJava
0 likes · 17 min read

This article compares three popular Java Redis clients—Jedis, Lettuce, and Redisson—detailing their advantages, drawbacks, and recommended usage scenarios, helping developers select the most suitable client based on performance, thread safety, and advanced Redis features such as clustering, sentinel, and distributed locks.
Client ComparisonJavaJedis
0 likes · 9 min read


ITPUBNov 26, 2022 · Databases
This article introduces Redis’s evolution, key features for distributed locking, explains lock and unlock workflows with Jedis, presents Java code examples, discusses pitfalls like non‑atomic operations, and offers configuration and performance tuning tips for reliable, high‑availability lock services.
Distributed LockJavaJedis
0 likes · 20 min read

This article compares the Java Redis clients Jedis, Redisson, and Lettuce, explains their core differences, and provides detailed Spring Boot configuration and code examples for using each client, including RedisTemplate, RedissonClient, and annotation‑based caching.
JavaJedisLettuce
0 likes · 14 min read

This article explains how object pooling in Java—using Commons Pool 2, the Jedis Redis client, and the HikariCP database connection pool—can dramatically improve performance by reusing expensive resources, detailing key configuration parameters, benchmark results, and practical tuning advice.
Commons Pool 2HikariCPJava
0 likes · 13 min read

This article walks through designing three Redis Stream performance test cases—adding, reading, and add‑delete—using dynamic thread and dynamic QPS models in Java, provides complete Groovy‑based test code, and shows sample console output for evaluating throughput and latency.
Dynamic ThreadsJavaJedis
0 likes · 8 min read

This article introduces Redis Stream—a persistent message queue added in Redis 5.0—and demonstrates how to set up dependencies, use Java Jedis to perform core operations such as XADD, XTRIM, XDEL, XLEN, XREAD, and XRANGE, with complete code examples for each.
JavaJedisMessage Queue
0 likes · 9 min read

This article demonstrates how to implement Redis distributed locks using Jedis in Java, covering lock creation with SETNX, lock release via Lua scripts, and a high‑concurrency flash‑sale simulation with 100,000 virtual users, illustrating key concepts such as lock expiration, atomic operations, and performance testing.
ConcurrencyDistributed LockJava
0 likes · 10 min read

This article demonstrates how to implement a Redis distributed lock using Jedis in Java, explains lock creation and deletion strategies, and walks through a simulated high‑concurrency order‑grabbing scenario with 100,000 users to illustrate practical usage.
DockerJavaJedis
0 likes · 9 min read

This article compares the Java Redis clients Jedis, Redisson, and Lettuce, explains their distinct features and thread‑safety models, and provides detailed Spring Boot configuration and code examples for using RedisTemplate, RedissonClient, and annotation‑based caching to implement distributed locks, hash operations, and cache management.
CachingJavaJedis
0 likes · 13 min read

The article details a week‑long investigation of unresponsive APIs in a sandbox environment, tracing the root cause to Redis connection pool blocking in a Spring Boot service, and presents step‑by‑step debugging, code analysis, configuration fixes, and best‑practice recommendations for proper Redis usage.
ArthasJedisconnection pool
0 likes · 9 min read

The article details a step‑by‑step investigation of a Spring‑based backend where API requests hung due to Redis connection pool misconfiguration, showing how thread dumps, jstack, and Arthas were used to pinpoint blocking in Jedis pool acquisition, and provides corrected configuration and proper connection handling recommendations.
JedisSpringconnection pool
0 likes · 9 min read

After a week of API timeouts in an internal sandbox, we traced the issue to Redis connection pool deadlocks caused by improper Jedis resource handling in Spring, revealing how missing maxWaitMillis settings and unreleased connections can freeze all HTTP threads.
ConnectionPoolJavaJedis
0 likes · 9 min read

This article explains how to implement a Redis distributed lock in Java using Jedis, covering Maven setup, lock creation with setNX, safe lock release via Lua scripts, and a realistic 100,000‑user flash‑sale simulation to demonstrate concurrency control.
ConcurrencyDistributed LockJava
0 likes · 9 min read

This article compares the three popular Java Redis clients—Jedis, Redisson, and Lettuce—detailing their differences in threading, I/O, and feature sets, and provides comprehensive Spring Boot configuration and code examples for using StringRedisTemplate, RedissonClient, and Spring Cache annotations to implement caching and distributed locks.
JavaJedisLettuce
0 likes · 11 min read

This article explains how to use Redis as a distributed lock via Jedis in Java, covering lock creation with SETNX/NX/PX, lock deletion with Lua scripts, and a complete 100,000‑user concurrency simulation that demonstrates inventory control and lock management for flash‑sale scenarios.
JavaJedisredis
0 likes · 10 min read

This article explains how to implement a Redis distributed lock using Jedis in Java, covering lock creation with SETNX, expiration handling, lock deletion via Lua scripts, and a high-concurrency flash‑sale simulation with 100,000 parallel users.
ConcurrencyJavaJedis
0 likes · 9 min read

This tutorial demonstrates how to implement Redis distributed locks in Java using Jedis, covering lock creation with SETNX, expiration handling, safe unlocking via Lua scripts, and a high‑concurrency simulation of 100,000 users competing for limited stock.
ConcurrencyDistributed LockJava
0 likes · 9 min read

The article examines Jedis 3.5.0’s three Redis access modes—single‑node via Jedis, sharding via ShardedJedis, and cluster via JedisCluster—detailing their class hierarchies, connection handling, consistent‑hashing and slot logic, and how pipelines boost throughput while respecting mode‑specific constraints.
ClientClusterJava
0 likes · 23 min read

This article compares the three popular Redis Java clients—Jedis, Redisson, and Lettuce—explaining their core differences, then shows how to configure and use Spring's RedisTemplate, RedissonClient, and annotation‑based caching with practical code examples and configuration files.
CachingJavaJedis
0 likes · 14 min read

This article compares the Java Redis clients Jedis, Redisson, and Lettuce, explains their distinct features and thread‑safety, and provides detailed Spring Boot configurations and code examples for RedisTemplate, RedissonClient, and cache annotations to implement caching, distributed locks, and atomic operations.
JavaJedisLettuce
0 likes · 13 min read

This article reviews Redis's latest features and compares various deployment architectures—including single‑replica, dual‑replica, cluster, and read‑write‑separation modes—detailing their reliability, performance characteristics, suitable use cases, and provides a Java Jedis example for configuring a direct‑connect cluster.
ClusterHigh AvailabilityJava
0 likes · 12 min read

This article outlines the new features of Redis 6.0 and 5.0, compares various deployment architectures such as master‑replica, single‑replica, cluster and read‑write split, presents typical usage scenarios, and provides a Java Jedis code sample for connecting to a Redis cluster.
CachingClusterJava
0 likes · 12 min read

This article presents a complete Java utility class built on Jedis that simplifies Redis operations, covering connection handling, key management, and full support for strings, lists, hashes, sets, and sorted sets, with a link to the full source on Gitee.
BackendJavaJedis
0 likes · 24 min read

This article outlines the major new features of Redis 6.0 and 5.0, compares various deployment architectures—including master‑replica, cluster, and read‑write separation—explains proxy versus direct connection modes, and provides a Java Jedis connection‑pool code sample.
ClusterDatabase ArchitectureJava
0 likes · 14 min read

This article reviews Redis 6.0 and 5.0 new features, compares cluster, master‑replica (single and double replica), and read‑write‑separation architectures, explains their reliability and use‑case scenarios, and provides a Java/Jedis code sample for custom connection‑pool configuration.
ClusterJavaJedis
0 likes · 11 min read

This article reviews Redis 6.0 and 5.0 new features, compares deployment architectures such as cluster, master-replica, and read-write split, and provides Java connection-pool code examples to help engineers select the appropriate Redis setup for performance, reliability, and scalability requirements.
ClusterDatabase ArchitectureJava
0 likes · 11 min read

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.
JavaJedisLettuce
0 likes · 15 min read

A week‑long API freeze in a sandbox environment was traced to Redis connection pool deadlocks caused by missing pool configuration and improper connection handling, and the article walks through the diagnosis with top, jstack, Arthas, and the code changes needed to fix it.
ArthasJedisSpring Boot
0 likes · 9 min read

The article explains various Redis high‑availability solutions—including Sentinel service discovery, VIP binding, keepalived VRRP, and proxy middleware—for both master‑slave and cluster architectures, and shows how clients can reliably locate the current master node after failover.
High AvailabilityJedisProxy
0 likes · 7 min read

A Spring‑based service repeatedly hung because Redis connections were never returned to the pool, leading to thread starvation; the article walks through the investigation using top, jstack, Arthas, and code analysis, then shows the proper way to use RedisCallback and release connections to prevent the deadlock.
JavaJedisSpring
0 likes · 9 min read

After a week of intermittent API hangs in an internal sandbox, we traced the issue to Redis connection pool blocking caused by missing max‑wait configuration, leading to threads waiting indefinitely; by adjusting Jedis pool settings, using proper connection release, and avoiding unsupported commands, the deadlock was resolved.
JavaJedisSpring
0 likes · 9 min read

This article explains how to use Jedis to create and delete a Redis distributed lock, demonstrates a setNX‑based locking strategy with expiration, and simulates a 100,000‑user concurrent order‑抢单 scenario to show lock acquisition, order processing, and release in Java.
Backend DevelopmentDistributed LockJava
0 likes · 9 min read


JavaEdgeMar 22, 2021 · Backend Development
This article explains the concept of connection pools, compares pooled and direct TCP connections, demonstrates thread‑safety issues when reusing a Jedis instance in multithreaded code, and shows how to fix the problem by using JedisPool with proper resource management.
JavaJedisconnection pool
0 likes · 9 min read

This tutorial explains how to implement a Redis distributed lock with SpringBoot and Jedis, covering lock creation using SETNX, expiration handling, safe unlocking via Lua scripts, and a 100,000‑user parallelStream simulation of a limited‑stock order‑grab scenario, complete with code samples and results.
ConcurrencyDistributed LockJava
0 likes · 10 min read

This article introduces Redis Pub/Sub messaging, explains its purpose of decoupling publishers and subscribers, demonstrates command-line operations such as PUBLISH, SUBSCRIBE, PSUBSCRIBE, and provides a complete Java Spring Boot example using Jedis to publish and subscribe to channels.
BackendJavaJedis
0 likes · 10 min read

During a full‑chain load test, latency spikes were traced to a slow G1GC pause caused by single‑threaded reference processing of many Finalizer objects, which originated from an over‑aggressive Jedis connection pool; enabling the JVM flag -XX:+ParallelRefProcEnabled eliminated the bottleneck and restored performance.
G1GCGC performanceJVM tuning
0 likes · 8 min read

This article explains how a large car‑IoT platform built a comprehensive Redis monitoring solution using Elastic‑Stack, covering server‑side metrics, application‑side instrumentation, joint analysis, implementation details, findings, and future optimization recommendations.
Elastic StackJedisKibana
0 likes · 17 min read

This article investigates a socket memory leak on a single server using Jedis, revealing how frequent pool eviction, mis‑configured minIdle settings, and Java finalizer behavior combine to create excessive socket objects and strain the garbage collector.
Commons-PoolGCJava
0 likes · 8 min read

This article explains how to implement a Redis-based distributed lock using Jedis in Java, covering lock creation with SETNX, lock expiration, safe lock release via Lua scripts, and demonstrates the approach by simulating a 100,000-user concurrent order‑grabbing scenario.
Distributed LockJavaJedis
0 likes · 8 min read


JavaEdgeJul 8, 2019 · Backend Development
This article explains how Redis Cluster distributes data using hash slots and consistent hashing, how nodes communicate via the gossip protocol, and how the Java Jedis client handles redirection and slot migration to achieve scalable, highly available Redis deployments.
ClusterHash SlotHigh Availability
0 likes · 13 min read

This article presents comprehensive Alibaba Cloud Redis development standards covering key and value design, lifecycle management, command usage, client integration, tooling, and efficient big‑key deletion techniques to help developers avoid common pitfalls and improve performance.
BigKeyCommand OptimizationJava
0 likes · 10 min read

This article explains how to correctly configure JedisPool and its underlying GenericObjectPoolConfig, provides Maven dependency details, demonstrates pool initialization and usage patterns, and offers practical recommendations for maxTotal, maxIdle, minIdle, idle monitoring, and warm‑up to ensure stable and efficient Redis operations in Java applications.
ConfigurationJavaJedis
0 likes · 9 min read

This article explains how to correctly implement a Redis-based distributed lock in Java, covering essential reliability requirements, step‑by‑step code for acquiring and releasing locks, and detailed analyses of common flawed approaches, ensuring atomicity and proper ownership handling.
ConcurrencyDistributed LockJedis
0 likes · 12 min read

This article provides a detailed guide on installing Redis on Linux, configuring protected mode, using Java's Jedis client with Maven, performing message‑queue performance tests, comparing RDB and AOF persistence, and explaining master‑slave replication with configuration tips and code examples.
JavaJedisReplication
0 likes · 20 min read
