Tagged articles
time wheel
32 articles · Page 1 of 1
The article dissects a common interview question about automatically canceling unpaid orders after 30 minutes, explains why naïve cron‑based scans are unsuitable for tens of millions of rows, and presents three progressively robust solutions using Redis expiration, Redis ZSet polling, and message‑queue or time‑wheel architectures.
Delayed TaskMessage QueueZSet
0 likes · 10 min read

The article analyzes why large‑scale delayed messaging is needed, identifies the bottlenecks of the Apache Pulsar community solution, and explains TDMQ Pulsar's three‑step redesign—hierarchical time wheels, expiration re‑push, and immutable message IDs—that together enable stable million‑message delayed queues with controlled memory and minute‑level hole impact.
Apache PulsarDelayed MessagingMessage Queue
0 likes · 8 min read

This article explains the motivations behind creating a new distributed scheduling framework, compares existing solutions, and details the design choices—including gRPC communication, protobuf serialization, a custom NameServer for load balancing, and a built‑in message queue with persistence and retry mechanisms—to handle frequent task creation and dynamic parameter changes in a high‑concurrency environment.
Distributed SchedulinggRPCtime wheel
0 likes · 14 min read

The article examines various approaches for implementing accurate order‑cancellation timers in e‑commerce systems, compares message‑queue delayed delivery, Redisson delay queues, Redis expiration listeners, RabbitMQ dead‑letter queues, and time wheels, and recommends reliable solutions while warning against common pitfalls.
Redissonbackend developmentdelayed tasks
0 likes · 8 min read

This article compares several ways to implement order‑closing delayed tasks—message‑queue delayed delivery, Redisson DelayQueue, Redis expiration listening, RabbitMQ dead‑letter queues, and time wheels—explaining their mechanisms, drawbacks, and recommending the most reliable solutions for production systems.
Message QueueRabbitMQRedisson
0 likes · 7 min read

The article explains why using Redis expiration or RabbitMQ dead‑letter queues for delayed order‑cancellation tasks is unreliable, compares several approaches such as message‑queue delayed delivery, Redisson delay queues, and time wheels, and recommends robust solutions like RocketMQ or Pulsar for accurate timing.
Message QueueRabbitMQRedisson
0 likes · 7 min read

This article explains the concept and implementation of the time wheel in Dubbo, covering its use for scheduled retries, heartbeat handling, underlying HashedWheelTimer mechanics, configuration details, performance considerations, and related issues, providing a thorough guide for backend developers.
DubboFailbackHashedWheelTimer
0 likes · 22 min read

This article explores the design and implementation of time wheel algorithms in Netty and Kafka, comparing their single‑layer and multi‑layer approaches, analyzing performance trade‑offs, and detailing how these systems achieve O(1) scheduling for massive delayed tasks while avoiding empty ticks.
BackendKafkaNetty
0 likes · 76 min read

This article examines why using Redis key‑space expiration notifications for delayed job execution is unreliable, compares common approaches such as message‑queue delayed delivery, RabbitMQ dead‑letter queues, time wheels, and Redisson DelayQueue, and provides practical recommendations for robust timeout handling in e‑commerce systems.
BackendRabbitMQdelay queue
0 likes · 7 min read

This article examines the open‑source XXL-JOB distributed task scheduler, explaining its lightweight architecture, time‑wheel based scheduling, consistent‑hash routing, sharding mechanisms, and includes annotated source code snippets to illustrate key implementation details for backend developers.
Consistent HashShardingTask Scheduling
0 likes · 12 min read

The article evaluates common delayed‑task implementations—Redis expiration listeners, RabbitMQ dead‑letter queues, time wheels, and Redisson DelayQueue—explaining their drawbacks, proper use cases, and recommending reliable message‑queue solutions for e‑commerce order‑closing scenarios.
BackendMessage QueueRabbitMQ
0 likes · 7 min read

This article walks through building an EasyRedis service in Go, explaining Redis's lazy and timed expiration strategies, showing concrete code for on‑read expiration checks, and detailing a time‑wheel implementation that efficiently schedules key deletions.
GoKey Expirationbackend development
0 likes · 8 min read

The article explains the concept of delayed tasks versus scheduled tasks in payment systems, outlines their key differences, and evaluates five practical implementation approaches—Quartz database polling, JDK DelayQueue, Netty's HashedWheelTimer, Redis ZSET/Keyspace notifications, and RabbitMQ delayed queues—detailing their code examples, advantages and drawbacks.
DelayQueueJavaQuartz
0 likes · 16 min read

The article describes how Volcano Engine's DataTester team refactored the advertising AB testing platform by splitting services, redesigning the data model with MySQL and ClickHouse, introducing DAG‑based scheduling and a time‑wheel algorithm, and applying domain‑driven design and rigorous unit testing to improve stability, scalability, and maintainability.
AB TestingDAG Schedulingdata pipeline
0 likes · 16 min read


JD TechFeb 23, 2023 · Backend Development
This article provides an in‑depth overview of scheduled task processing, covering common business scenarios, fundamental principles, single‑machine algorithms such as min‑heap and time‑wheel, Java utilities like Timer, DelayQueue, ScheduledExecutorService, Spring Task, Quartz, and distributed approaches using Redis, Elastic‑Job, and XXL‑Job.
SpringTask Schedulingcron
0 likes · 22 min read

This article walks through XXL-JOB’s architecture, module layout, initialization of admin and executor components, thread‑pool strategies, registry and monitoring threads, job‑failure handling, time‑wheel scheduling, and the detailed Java code that powers the distributed task scheduler.
Distributed SchedulingJavaXXL-JOB
0 likes · 21 min read

