Repository navigation
[AISAGE-781] perf: bypass the staging usage writer relay - #8911
Merged
Merged
Conversation
johnnyeric
marked this pull request as ready for review
October 26, 2026 13:06
chrarnoldus
approved these changes
Oct 26, 2026
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Assumptions: Files Reviewed (9 files)
Reviewed by deepseek-flash-latest · Input: 75.6K · Output: 15.1K · Cached: 1.6M Review guidance: REVIEW.md from base branch |
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Staging queued usage writes currently traverse a private Frankfurt relay before reaching the Vercel writer. Remove the staging
USAGE_WRITER_RELAYbinding so the existing writer client calls the samehttps://staging-app.kilo.ai/api/internal/usage/recordendpoint directly for a controlled latency comparison.Keep the single EU source/DLQ, batch 2, parallelism 2, cap 200 (at most 400 writer calls), retry policy and diagnostics unchanged. Production effective configuration is identical. Retain relay code/config/tests and its deployed resource; revert this change and redeploy staging to restore the binding. Both existing CI paths skip relay deployment when unbound and retain EU preparation/consumer uploads.
Validation: 157 service tests across 12 files, 17 queue-preparation tests, nine deployment-workflow tests; typecheck, lint, generated types check, formatting and diff check; local staging/production dry runs. Actual local workerd/Queue/loopback HTTP tests cover the normal direct route and explicitly bound relay route, including ACK/retry behavior. Actual config checks prove production equality and both CI detection outputs. No hosted deployment, measurements or latency improvement claimed.
AISAGE-781