Implement Microservices Load Shedding pattern
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
- Microservices.io – Load Shedding Pattern
- Release It! by Michael T. Nygard
- 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
.mdfile) 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.
Hello @iluwatar , i would like to attempt this issue, it will be a good opportunity to learn as well.
This issue is stale because it has been open 60 days with no activity.
@iluwatar Is this issue resolved because I dont see any activity here. If not then I would like to contribute in this issue. Can you assign it to me?