HAProxy Enterprise can mirror traffic to a different environment, even one on a different network. Traffic mirroring, also called traffic shadowing, can be useful for copying live production traffic to another environment for such purposes as:
Security applications (such as IDS)
Traffic mirroring has almost no impact on clients because the load balancer does not wait for a response from the shadow environment. The mirroring process is basically "fire and forget", where requests are copied to the shadow environment and forgotten.
A mirroring deployment consists of these components:
The server where the load balancer resides.
The Stream Processing Offload Engine (SPOE) mirroring engine, also running on the load balancer server.
The production web servers.
The mirror server that receives the copied traffic sent by the mirroring engine. This is the server running the shadow services described previously, such as QA, auditing, or analytics.
The data flow occurs as follows:
The user client sends a request to the load balancer frontend.
The frontend sends the request to the regular (production) backends and mirror backends.
The regular backend processes the request normally, sending the request to the production web servers.
The mirror backend copies the request, sending it to the SPOE mirror engine.
The SPOE mirror engine sends the request to the mirror server in the secondary environment used for testing, auditing, or other purposes.
Next upConfigure Traffic Mirroring