diff --git a/README.md b/README.md index 0b329a2469b39287bdc5410da1885685ec732e23..bf187571b05a0e88bb8651bb5a937a6ada3422a7 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,25 @@ -# Statistics multicasting +# Statistics replication We want to fan out an initially UDP stream, from one server to many clients without the origin having to send out the stream multiple times for each client. Effectively this requires the independent components to replicate the stream on behalf of the origin. +## Theory of operations + +The program supports two fundamental modes, UDP -> TCP one to many and TCP -> TCP one to many. + +In UDP mode the program binds and listens on a UDP port expecting the packets to arrive there. Contrarily, in TCP mode it actively tries +to connect to the remote instead. From here the packets are replicated across all connected TCP clients. Should any of the TCP clients +be to slow in receiving these packets than they will be dropped. The mechanism to drop TCP connections is based user configurable +internal buffer (High Watermark). Parameters such as ports, bound interfaces and buffer size are all user configurable through +command line parameters. + +If this program is run in TCP mode it can connect to another instance of itself, allowing to forward data across the network without +requiring the origin to sent packets twice (such as is the case with proxies). + +Each received packet is sent as is to all clients, the behavior of multipart packets is not validated and tested. + ## Solutions - Haproxy