This article surveys common delayed‑message solutions—including database, RocksDB, Redis, and open‑source MQs like RocketMQ, Pulsar, and QMQ—explaining their architectures, advantages, drawbacks, and practical considerations for building reliable distributed asynchronous messaging.
Delayed MessagingRocketMQbackend architecture
0 likes · 13 min read

This article compares delayed tasks with scheduled tasks, explains their differences, and presents five practical Java solutions—including database polling, JDK DelayQueue, Netty time wheel, Redis implementations, and RabbitMQ—detailing each approach's design, code examples, advantages, and drawbacks.
JavaRabbitMQdelayed tasks
0 likes · 19 min read

The article examines five backend techniques for automatically closing unpaid e‑commerce orders—scheduled tasks, RocketMQ delayed messages, RabbitMQ dead‑letter queues, a time‑wheel algorithm, and Redis key‑expiration listeners—detailing their principles, advantages, drawbacks, and sample Java code implementations.
Message QueueRocketMQorder auto‑closure
0 likes · 16 min read

The article explains why common shortcuts such as Redis key‑space expiration notifications, RabbitMQ dead‑letter queues, and non‑persistent time wheels are unreliable for implementing delayed tasks, and recommends using proper message‑queue solutions like RocketMQ, Pulsar, or Redisson DelayQueue with compensation mechanisms.
Message QueueRabbitMQdelayed tasks
0 likes · 8 min read

The article explains why using Redis key‑expiration notifications or RabbitMQ dead‑letter queues for delayed task execution is risky, compares several common approaches, and recommends reliable solutions such as dedicated message‑queue schedulers, Redisson delay queues, or time‑wheel implementations with proper compensation mechanisms.
Message QueueRabbitMQRedisson
0 likes · 9 min read

This article examines why using Redis key‑space expiration listeners, RabbitMQ dead‑letter queues, and in‑memory time wheels are unreliable for precise delayed‑task execution, and recommends more robust solutions such as dedicated message‑queue delay features and Redisson DelayQueue with fallback mechanisms.
RabbitMQRedissondelayed tasks
0 likes · 6 min read

The article compares five delayed‑task implementations—database polling, JDK DelayQueue, Netty time wheel, Redis sorted sets, and RabbitMQ dead‑letter queues—detailing their concepts, Java code examples, advantages, and drawbacks to help developers choose the most suitable approach for order‑timeout scenarios.
DelayQueueJavaQuartz
0 likes · 16 min read

The article explains why a time‑wheel scheduler outperforms traditional timers, describes single‑ and multi‑layer wheel designs, and walks through Apache Dubbo’s HashedWheelTimer implementation—including TimerTask, Timeout, bucket and worker components—showing its use in Dubbo heartbeats and Redisson lock renewal.
ConcurrencyDubboJava
0 likes · 23 min read

This article explains the time wheel timer algorithm, its basic design, how tasks are added and expire, the need for dynamic and hierarchical wheels, and illustrates these concepts with examples from Kafka and Netty, using animated diagrams for clarity.
KafkaNettyhierarchical timing wheel
0 likes · 9 min read

This article surveys various delayed queue implementations—including Kafka, RocketMQ, Redis (Redisson), and Netty’s HashedWheelTimer—examining their design principles, advantages, drawbacks, and integration strategies, and proposes a unified micro‑service architecture leveraging Kafka topics, Redis ZSETs, and thread‑pool optimizations for reliable message scheduling.
KafkaNettyRocketMQ
0 likes · 15 min read

This article surveys delayed‑queue implementations, comparing Kafka, RocketMQ, and Redis (Redisson) designs, outlining their architectures, pros and cons, integration details, timing‑wheel mechanisms, and practical considerations for building a reliable distributed delayed‑queue service.
Kafkadelayed queuedistributed systems
0 likes · 13 min read

This article explains the design of a distributed timer service using a time‑wheel data structure stored in Redis, covering application scenarios, required features, architecture components such as access layer, scheduler, worker, and management center, and detailing reliability and performance techniques.
High AvailabilityKafkadistributed timer
0 likes · 13 min read

The article explains the concept of delayed tasks, distinguishes them from scheduled tasks, and evaluates five practical implementation approaches—including database polling, JDK DelayQueue, Netty time‑wheel, Redis sorted‑set and key‑space notifications, and RabbitMQ delayed queues—while providing code samples, performance pros and cons, and deployment considerations.
JavaQuartzRabbitMQ
0 likes · 20 min read

The article details Tencent’s design and implementation of a distributed timer service—using a multi‑level time‑wheel stored in a KV system, a scheduler daemon, broker, and notifier—to support reliable, low‑latency delayed tasks such as order closure and SMS activation, while addressing isolation, rate limiting, disaster recovery, and delivery guarantees.
High AvailabilityKV storageTask Scheduling
0 likes · 15 min read

The article explains how Kafka implements a hierarchical time‑wheel—a ring of bucket sets with a map for O(1) insertion, removal and expiration—to replace costly per‑tick scans, enabling efficient management of millions of delayed tasks across multiple timeout layers.
BackendKafkadata structure
0 likes · 16 min read

Facing the challenge of processing over 100 million daily parcels, Alibaba’s Cainiao designed a lightweight, time‑wheel‑based scheduling engine that decouples task storage from timing, leverages partitioned task chains, master‑driven node IDs, and cluster‑wide soft‑load balancing to achieve scalable, fault‑tolerant timer processing.
Backend EngineeringTask Schedulingcluster management
0 likes · 12 min read
