Tagged articles
Sliding Window
67 articles · Page 1 of 1
This article deep-dives into Sentinel's core mechanisms including sliding window statistics, three rate-limiting algorithms, circuit breaker state machine, Slot chain execution flow, hotspot parameter limiting, rule persistence modes, Gateway/Feign integration, threshold calculation, and common pitfalls with troubleshooting steps.
Circuit BreakerFlow ControlLeaky Bucket
0 likes · 45 min read

This article walks through the complete TCP connection lifecycle from SYN to FIN, explaining three-way handshake, four-way handshake, sliding window, flow control, congestion control algorithms (slow start, congestion avoidance, fast retransmit/recovery), the TCP state machine with 11 states, and practical troubleshooting for CLOSE_WAIT, SYN_RECV, FIN_WAIT_2, and TIME_WAIT issues using ss/tcpdump/Wireshark.
Flow ControlSliding WindowTCP
0 likes · 25 min read

This article uses 28 diagrams to comprehensively explain TCP, covering network layering, TCP header structure, byte-stream orientation, reliable transmission mechanisms (sliding window, ARQ, acknowledgments), congestion control algorithms (slow start, congestion avoidance, fast retransmit/recovery), three-way handshake and four-way termination, UDP comparison, and practical issues like packet fragmentation, sticky packets, and SYN flood attacks.
NetworkingSYN FloodSliding Window
0 likes · 27 min read

This article details a production-grade five-layer traffic protection architecture for microservices, covering hierarchical rate limiting algorithms, IP and user-level sliding window implementations with Redis Lua scripts, dynamic blacklist mechanisms, interface classification (P0/P1/P2), and a real incident review where crawlers bypassed global limits and were defeated by fine-grained controls.
Lua ScriptProduction ArchitectureRedis
0 likes · 15 min read

This article details the development of custom Spring Cloud Gateway plugins for rate limiting, circuit breaking, and gray release to overcome Sentinel's production limitations, covering architecture design, Redis-based rule storage with pub/sub, token bucket and sliding window algorithms, circuit breaker state machines, tag-based canary routing, and production lessons learned with performance benchmarks.
Gray ReleaseRedisSliding Window
0 likes · 20 min read

This article details a production-ready distributed rate limiting system using Spring Boot AOP, Redis Sorted Sets, and atomic Lua scripts, covering sliding window and token bucket algorithms, multi-dimensional flash sale protection, and benchmark results showing 100% accuracy with minimal latency overhead.
AOPLuaRedis
0 likes · 18 min read


liandkJul 21, 2026 · Fundamentals
The article explains why network speed can be inconsistent by breaking down TCP's two core mechanisms—sliding window for flow control and congestion control for traffic management—using simple scenarios, step‑by‑step workflows, and interview‑ready summaries.
Flow ControlSliding WindowTCP
0 likes · 5 min read

The article explains TCP's retransmission mechanisms (timeout and fast retransmit), selective acknowledgment (SACK), sliding window and MSS limits, packet sticking causes and solutions, as well as flow control and congestion control techniques including slow start, congestion avoidance, and fast recovery.
Flow ControlSACKSliding Window
0 likes · 13 min read

This article dissects the classic LeetCode #3 longest‑substring‑without‑repeating‑characters problem, shows why a HashSet‑based solution incurs heavy boxing overhead, and walks through three progressive optimizations—using a boolean array, index‑jumping with an int array, and refined update timing—to shrink runtime from 8 ms to about 2 ms, while highlighting common pitfalls and best‑practice guidelines.
AlgorithmHashSetJava
0 likes · 12 min read


XikeJun 11, 2026 · Artificial Intelligence
This guide demonstrates how to replace a simple message list with a ContextManager that tracks user and assistant turns, estimates token usage, applies a sliding‑window truncation based on a token budget, and provides a single build_for_llm entry point to keep multi‑turn dialogues stable and observable.
LLMPythonSliding Window
0 likes · 11 min read

This article details a production-ready QPS monitoring implementation for Spring Boot using sliding window algorithm with RingBuffer and LongAdder for high-concurrency safety, integrated with Micrometer for metrics exposure, covering algorithm design, code implementation, performance optimization, and distributed monitoring strategies.
Distributed MonitoringLongAdderMicrometer
0 likes · 19 min read

