Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Microservices Load Shedding pattern #3229

Open
6 tasks
iluwatar opened this issue Mar 30, 2025 · 1 comment
Open
6 tasks

Implement Microservices Load Shedding pattern #3229

iluwatar opened this issue Mar 30, 2025 · 1 comment

Comments

@iluwatar
Copy link
Owner

Description

The Microservices Load Shedding pattern ensures a system gracefully handles overload situations by rejecting or shedding excess requests once it hits a predefined capacity limit. By proactively managing incoming load, the system preserves resources for critical requests and avoids a complete meltdown under high or unexpected traffic spikes.

Key Elements

  • Dynamic Throttling or Request Limiting: Automatically rejecting new requests when system capacity is reached.
  • Fail-Fast Mechanisms: Quickly responding with error codes or fallback responses, rather than letting requests queue indefinitely.
  • Monitoring & Capacity Management: Observing real-time traffic and system metrics to adjust thresholds.

References

  1. Microservices.io – Load Shedding Pattern
  2. Release It! by Michael T. Nygard
  3. Java Design Patterns – Contribution Guidelines

Acceptance Criteria

  • Create a new module or package named microservices-load-shedding (or similar).
  • Demonstrate how to detect and shed excess load (e.g., using a request queue with a maximum capacity).
  • Provide logic for fast failure or fallback responses when capacity is exceeded.
  • Include a README (or .md file) explaining the pattern, its benefits, and sample code.
  • Verify the implementation with tests simulating both normal load and overload scenarios.
  • Ensure conformance with repository standards and that all CI checks pass.
@naman-sriv
Copy link

Hello @iluwatar , i would like to attempt this issue, it will be a good opportunity to learn as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

2 participants