Merged in feature/rate-limiting (pull request #190)

Implement global and per ip rate limiting

* all tests passing

* test fix

* Enhances test environment for rate limiting

Updates the test environment to better support rate limiting tests.

- Increases rate limits in test container to avoid interference with legitimate test traffic.
- Increases the polling interval for client status checks to reduce load on the rate limiter.
- Adds logic to retry status checks if rate limiting is encountered.

* Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/rate-limiting

* build fix

* test fix
This commit is contained in:
Jay Brown
2025-10-13 22:13:15 +00:00
parent 4783b8420a
commit 7638fd3a90
11 changed files with 1224 additions and 8 deletions
+5
View File
@@ -71,6 +71,11 @@ func createContainer(t testing.TB, ctx context.Context, network string, cfg *con
"COGNITO_CLIENT_SECRET": "cogsecret",
"COGNITO_DOMAIN": "cogdomain",
"COGNITO_CLIENT_ID": "clientid",
// Rate limiting config - very high limits for testing to avoid interference
"RATE_LIMIT_GLOBAL_RATE": "10000", // 10k req/s global (vs 500 in prod)
"RATE_LIMIT_GLOBAL_BURST": "20000", // 20k burst global (vs 1000 in prod)
"RATE_LIMIT_DEFAULT_RATE": "1000", // 1k req/s per IP (vs 5 in prod)
"RATE_LIMIT_DEFAULT_BURST": "2000", // 2k burst per IP (vs 10 in prod)
}
if cfg.Env != nil {
for k, v := range cfg.Env {