This tutorial walks through why API rate limiting is a critical first line of defense for backend services, compares fixed‑window and sliding‑window strategies, and shows how to create a custom @RateLimit annotation, utility classes, an AOP aspect, Redis or local storage, and unified exception handling, providing complete code and test scenarios for Spring Boot 2.7.x.
AOPFixed WindowJava
0 likes · 31 min read

This article provides a comprehensive, production‑ready walkthrough of implementing Redis‑based rate limiting using token bucket and sliding window algorithms, covering algorithm fundamentals, code examples, performance testing, multi‑layer architecture, dynamic configuration, and best‑practice recommendations for high‑traffic backend services.
BackendLuaRedis
0 likes · 43 min read

This article explains the LeetCode 1297 problem of finding the substring that appears most often while respecting limits on distinct characters and length, and provides a detailed sliding‑window analysis together with complete Java and C++ reference implementations.
C++JavaSliding Window
0 likes · 6 min read

This article explains the problem of finding the longest substring without repeating characters, demonstrates a brute‑force O(n³) solution with code, then introduces an optimized sliding‑window approach that runs in linear time O(n), including detailed implementation, complexity analysis, and key insights.
AlgorithmSliding WindowString
0 likes · 5 min read

This article explains the principles and implementation details of common rate‑limiting algorithms—token bucket and sliding‑window counting—including their core concepts, key processes, Java code examples, and how to extend them to distributed scenarios with Redis Lua scripts.
RedisSliding Windowdistributed
0 likes · 19 min read

This article walks through the complete system‑design process for a Douyin‑style video leaderboard, covering requirement analysis, functional and non‑functional specs, scale estimation, single‑machine baseline, fault‑tolerance, sharding, time‑window handling with a double‑pointer method, and caching strategies to achieve low latency, high throughput, and precise results at massive scale.
Sliding Windowdistributed architecturehigh-throughput
0 likes · 26 min read

This article presents a complete, step‑by‑step analysis of a high‑concurrency Redis counter component that supports up to 100 000 QPS, covering business pain points, architectural design, two core counting strategies, sharding, local batch optimization, code walkthroughs, and performance benchmark results.
AOPCounterRedis
0 likes · 33 min read

This article explains TCP’s flow control and congestion control mechanisms, detailing sliding window operation, zero‑window probing, SWS, window scaling, and the core congestion algorithms (slow start, congestion avoidance, fast retransmit/recovery), and clearly contrasts their purposes, scopes, and key variables.
Flow ControlSliding WindowTCP
0 likes · 14 min read

This article walks through the end‑to‑end system design of a TikTok‑style video leaderboard, covering functional and non‑functional requirements, traffic estimation, single‑node prototypes, fault‑tolerant replication, sharding, elastic partitioning, sliding‑window counters, and caching strategies to achieve low‑latency, high‑throughput ranking at massive scale.
CachingShardingSliding Window
0 likes · 21 min read

This article systematically compares the architectures of recent large language models—including DeepSeek V3/R1, OLMo 2, Gemma 3, Mistral Small 3.1, Llama 4, Qwen 3, SmolLM 3 and Kimi 2—highlighting innovations such as MLA, MoE, post‑norm, sliding‑window attention, NoPE and optimizer choices, with diagrams and code examples to illustrate their impact on efficiency and performance.
LLMMLAMoE
0 likes · 12 min read

This article explains how to implement precise sliding‑window rate limiting using a Redis Lua script and a Spring‑based Java component, compares it with fixed‑window and token‑bucket approaches, and provides advanced techniques, production tips, and performance optimizations.
JavaLuaRedis
0 likes · 14 min read

This article explains how to implement a precise sliding‑window rate‑limiting algorithm using Redis Sorted Sets, detailing the problem scenario, the algorithm steps, Lua script implementation, Java integration, and practical extensions for high‑performance backend services.
BackendJavaLua
0 likes · 8 min read

This article walks through five concrete implementations for per‑minute API call counting—fixed window, lazy sliding window, Spring AOP, Redis time‑series, and Micrometer + Prometheus—detailing their design, code, trade‑offs, benchmark results, memory usage, and real‑world deployment tips.
API monitoringMicrometerPrometheus
0 likes · 25 min read

This article explains why per‑minute API call counting is essential for performance bottleneck detection, capacity planning, security alerts and billing, and presents five concrete Java‑based implementations—including a fixed‑window counter, a sliding‑window counter, AOP‑based transparent monitoring, a Redis time‑series solution, and Micrometer‑Prometheus integration—along with a hybrid architecture, performance benchmarks, and practical capacity‑planning advice.
API monitoringPrometheusRedis
0 likes · 25 min read

