Traffic mirroring
Traffic mirroring is another important feature that allows you to asynchronously copy traffic being sent to an upstream to another upstream service as well, also known as mirrored service. Traffic mirroring is on a fire-and-forget basis, where the sidecar/gateway will not wait for responses from the mirrored upstream.
The following is an illustration of traffic mirroring:
Figure 4.9 – Traffic mirroring
There are very interesting use cases for traffic mirroring, including the following:
- Traffic mirroring to pre-production systems for testing purposes
- Traffic mirroring to sink systems where traffic is recorded for out-of-band analysis
In the following example, in the virtual service definition under route configuration, we are mentioning that 100% of traffic should be mirrored to subset: v2
:
route: - destination: port: ...