HAProxy Enterprise Documentation 2.0r1

Overview

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:

  • QA

  • Staging

  • Auditing

  • Network analytics

  • 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.

Architecture

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.

Architecture of Sample Mirroring Deployment

The data flow occurs as follows:

  1. The user client sends a request to the load balancer frontend.

  2. The frontend sends the request to the regular (production) backends and mirror backends.

  3. The regular backend processes the request normally, sending the request to the production web servers.

  4. The mirror backend copies the request, sending it to the SPOE mirror engine.

  5. The SPOE mirror engine sends the request to the mirror server in the secondary environment used for testing, auditing, or other purposes.


Next up

Configure Traffic Mirroring