feat: add -mirror-mode for async forwarding with empty ACK - #22
Draft
MoeMahhouk wants to merge 1 commit into
Draft
feat: add -mirror-mode for async forwarding with empty ACK#22MoeMahhouk wants to merge 1 commit into
MoeMahhouk wants to merge 1 commit into
Conversation
When sync-proxy sits behind an nginx mirror the caller discards the response body, so waiting on the backend EL only ties up the caller. With -mirror-mode (env MIRROR_MODE) the request is parsed and filtered as before, forwarded to builders in a detached bounded goroutine, and acknowledged immediately with an empty 200. Default behavior unchanged.
4 tasks
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.
📝 Summary
New opt-in
-mirror-modeflag (envMIRROR_MODE, default off). When set, requests are parsed and filtered exactly as before, forwarded to the builders in a detached goroutine (bounded by-request-timeout), and acknowledged immediately with an empty200. Responses are still consumed internally for logging and divergence detection. Default behavior is unchanged.⛱ Motivation and Context
When sync-proxy sits behind an nginx
mirror, the caller discards response bodies anyway — waiting on the backend EL only ties up the nginx worker. We use this to drive a TEE-contained EL from an external CL cluster via a mirroring nginx.📚 References
Stacked on #21
✅ I have run these commands
make lintmake test-racego mod tidyCONTRIBUTING.md