
Release Notes: - N/A --------- Co-authored-by: michael <michael@zed.dev> Co-authored-by: agus <agus@zed.dev>
1 KiB
1 KiB
Here’s a more abstract, goal-oriented version of your request without diving into implementation specifics:
Request: Add Rate Limiting to Vault Service
We need to introduce rate limiting to our vault service to protect it from excessive traffic and ensure fair usage. The service currently handles password hashing and validation through both HTTP and gRPC, and we want to enforce a controlled request rate across all endpoints.
Key Requirements:
- Apply a global rate limit (e.g., 5 requests per second) to prevent abuse.
- Ensure the rate limiting works consistently across both HTTP and gRPC interfaces.
- Refactor the service to cleanly support rate limiting without breaking existing functionality.
- Maintain flexibility so that limits can be adjusted if needed.
Implementation Approach (High-Level):
- Use a token bucket or similar algorithm for smooth rate limiting.
- Integrate with our existing middleware/request pipeline.
- Keep the changes minimal but scalable for future adjustments.