This article explains how to use the iptables hashlimit module to create a stateful rate‑limiting chain, details the required commands, clarifies the meaning of the --hashlimit‑upto and --hashlimit‑burst parameters, and provides an example illustrating credit‑based packet acceptance.
This article walks through practical trade‑offs in designing a Go microservice framework, covering protocol choices, data transport, network handling, serialization methods, service registry options, routing algorithms, and rate‑limiting strategies, while highlighting real‑world implementation details and pitfalls.
This article explains how to configure distributed rate limiting in Spring Cloud Gateway by adding the reactive Redis dependency, setting up Redis connection properties, defining a RequestRateLimiter filter with token‑bucket parameters, implementing a custom KeyResolver, and demonstrating the behavior with HTTP 429 and 403 responses.
This article explains how to build highly available microservice systems by applying fault‑tolerance patterns such as graceful degradation, health checks, self‑healing, failover caches, retries, rate limiting, bulkhead isolation, circuit breakers, and systematic failure testing, while also covering change‑management and deployment strategies.
The article examines B‑Station’s July 2021 outage, explains the concept and quantitative metrics of high availability, and outlines practical techniques such as rate limiting, isolation, failover, timeout control, circuit breaking, degradation, and multi‑region deployment to achieve resilient systems.
This article shares practical insights on API design, covering fundamental concepts, rate‑limiting strategies, versioning practices, security considerations, and tips for cross‑team API integration, all illustrated with real‑world examples and concise code snippets.
This article provides a detailed overview of Nginx, covering its lightweight architecture, high‑concurrency event‑driven model, common use cases such as static file serving, reverse proxy and load balancing, step‑by‑step configuration examples, and advanced topics like rate limiting, health checks, gzip compression, and high‑availability deployment.
This article explores the avalanche effect in distributed systems, outlines common failure scenarios, and presents effective mitigation tactics such as hardware redundancy, dynamic scaling, and isolation, then delves into popular rate‑limiting algorithms—including count, fixed and sliding windows, leaky bucket, and token bucket—followed by an overview of leading circuit‑breaker solutions like Sentinel and Hystrix.
This article outlines a comprehensive, cloud‑native rate‑limiting solution using Kong gateway, covering background challenges, design considerations, multi‑layer architecture, plugin development, CI/CD workflow, deployment strategies, and operational best practices to achieve low cost, high efficiency, and high quality across diverse projects.
This article shares practical insights on API design, covering fundamentals, rate limiting, version management, security considerations, and inter‑team integration, illustrated with code snippets and diagrams to help developers build clear, standardized, and robust backend interfaces.
Rate limiting safeguards distributed systems by controlling request rates through algorithms such as leaky bucket, token bucket, fixed and sliding windows, and back pressure, while client‑side tactics like exponential backoff, jitter, and careful retries, and requires atomic distributed storage solutions (e.g., Redis+Lua) to avoid race conditions.
From kickoff meetings and traffic forecasting to load‑testing strategies, rate‑limiting designs, emergency runbooks, and post‑event retrospectives, this guide walks engineers through the complete technical workflow required to ensure a Double‑11‑scale e‑commerce promotion runs smoothly and safely.
The article explains how to build highly available microservice systems by isolating failures, applying graceful degradation, change‑management, health checks, self‑healing, fallback caches, circuit breakers, retry policies, rate limiting and testing strategies, while acknowledging the cost and operational complexity involved.
This article presents Ctrip's backend engineering practices for the Direct Connection Platform, detailing how a sandbox testing environment, automated acceptance, rate‑limiting, and circuit‑breaking mechanisms were introduced to boost supplier onboarding speed and enhance overall system stability.
This article outlines ten practical methods to secure API data, covering encryption of transmission, digital signing, token authentication, timestamp and nonce replay protection, rate limiting, blacklist/whitelist controls, data masking, and parameter validation, with detailed explanations and implementation steps.
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.
This tutorial explains what gateway rate limiting is, shows how to integrate Alibaba Sentinel with Spring Cloud Gateway, details the configuration of Sentinel dashboard, gateway flow rules, API group management, implementation principles, and how to customize block responses for robust microservice protection.
This tutorial demonstrates how to install Aeraki Mesh, use its MetaRouter CRD to configure local rate limiting for MetaProtocol services such as Dubbo and Thrift, apply per‑service and conditional limits, and view the generated sidecar proxy configuration in a Kubernetes environment.
Monet is a custom API gateway built on Spring Cloud Gateway that consolidates multiple platform endpoints into a single domain, providing unified routing, API management via Zookeeper, authentication and authorization, dynamic rate‑limiting with Sentinel, and extensible monitoring, addressing scalability and operational challenges of the Linglong platform.
This guide explains how to integrate Alibaba Cloud MSE's Sentinel-based rate limiting and degradation features into Go microservices, covering the three-step model, SDK setup, resource definition, and configuration of flow, isolation, circuit‑breaker, and hotspot rules.
This article describes a backend solution that uses Redis for configurable rate‑limiting and interface switches, and Hystrix for circuit‑breaking, detailing the requirements, AOP‑based approach, and full Java code implementation for managing non‑core query overloads.
This article explains the concept of interface idempotency, demonstrates how to achieve idempotent update operations using version control and token mechanisms, and provides a comprehensive guide to distributed rate limiting—including time‑window and resource‑based dimensions, token‑bucket and leaky‑bucket algorithms, and practical implementations with Guava RateLimiter, Nginx, and Redis‑Lua scripts.
This article outlines ten practical methods for protecting API data, covering transmission encryption, digital signatures, token authentication, timestamp and nonce mechanisms, rate limiting, blacklist/whitelist controls, data masking, and parameter validation to ensure comprehensive interface security.
This article provides a step‑by‑step guide to installing Nginx, explains core directives such as listen, server_name, location, and proxy_pass, and covers advanced topics including rate limiting, load balancing methods, keepalive connections, static resource handling, CORS, and anti‑hotlinking configurations.
Spring Cloud Tencent, open‑sourced on June 14, offers a comprehensive, Spring‑compatible microservice suite built on Tencent's Polaris platform, providing service discovery, configuration, routing, rate limiting, and circuit breaking, while explaining its motivations, core capabilities, and future roadmap for Java developers.
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.
This article introduces Spring Cloud Tencent, Tencent’s open‑source microservice solution built on Polaris, and walks through installing Polaris, adding service discovery, configuration management, rate limiting, routing, and circuit‑breaker features with detailed Maven dependencies and YAML configurations, plus code examples for each step.
This article provides a step‑by‑step tutorial on installing Nginx, explains core directives such as listen, server_name, and location, and covers advanced topics like rate limiting, various load‑balancing algorithms, reverse proxy setup, keepalive tuning, gzip compression, CORS, anti‑leech, and integration with LVS and keepalived for high‑availability deployments.
This guide walks through installing Nginx, explains essential directives such as listen, server_name, location and proxy_pass, demonstrates reverse‑proxy setups, details rate‑limiting and connection‑limiting modules, explores various upstream load‑balancing strategies, and covers performance‑tuning options like keepalive, gzip, and CORS handling.
This article explains various rate‑limiting techniques—including counter, sliding window, leaky bucket, token bucket, and Redis‑Lua distributed limiting—detailing their principles, implementation logic, advantages, drawbacks, and practical code examples for high‑concurrency e‑commerce systems in.
This article explains how to integrate Alibaba Sentinel with Spring Cloud Gateway to configure rate‑limiting and circuit‑breaker rules, covering Maven dependencies, Java configuration classes, Sentinel rule definitions, and optional console‑based management for robust backend API protection.
This article explains three Redis‑based rate‑limiting methods—using SETNX for simple counters, leveraging ZSET for a sliding‑window algorithm, and implementing a token‑bucket scheme with LISTs—complete with Java code examples and discussion of their advantages and drawbacks.
This article explains what rate limiting is, why it is needed, various strategies and algorithms such as leaky bucket, token bucket, fixed and sliding windows, and discusses challenges like inconsistency and race conditions in distributed systems, as well as different throttling types.
This article demonstrates how to integrate Alibaba Sentinel into Spring Cloud Gateway for traffic rate limiting and circuit breaking, covering Maven dependencies, configuration of SentinelGatewayFilter and exception handler, rule definitions via YAML or Java code, and custom API grouping, providing a complete backend gateway protection guide.
This article explains the importance of interface idempotency and presents a comprehensive guide to distributed rate limiting, covering key dimensions, token‑bucket and leaky‑bucket algorithms, and concrete implementations using Guava RateLimiter, Nginx, and Redis‑Lua with Java code examples.
This article explains how to build highly available microservice systems by defining clear service boundaries, employing graceful degradation, change‑management strategies, health checks, self‑healing, cache failover, retry logic, rate limiting, bulkheads, circuit breakers, and testing techniques to mitigate failures in distributed environments.
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.
This guide walks through creating a SpringBoot service, adding Sentinel dependencies, writing a high‑traffic test endpoint, explaining Sentinel’s entry/exit logic, and configuring the Sentinel dashboard to enforce a single‑node QPS limit of 20, complete with code samples and screenshots.
This article presents a comprehensive design of the Cleaner anti‑crawler system, detailing its background, current challenges, related research, system architecture—including a Flink‑based data processing center, a strategy‑driven ban center, and a lightweight ban store—and evaluates its effectiveness in real‑time bot mitigation.
The article discusses how to achieve interface idempotency using unique business identifiers or token mechanisms, then explores distributed rate limiting by outlining its dimensions, common algorithms such as token bucket and leaky bucket, and provides concrete implementation examples with Guava RateLimiter, Nginx, and Redis‑Lua scripts.
This comprehensive guide explains what Nginx is, its advantages, typical use cases, request handling, high‑concurrency architecture, proxy types, directory layout, key configuration directives, virtual host setup, load‑balancing algorithms, rate‑limiting, static‑dynamic separation, gzip compression, health checks, and practical code examples for production deployments.
This guide explains how to use Alibaba Cloud's Application High Availability Service (AHAS) to monitor QPS, define granular rate‑limiting rules, prevent abuse, isolate upstream failures, and protect both HTTP and non‑HTTP workloads in microservice architectures.
The article explains why distributed systems need fault‑tolerance mechanisms such as rate limiting, circuit breaking, and service degradation, describes common metrics (TPS, HPS, QPS), outlines several limiting algorithms (counter, sliding window, leaky bucket, token bucket, distributed and Hystrix‑based), and discusses circuit‑breaker states, considerations, and practical Hystrix usage.
To deliver a flawless live broadcast of the 2021 League of Legends S11 World Championship to over 100 million viewers, Bilibili mobilized hundreds of engineers for four months, establishing strict standards, modeling dozens of user scenarios, estimating traffic, conducting layered stress and chaos tests, implementing automated and manual degradation, detailed SOPs, rate‑limiting safeguards, and on‑site monitoring, which together ensured system stability throughout the event.
This article explains how to achieve interface idempotency using unique business IDs or token mechanisms and presents comprehensive distributed rate‑limiting techniques—including token‑bucket and leaky‑bucket algorithms, Nginx directives, Guava RateLimiter, and Redis‑Lua scripts—along with practical Spring Boot code examples.
This article details the architecture, S3‑compatible functionality, rate‑ and bandwidth‑limiting mechanisms, dependency degradation strategies, multi‑cloud switching, monitoring, and future roadmap of the Beike storage gateway, illustrating how it achieves high availability and scalability for billions of objects.
This article explains three Redis‑based rate‑limiting techniques—setnx with expiration, a sliding‑window implementation using sorted sets, and a token‑bucket algorithm with lists—complete with Java code examples and discussion of their advantages and limitations for high‑concurrency backend services.
This article explains why client‑side circuit breaking is essential, describes common state‑machine and Google SRE breaker strategies, provides practical pseudocode, and discusses mitigation methods such as Gutter mode, jittered exponential backoff, and graceful degradation to protect system stability.
This article provides a comprehensive overview of Nginx, covering its definition, advantages, typical use cases, request processing flow, high‑concurrency design, proxy types, directory layout, key configuration directives, load‑balancing algorithms, rate‑limiting mechanisms, security features, and practical deployment tips for modern web services.
The article explains why service rate limiting is essential for high‑concurrency systems, compares it with service degradation, describes common algorithms such as counter, leaky bucket and token bucket, and shows how to implement distributed rate limiting using Redis.
This article explains why service rate limiting is essential for high‑concurrency systems, compares it with service degradation, introduces common limiting algorithms such as counter, leaky‑bucket and token‑bucket, and shows how to implement distributed rate limiting using Redis for real‑world backend services.
The article details Vivo’s push notification platform, describing its evolution from cloud‑based beginnings to a self‑built, three‑region architecture that supports over 1 million concurrent connections, billions of daily messages, and incorporates optimizations such as adaptive heartbeats, advanced load‑balancing, distributed caching, multi‑layer rate limiting, circuit‑breaker mechanisms, and comprehensive content security.
This article demonstrates how to build a token‑bucket based rate‑limiting solution in a Spring Boot application using a custom annotation, an interceptor, a bucket utility class, scheduled token generation, and global AOP exception handling to control access to APIs.
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.
This article explains how to protect a Spring Boot API from traffic spikes by applying common rate‑limiting algorithms, configuring Redis for distributed throttling, writing Lua scripts for atomic counters, and integrating a custom @Limit annotation with AOP to enforce limits across a cluster.
This article details the step‑by‑step design, architecture, plugin configuration, authentication methods, code implementation, and performance testing of a Kong‑based API gateway built to handle millions of QPS during large‑scale events, highlighting challenges, solutions, and future directions.
This article details the design and implementation of the Apex API gateway at Tencent, covering its architecture, dynamic routing, multi‑protocol support, distributed rate limiting, circuit breaking, service discovery, data masking, orchestration, testing automation, push services, observability, and future roadmap.
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.
On December 20 the Xi'an health‑code app "One‑Code Pass" suffered a massive outage as a sudden traffic surge overwhelmed its query‑heavy backend, exposing network bottlenecks and a lack of scaling mechanisms, prompting a detailed technical analysis and proposed architectural remedies.
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.
This article examines the core challenges of flash‑sale (秒杀) systems—such as overselling, extreme concurrency, bot traffic, and database strain—and presents a comprehensive backend design that includes dedicated databases, dynamic URLs, static pages, Redis clustering, Nginx load balancing, SQL optimization, rate‑limiting, asynchronous order queues, and service degradation strategies.
This article explains the motivations, resource granularity, rule definition, calculation logic, and implementation steps for building effective rate‑limiting and circuit‑breaking mechanisms in microservice architectures and API gateways, emphasizing sliding‑window statistics and decoupled interceptor design.
This article explores the motivations, concepts, and practical implementation strategies for rate limiting and circuit breaking in microservice architectures, covering resource granularity, rule definition, sliding‑window calculations, and integration with API gateways to prevent cascading failures and resource exhaustion.
This article uses the historic Battle of Red Cliffs as an analogy to explain service avalanche, its causes in micro‑service architectures, and how circuit‑breaker, rate‑limiting, and isolation techniques can prevent cascading failures in modern distributed systems.
This article examines the challenges of flash‑sale (秒杀) systems—such as overselling, massive concurrency, URL exposure, and database strain—and presents a comprehensive backend design that includes dedicated databases, dynamic URLs, static page generation, Redis clustering, Nginx load balancing, SQL optimization, rate‑limiting, asynchronous order processing, and service degradation strategies.
This article explains why rate limiting is essential for system stability, outlines common throttling patterns such as circuit breaking, degradation, delayed processing, and privilege handling, and dives into popular algorithms like counter, leaky bucket, and token bucket with concrete Java and Nginx examples.
The article explains the characteristics of flash‑sale scenarios, presents core design principles such as rate limiting, peak shaving, asynchronous processing and scalability, and details a complete backend and frontend architecture—including Redis‑based queueing and caching—to build a robust, high‑throughput seckill system.
This article explains how miscalculating Hystrix semaphore quotas, combined with a JDK GCLocker‑initiated GC bug, can cause unexpected request rejections, and provides a proper method for computing concurrency limits and alternative buffering strategies such as Java semaphores and thread pools.
This article examines the challenges of implementing a flash‑sale (秒杀) system—such as overselling, massive concurrency, request throttling, and database strain—and proposes a comprehensive backend architecture using separate databases, dynamic URLs, static pages, Redis clustering, Nginx, token‑bucket rate limiting, asynchronous order processing, and service degradation strategies.
This guide explains how to design a robust flash‑sale (秒杀) system that handles instant high traffic by combining page staticization, CDN acceleration, caching strategies, distributed locks, optimistic DB updates, Redis atomic operations, message‑queue async processing, rate limiting, and other techniques to prevent overload, data loss, and unfair access.
This article explains how to handle massive flash‑sale traffic by combining CDN edge services, distributed rate‑limiting, load‑balancing, authentication, caching, and task queues to ensure performance, prevent overselling, and maintain data consistency under extreme load.
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.
The article explains the high‑traffic flash‑sale scenario, analyzes synchronization, bot‑prevention, and server‑capacity challenges, and presents distributed architectural solutions such as CDN edge services, rate‑limiting, load‑balancing, and caching to reliably handle millions of concurrent requests.
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.
The article examines the challenges of implementing flash‑sale (秒杀) functionality—such as time synchronization, bot prevention, and massive backend load—and presents two CDN‑centric architectural solutions, including probabilistic request routing and layered filtering with authentication, load balancing, rate limiting, and caching.
Service degradation involves strategically reducing or disabling non‑essential features during traffic spikes or failures to maintain core functionality, covering concepts like SLA levels, fallback data, rate‑limiting, timeout handling, circuit breaking, and front‑end and back‑end downgrade techniques for high‑availability systems.
This article demonstrates how to integrate Alibaba Sentinel into Spring Cloud Gateway to implement both route‑level and custom API‑level rate limiting, covering project setup, Maven dependencies, configuration files, custom block responses, and the importance of combining gateway and service‑side throttling for robust microservice protection.
This article analyzes the challenges of implementing flash‑sale (秒杀) systems such as massive concurrent traffic, time synchronization, bot detection, and data consistency, and presents two distributed architectural solutions using CDN edge nodes, load balancing, rate limiting, caching, and backend scaling to handle millions of requests.
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.
Service degradation, a crucial reliability technique, involves selectively disabling non-essential features, applying rate limiting, timeout handling, fallback data, and tiered switches across front‑end, back‑end, and infrastructure layers to maintain core functionality during traffic spikes or component failures, ensuring high availability and meeting SLA targets.
This article explains how to apply rate limiting at each layer of a modern service architecture—SLB, Nginx, Spring Cloud Gateway, and individual microservices—detailing traffic characteristics, interception methods, isolation techniques, and practical configurations to protect systems from overload, attacks, and cascading failures.
This article examines the challenges of building a flash‑sale system—such as overselling, massive concurrent requests, URL exposure, and database pressure—and presents a comprehensive backend design that includes dedicated databases, dynamic URLs, static pages, Redis clustering, Nginx load balancing, SQL optimization, token‑bucket rate limiting, asynchronous order processing, and service degradation techniques.
This article explores the key challenges of designing a flash‑sale (秒杀) system—such as overselling, massive concurrent traffic, bot abuse, URL exposure, and database bottlenecks—and presents a comprehensive backend architecture with Redis clustering, Nginx load balancing, dynamic URLs, rate‑limiting, asynchronous order processing, and service degradation strategies.
This article explains the principles and practical steps for implementing rate limiting at the SLB, Nginx/Kong, Spring Cloud Gateway, and Java microservice layers, covering traffic characteristics, interception rules, configuration methods, and isolation techniques to protect cloud‑native systems.
This tutorial explains why API rate limiting is essential for high‑traffic Spring Boot services, introduces counter, leaky‑bucket, and token‑bucket algorithms, shows how to use Guava's RateLimiter, and demonstrates a clean custom‑annotation AOP solution to decouple rate‑limiting logic from business code.
This article explains why rate limiting is essential for system stability, compares circuit breaking, service degradation, delayed processing, and privileged handling, details counter, leaky‑bucket, and token‑bucket algorithms, and provides concrete Java, Guava, and Nginx‑Lua code examples for practical deployment.
This article presents a comprehensive, step‑by‑step guide on improving system reliability through early fault detection, scope reduction, frequency reduction, and rapid incident handling, using real‑world practices from Baidu's commercial hosting platform.
Rate limiting protects services from overload by controlling traffic, using techniques such as circuit breaking, degradation, buffering, privilege handling, and algorithms like counters, leaky bucket, and token bucket, with implementations ranging from Guava in Java to Nginx+Lua for distributed systems.
This article analyzes Sentinel's flow‑control implementation by walking through the core Java methods such as entry, checkFlow, canPassCheck, passClusterCheck, and canPass, explaining how sliding‑window metrics and token‑bucket logic determine whether a request is allowed or throttled.
This guide explores sixteen practical Redis use cases—from caching and distributed locks to rate limiting, bitmaps, shopping carts, timelines, and ranking—detailing data types, commands, and implementation tips that help developers build efficient, scalable backend services.
The article explains how to apply rate‑limiting at each entry point of a distributed system—SLB, Nginx, Spring Cloud Gateway, and individual Java microservices—detailing traffic characteristics, limiting strategies, isolation techniques, and the role of circuit breaking to protect backend stability.
This article explains the architecture of a microservice‑centric API gateway, covering its overall placement, request dispatch, conditional routing, API management, rate‑limiting, circuit‑breaking, security policies, monitoring, tracing, and future improvement directions.
The article explains service degradation concepts, defines SLA levels and the meaning of six nines, and details various degradation techniques such as fallback data, rate‑limiting, timeout, fault handling, read/write strategies, frontend safeguards, and the use of switches and pre‑embedding to maintain system availability during traffic spikes or failures.
This article comprehensively explains rate‑limiting concepts for Spring Cloud Gateway, covering common throttling scenarios, major algorithms such as Fixed Window, Sliding Window, Leaky Bucket and Token Bucket, reviews popular open‑source libraries, and demonstrates both single‑node and distributed implementations with detailed code examples.
This article explains why rate limiting is needed in both physical venues and online systems, describes common limiting strategies such as circuit breaking, service degradation, delayed processing, and privileged handling, and details three major algorithms—counter, leaky bucket, and token bucket—along with practical Java and Nginx‑Lua code examples.
This article explores sixteen practical Redis patterns—including caching, distributed sessions, locks, global IDs, counters, rate limiting, bitmaps, shopping carts, timelines, message queues, lotteries, likes, tags, product filtering, follow relationships, and rankings—demonstrating how each can be implemented with simple Redis commands to enhance performance and scalability.
This article details the architecture, core functions, and implementation techniques of a reactive, RxNetty‑based API gateway that handles request dispatch, conditional routing, API management, rate limiting, circuit breaking, security policies, and monitoring within a microservices ecosystem.