Home

Awesome

Zoidberg TCP

This is TCP balancer managed by Zoidberg.

Features

Usage

Running proxy

This runs zoidberg-tcp with management interface on http://127.0.0.1:12345:

docker run -rm -it --net host \
  -e HOST=127.0.0.1 -e PORT=12345 \
  bobrik/zoidberg-tcp:0.3.0

It's up to you how to discover launched balancer in Zoidberg. Both static (list of servers) and dynamic (mesos or marathon finders) are supported.

Making apps available

For mesos and marathon finders the following labels should be set to make app available:

Here X is the port index. Each port creates a separate app so you can expose them through different load balancers.

Example:

zoidberg_port_0_app_name: myapp.example.com
zoidberg_port_0_balanced_by: example-lb-tcp
zoidberg_port_0_listen: 127.0.0.1:23232

Application with these labels will be announced on all load balancers with name set to example-lb-tcp. On these load balancers 127.0.0.1:23232 will be forwarding connections to all application instances on the port at index 0.

It is possible to use zoidberg-nginx with zoidberg-tcp when some ports are HTTP and some ports are plain TCP.

Stats endpoint

GET /metrics returns metrics in prometheus format from management endpoint.

TODO