Aias00 opened a new issue, #7933: URL: https://github.com/apache/shenyu/issues/7933
## Goal Validate a candidate upstream against live request shapes by sending an opt-in sample to a shadow destination and comparing outcomes while the primary response remains authoritative. ## Existing capabilities and boundary #6108 and PR #6393 cover HTTP recording/replay. Reuse their bounded capture and request representation where suitable; this proposal adds online shadow execution, pairing and response differences rather than another recording platform. ## MVP - Begin with explicitly allowlisted, replay-safe non-streaming HTTP requests. Read-only methods are a useful default, not proof that a target has no side effects. Writes require explicit route/target authorization and a documented safety strategy. - Configure an independent shadow target, credentials, sample rate, concurrency, queue, body-size and time limits. Handle target selection through established upstream restrictions and do not automatically forward production secrets. - Keep dispatch and comparison outside the primary response dependency. A slow or failing shadow cannot delay or replace the primary response; overload drops shadow work with a reason. - Compare status, an allowlisted set of headers, bounded JSON/body representations and separately measured latency. Support explicit normalization/ignored fields for timestamps and nondeterministic IDs. - Export bounded summaries and representative redacted differences through existing observability facilities. No unbounded body retention or new general-purpose analytics store. ## Acceptance criteria - [ ] Primary status/headers/body are unchanged with a healthy, slow, failing or unavailable shadow. Measure primary-path overhead under #7650. - [ ] Tests cover sampling, queue overflow, body-size limits, cancellation, binary/non-JSON responses, decompression limits and malformed shadow responses. - [ ] Streaming/SSE/WebSocket and non-replayable bodies are skipped with a clear reason in the first version. - [ ] Request/response correlation remains correct under concurrency; comparison expiry and shutdown release buffers and queued work. - [ ] Auth/tenant boundaries and redaction are enforced before export. Destination credentials and production cookies/tokens cannot leak through default copying. - [ ] Difference summaries distinguish mismatch, normalization, truncation, skipped comparison and shadow failure. Related: #6108, PR #6393 and #7650. This proposal does not promise identical responses from inherently nondeterministic services. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
