Simple line based TCP load-balancing proxy, designed to work with newline-delimited JSON.
319
This is a simple line based tcp load balancing proxy. It is designed to work with newline delimited json, but will work with any line based protocol.
This is different from a basic TCP proxy in that it will load balance data in a single connection across multiple destinations.
connections to each target.Usage of ./json-tcp-lb:
-addr string
Address to listen on (default "0.0.0.0")
-port int
Port to listen on (default 9000)
-target string
Address to proxy to. separate multiple with comma (default "127.0.0.1:9999")
-connections int
Number of outbound connections to make to each target (default 4)
The Dockerfile can be used to build the tcp lb in a container, then run like the following example:
docker build -t json-tcp-lb .
docker run -p ${LISTEN_PORT}:${LISTEN_PORT} -target ${TARGET_STRING} json-tcp-lb
I'm not aware of any simple alternatives. This is similar to something like gRPC load balancing across a single http/2 session in something like Envoy. It's likely possible to add 'newline delimited' data as a codec in Envoy or another load balancer.
Content type
Image
Digest
Size
3.5 MB
Last updated
over 5 years ago
docker pull corelight/json-tcp-lb