kubernetes-sigs / gateway-api

Repository for the next iteration of composite service (e.g. Ingress) and load balancing APIs.
https://gateway-api.sigs.k8s.io
Apache License 2.0
1.67k stars 437 forks source link

GEP: Percentage-Based Request Mirroring #3171

Open jakebennert opened 1 week ago

jakebennert commented 1 week ago

What would you like added: I'd like to add an enhancement to the existing feature HTTP request mirroring. Right now Request Mirroring is an all or nothing feature. Either 100% of request are mirrored, or 0% are. Percentage-Based Request Mirroring will allow users to specify a percentage of requests they'd like mirrored as opposed to every single request.

This feature is already supported by Envoy, and should be supportable by HAProxy and NGINX.

Why this is needed:
This feature is already supported by Envoy, so adding it for the Gateway API would enable better integration between the two products. There's also an existing user desire for this feature on the HAProxy side and NGINX side. Since Request Mirroring is already supported by the Gateway API, Percentage-Based Request Mirroring would a clear improvement on this pre-existing feature.