aws / apprunner-roadmap

This is the public roadmap for AWS App Runner.
https://aws.amazon.com/apprunner/
Other
292 stars 13 forks source link

Do not overwrite X-Request-ID header #124

Open nick-ax opened 2 years ago

nick-ax commented 2 years ago

Community Note

Tell us about your request

App Runner currently overwrites the X-Request-ID header if sent by the HTTP client with it's own value and then forwards that to the service running in App Runner.

This is confusing and makes tracing an HTTP request from client to backend and back to the client impossible using this header.

X-Request-ID is a "defacto" standard header that should be respected by any "middleware" and passed upstream without modification.

If AWS need a header to help them manage their App Runner infrastructure they should use a header namespaced for internal use only. There are many examples of this with other AWS services, such as x-amzn-trace-id.

Describe alternatives you've considered

The alternative would be for everyone else to use a different header, such as X-Correlation-ID or something company specific and hope that AWS don't start overwriting that one too. 🙄

This is potentially extremely disruptive and may not even be possible for some legacy systems.

Additional context

Changing the behaviour of the Envoy proxy to support this is a simple configuration change which should be the default for Envoy but for backward-compatibility reasons they decided not to make it so.

preserve_external_request_id (bool) Whether the connection manager will keep the x-request-id header if passed for a request that is edge (Edge request is the request from external clients to front Envoy) and not reset it, which is the current Envoy behaviour. This defaults to false.

Envoy Docs

Attachments

none