Duplicate TCP traffic with a proxy

前端 未结 5 699
南方客
南方客 2020-12-08 01:05

I need to send (duplicate) traffic from one machine (port) and to two different machines (ports). I need to take care of TCP session as well.

In the beginnig I used

5条回答
  •  生来不讨喜
    2020-12-08 01:55

    I have also written a reverse proxy / load balancer for a similar purpose with Node.js (it is just for fun, not production ready at the moment).

    https://github.com/losnir/ampel

    It is very opinionated, and currently supports:

    • GET Using round-robin selection (1:1)
    • POST Using request splitting. There is no concept of "master" and "shadow" -- the first backend that responds is the one that will serve the client request, and then all of the other responses will be discarded.

    If someone finds it useful then I can improve it to be more flexible.

提交回复
热议问题