Skip to content

Conversation

@alexluong
Copy link
Collaborator

No description provided.

Comment on lines +102 to +110
// Performance Trade-offs:
// - This rate limiter works well for large Terraform states (200+ resources)
// - However, it significantly impacts small deployments:
// - 100 resources now take ~30 seconds vs ~5 seconds previously
// - This is an intentional trade-off for reliability and compliance
// - Future optimization could implement a true "240 requests per sliding minute"
// window instead of the current token bucket approach
// - Potential solution: In-memory FIFO queue that tracks the last minute's
// requests and blocks when 240 requests have been made in the past 60 seconds
Copy link
Collaborator Author

@alexluong alexluong Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just want to call this out as a tradeoff in the current implementation of the rate limit logic

@alexluong alexluong merged commit 926124d into main Sep 27, 2025
14 checks passed
@alexluong alexluong deleted the rate-limit branch September 27, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants