The live traffic mirroring capability of Istio is very useful for shadowing traffic from a production service to a mirror service. Istio allows complete mirroring from one service to another or a portion of the traffic. It is very important that mirroring should happen without impacting the critical path of the original application.
Mirroring traffic using Istio is sometimes branded as out of band since mirroring is accomplished asynchronously through Istio's sidecar proxy. The mirrored traffic should be identified distinctly. This is done by appending shadow to the Host or Authority header.
Let's understand traffic mirroring or shadowing through an example.
We will create two versions of the httpbin service and enable a logging mechanism to ensure which service is receiving or mirroring the traffic:
- The following is a deployment example of httpbin...