This article introduces the sliding window technique, demonstrates efficient PHP implementations for computing averages and handling real-time streams, provides optimization strategies, and outlines practical applications such as financial analysis, network monitoring, and recommendation systems, highlighting performance considerations for backend development.
PHPSliding Windowreal-time processing
0 likes · 6 min read

This article explains why rate limiting is essential for microservice reliability, outlines the key factors to consider before applying limits, compares major algorithms such as fixed‑window, sliding‑window, leaky‑bucket and token‑bucket, describes post‑limit actions, and details how Tencent Service Framework (TSF) implements configurable, tag‑based rate limiting in cloud‑native environments.
Service GovernanceSliding Windowmicroservices
0 likes · 19 min read

To prevent audit pipelines from choking during traffic surges, the article proposes augmenting the classic Chain of Responsibility with a sliding‑window anomaly detector, a statistically‑driven dynamic detector, a rule‑based backflow mechanism, and AI‑powered traffic forecasting, enabling adaptive routing and proactive scaling.
BackendJavaSliding Window
0 likes · 16 min read

This article explains how to solve the classic “longest substring without repeating characters” problem using a sliding‑window technique, detailing pointer management, duplicate detection, and a complete Go implementation.
AlgorithmGoSliding Window
0 likes · 3 min read

The article explains why rate limiting is essential for high‑traffic Spring Boot services, compares counter, sliding‑window, token‑bucket and leaky‑bucket algorithms, demonstrates implementations with plain Java, Guava RateLimiter, AOP, and distributed approaches using Redis‑Lua and Nginx‑Lua, and provides practical configuration examples.
GuavaRedisSliding Window
0 likes · 20 min read

Given a SATA disk capacity M and a sequence of blockchain file sizes, the task is to find the largest sum of a contiguous subsequence whose total does not exceed M, using an O(N) sliding‑window algorithm with O(1) extra space.
AlgorithmSliding Windowarray
0 likes · 5 min read

This comprehensive guide delves into TCP’s core mechanisms—including header fields, segmentation and reassembly, the three‑way handshake and four‑step termination, sliding‑window flow and congestion control, retransmission strategies, and connection design patterns—providing a solid foundation for network engineers and developers.
Flow ControlSliding WindowTCP
0 likes · 26 min read

This article explains three core rate‑limiting algorithms—Leaky Bucket, Token Bucket, and Sliding Window—detailing their principles, suitable scenarios, and provides complete Go implementations to help developers choose and integrate the right strategy for handling traffic spikes and protecting backend resources.
AlgorithmBackendLeaky Bucket
0 likes · 15 min read

This article explains the fundamental concepts of rate limiting, compares popular algorithms such as token bucket, leaky bucket, and sliding window, and reviews practical implementation methods including Nginx, middleware, Redis, Guava, and Tomcat configurations for both single‑machine and distributed environments.
Leaky BucketSliding Windowrate limiting
0 likes · 17 min read

This article explains the basic concepts, dimensions, and typical algorithms of rate limiting, discusses various implementation strategies such as token bucket, leaky bucket, and sliding window, and reviews practical solutions using Nginx, Guava, Redis, Sentinel, and Tomcat for both single‑node and distributed environments.
Leaky BucketSliding Windowtoken-bucket
0 likes · 16 min read

This article explains three Redis‑based rate‑limiting techniques—using SETNX, sorted sets, and a token‑bucket with lists—providing code examples, discussing their advantages and drawbacks, and showing how to integrate them into Java Spring applications to protect high‑concurrency services.
BackendJavaRedis
0 likes · 7 min read

This article explains two sliding‑window rate‑limiting methods for SMS sending—one based on IP address and another on phone number—and provides a complete PHP implementation using Redis sorted sets to enforce per‑minute, per‑10‑minute, and per‑hour limits.
BackendPHPRedis
0 likes · 3 min read

This guide explains the fundamental dimensions of rate limiting, compares token‑bucket, leaky‑bucket, and sliding‑window algorithms, and details practical implementations using Guava, Nginx, Redis, and Sentinel for both single‑node and distributed systems.
GuavaLeaky BucketRedis
0 likes · 17 min read

This article explains the fundamentals of rate limiting, describes widely used algorithms such as token bucket, leaky bucket, and sliding window, and details practical implementation methods ranging from single‑machine tools like Guava and Tomcat to distributed solutions using Nginx, Redis, and Sentinel.
Leaky BucketSliding Windowdistributed systems
0 likes · 17 min read

