Talk

Load Shedding and Client Prioritization in Spring Cloud Gateway

  • In Russian

In high-critical distributed systems, handling unpredictable traffic spikes while ensuring priority access for critical clients is a key challenge. Traditional rate limiting and quotas help control load but lack dynamic prioritization when multiple clients compete for limited resources.

In this talk, we will explore a custom load-shedding mechanism with client prioritization built on Spring Cloud Gateway. We will review the limitations of standard approaches and demonstrate how a custom filter with Redis-based distributed capacity tracking can enforce priority access while redistributing unused capacity.

We will cover:

  1. Distributed capacity management architecture and implementation using Redis and Lua scripts for atomic operations.
  2. Client prioritization and capacity redistribution algorithm.
  3. API for real-time capacity limits adjustment.
  4. Spring Cloud Gateway filter implementation details.
  5. Edge-case handling and lessons learned from production usage.

This session will be valuable for developers working with microservices, API gateways, and traffic management, looking for scalable, adaptive request handling beyond conventional rate limiting that prioritizes clients based on their criticality.

Speakers

Talks