File tree Expand file tree Collapse file tree 3 files changed +51
-0
lines changed
examples/standard/http-request-mirroring Expand file tree Collapse file tree 3 files changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ # $ Used in:
2
+ # $ - site-src/guides/http-request-mirroring.md
3
+ apiVersion : gateway.networking.k8s.io/v1
4
+ kind : HTTPRoute
5
+ metadata :
6
+ name : http-filter-mirror
7
+ labels :
8
+ gateway : mirror-gateway
9
+ spec :
10
+ parentRefs :
11
+ - name : mirror-gateway
12
+ hostnames :
13
+ - mirror.example
14
+ rules :
15
+ - backendRefs :
16
+ - name : foo-v1
17
+ port : 8080
18
+ filters :
19
+ - type : RequestMirror
20
+ requestMirror :
21
+ backendRef :
22
+ name : foo-v2
23
+ port : 8080
Original file line number Diff line number Diff line change 86
86
- HTTP redirects and rewrites : guides/http-redirect-rewrite.md
87
87
- HTTP header modifier : guides/http-header-modifier.md
88
88
- HTTP traffic splitting : guides/traffic-splitting.md
89
+ - HTTP request mirroring : guides/http-request-mirroring.md
89
90
- Cross-Namespace routing : guides/multiple-ns.md
90
91
- TLS : guides/tls.md
91
92
- TCP routing : guides/tcp.md
Original file line number Diff line number Diff line change
1
+ # HTTP request mirroring
2
+
3
+ ??? example "Extended Support Feature"
4
+
5
+ As of v1.0.0, the Request Mirroring feature is an Extended feature, and
6
+ requires implementations to support the `HTTPRouteRequestMirror` feature.
7
+
8
+ The [ HTTPRoute resource] ( /api-types/httproute ) allows you to mirror HTTP
9
+ requests to another backend using
10
+ [ filters] ( /api-types/httproute#filters-optional ) . This guide shows how to use
11
+ this feature.
12
+
13
+ Mirrored requests will must only be sent to one single destination endpoint
14
+ within this backendRef, and responses from this backend MUST be ignored by
15
+ the Gateway.
16
+
17
+ Request mirroring is particularly useful in blue-green deployment. It can be
18
+ used to assess the impact on application performance without impacting
19
+ responses to clients in any way.
20
+
21
+ ``` yaml
22
+ {% include 'standard/http-request-mirroring/httproute-mirroring.yaml' %}
23
+ ```
24
+
25
+ In this example, all requests are forwarded to service ` foo-v1 ` on port ` 8080 ` ,
26
+ and they are also forwarded to service ` foo-v2 ` on port ` 8080 ` , but responses
27
+ are only generated from service ` foo-v1 ` .
You can’t perform that action at this time.
0 commit comments