This article explains TCP's retransmission mechanisms—including timeout retransmission, fast retransmit, SACK and D‑SACK—along with sliding window operation, window sizing, and congestion control algorithms such as slow start, congestion avoidance, and fast recovery, providing a comprehensive network fundamentals guide.
SACKSliding WindowTCP
0 likes · 12 min read

This article explains the sliding window rate‑limiting algorithm, its advantages over fixed windows, and provides a detailed step‑by‑step implementation using Sentinel’s data structures, including window partitioning, bucket management, concurrency handling, and calculation of request counts within a moving time interval.
BackendConcurrencySentinel
0 likes · 8 min read

This article explores the importance of rate limiting in distributed micro‑service architectures, explains four core algorithms—fixed window, sliding window, leaky bucket, and token bucket—and details a practical, Redis‑backed multi‑layer throttling solution for a voice‑bot platform, including trade‑offs and implementation tips.
RedisSliding Windowdistributed systems
0 likes · 15 min read

This article explores three core rate‑limiting algorithms—Leaky Bucket, Token Bucket, and Sliding Window—detailing their principles, suitable scenarios, and provides complete Go implementations, enabling developers to choose and integrate the appropriate strategy for controlling request traffic without external dependencies.
BackendLeaky BucketSliding Window
0 likes · 15 min read

This article explains how Alibaba Cloud Container Service for Kubernetes (ACK) uses container‑level resource profiling with half‑life sliding windows and quantile algorithms to automatically recommend accurate CPU and memory requests, improving cluster utilization while maintaining application stability.
ACKKubernetesQuantile Algorithm
0 likes · 9 min read


政采云技术Mar 31, 2022 · Backend Development
This article introduces Alibaba's open‑source Sentinel framework, explains its ecosystem and key features, details the design of its high‑performance sliding‑window data structure (LeapArray) with Java code examples, and compares its flow‑control mechanism to Hystrix’s implementation.
Flow ControlHystrixSentinel
0 likes · 18 min read

This article continues the previous discussion on TCP handshakes and termination, then thoroughly explains nine essential TCP mechanisms—including sliding window, flow control, congestion control, delayed and piggyback ACKs, sticky packet handling, and keep‑alive—illustrated with diagrams and practical examples.
Flow ControlSliding WindowTCP
0 likes · 15 min read

The article explains the concepts, problem scenarios, resource granularity, rule definition, sliding‑window calculation, and implementation flow of rate limiting and circuit breaking in microservice architectures and API gateways, providing practical guidance for building robust backend services.
BackendSliding Windowcircuit breaking
0 likes · 13 min read

This article explains the motivations, concepts, resource granularity, rule definitions, and two‑stage sliding‑window computation needed to design and implement effective rate limiting and circuit breaking mechanisms for microservice APIs and API gateways, ensuring isolated failures do not cascade across services.
API GatewaySliding Windowcircuit breaking
0 likes · 13 min read

This article explores why engineering skills outrank pure algorithm knowledge, explains the challenges of implementing flow‑control algorithms such as token bucket and sliding‑window rate limiting, and walks through Sentinel‑Go's concrete LeapArray implementation with detailed Go code examples.
BackendSentinel GoSliding Window
0 likes · 11 min read

This article explains how to compute the maximum of each k‑sized sliding window over an integer array using both a priority‑queue (heap) approach and an optimized monotonic deque technique, complete with detailed walkthroughs, visual illustrations, and full Python code.
AlgorithmHeapSliding Window
0 likes · 9 min read

This article introduces the sliding window algorithmic technique, explains its relation to TCP flow control, demonstrates its implementation with Java code for maximum subarray sum, longest substring without repeats, and minimum window substring problems, and provides a reusable framework for solving similar LeetCode challenges.
AlgorithmLeetCodeSliding Window
0 likes · 10 min read

This article explains three practical Redis-based rate‑limiting techniques—using SETNX for simple counters, ZSET for a sliding‑window algorithm, and a token‑bucket implementation with List—complete with Java code examples and discussion of their advantages and drawbacks.
JavaRedisSliding Window
0 likes · 7 min read

This article explains three Redis‑based rate‑limiting methods—using SETNX, a ZSET sliding window, and a token‑bucket with List—provides Java code examples, and discusses their advantages, drawbacks, and how to integrate them into backend services.
JavaRedisSliding Window
0 likes · 6 min read

This article explains four common rate‑limiting algorithms—fixed‑window counter, sliding window, leaky bucket, and token bucket—detailing their mechanisms, advantages, drawbacks such as the critical‑window problem, and how they can be implemented simply using Redis in backend systems.
BackendLeaky BucketSliding Window
0 likes · 4 min read


政采云技术Oct 12, 2021 · Backend Development
This article explains the sliding‑window rate‑limiting technique used by Sentinel, presents a classic sliding‑window coding interview problem with a full Java solution, and then dives into Sentinel's internal classes such as WindowWrap, LeapArray, and MetricBucket to show how windows are created, updated, and slid over time.
BackendJavaSliding Window
0 likes · 16 min read

This article explains the purpose, scenarios, and detailed implementations of common rate‑limiting algorithms—including counter (fixed window), sliding window, token bucket, and leaky bucket—highlighting their advantages, drawbacks, and sample Python code for each.
BackendLeaky BucketSliding Window
0 likes · 12 min read

The article introduces the concept of rate limiting, explains why it is needed both offline (e.g., crowded theme parks) and online (e.g., flash sales), and details four common algorithms—counter, sliding window, leaky bucket, and token bucket—along with their implementation considerations and trade‑offs.
Leaky BucketSliding Windowcounter algorithm
0 likes · 9 min read

This article introduces a straightforward Java implementation of a sliding‑window rate‑limiting algorithm for single‑machine use, explains its core logic, demonstrates its behavior with sample output, and visualizes the step‑by‑step process of how timestamps are managed within the window.
AlgorithmJavaSliding Window
0 likes · 8 min read

Sentinel implements rate‑limiting through a chain‑of‑responsibility where annotated methods trigger SphU.entry, creating a Context, Node, and Entry; slots such as NodeSelectorSlot, ClusterBuilderSlot, StatisticSlot, and FlowSlot update sliding‑window metrics via LeapArray and enforce QPS thresholds, throwing BlockException on violations.
JavaSentinelSliding Window
0 likes · 18 min read

The article presents three scatter algorithms—column scatter, weight distribution, and sliding‑window—that reorder recommendation lists to disperse similar items, describing their mechanics, computational complexities, experimental trade‑offs, and a hybrid case study for efficient, multi‑dimensional list diversification.
RankingSliding Windowrecommendation
0 likes · 10 min read

This article explains the sliding‑window technique for solving the classic “Longest Substring Without Repeating Characters” problem, presents step‑by‑step analysis, demonstrates three Java implementations—from a basic set‑based method to hashmap and array optimizations—and discusses their time‑complexity improvements.
AlgorithmJavaSliding Window
0 likes · 8 min read

This article explains Flink's sliding window mechanism, shows how the WindowAssigner and WindowOperator work with code examples, analyzes the performance impact of fine‑grained sliding windows, and proposes a practical workaround using tumbling windows combined with external storage such as Redis for efficient PV/UV aggregation.
FlinkRedisSliding Window
0 likes · 8 min read

This article explains how to design a distributed backend that ingests millions of clicks per second, stores data with Kafka and HDFS, computes top‑N articles using sliding windows and periodic aggregation, handles node failures, and mitigates click fraud, all while balancing accuracy and resource usage.
BackendKafkaReal-time
0 likes · 13 min read

This article describes a flexible web crawler identification approach that combines sliding‑window data collection with Support Vector Machine classification, detailing the underlying concepts, feature extraction, system architecture, client‑server interaction, and deployment steps for practical use.
SVMSliding Windowclient‑server
0 likes · 7 min read

The author shares hands‑on experiences from a data‑mining contest, covering categorical feature handling, sliding‑window statistics, feature combination strategies, pandas performance tricks, file organization, and using nohup for remote Linux execution to improve model training efficiency.
CompetitionSliding Windowpandas optimization
0 likes · 6 min read


21CTOFeb 4, 2016 · Backend Development
This article explains how a rate‑limiting system can identify hot‑spot resources by using time‑window statistics, a concurrent LRU hash map, and cluster‑wide aggregation to efficiently track and evict low‑frequency keys while maintaining high throughput.
Backend PerformanceSliding Windowconcurrent data structures
0 likes · 9 min read

This article explains TCP fundamentals—including three‑way handshakes, sliding windows, and four‑way termination—then details how the RST flag works and how attackers can forge packets using source ports and sequence numbers to execute powerful RST denial‑of‑service attacks.
RST attackSliding WindowTCP
0 likes · 9 min read
