Skip to content

umicat is a L4 reverse proxy load balance server. umicat can provide load balancing service for TCP/UDP network services in the form of reverse proxy.

License

Notifications You must be signed in to change notification settings

SunBK201/umicat

Repository files navigation

umicat

umicat logo

license

umicat is a L4 reverse proxy load balance server. umicat can provide load balancing service for TCP/UDP network services in the form of reverse proxy.

Build and Install

make
sudo make install

Usage

Health Check

Passive Check

  • max_fails: passive health check max fails, if the number of fails exceeds this value, the server will be considered as down.
  • fail_timeout: passive health check fail timeout. If the server is down, after this time, the server will be tried again.
  • is_fallback: If the server is down, whether to fallback to the next server.

Aggressive Check

  • type: health check type.
  • port: Health check port.
  • interval: Health check interval.
  • timeout: Health check timeout.
  • fall: The number of consecutive failures to consider a server as down.
  • rise: The number of consecutive successes to consider a server as up.

Load Balance Policy

  • round_robin: Round-robin load balance policy.
    • weight: Weight of the server.
  • random: Random load balance policy.
    • weight: Weight of the server.
  • ip_hash: IP-hash load balance policy.
    • weight: Weight of the server.
  • least_conn: Least-connection load balance policy.
  • heuristic: Heuristic traffic load balance policy.
    • traffic_window: Traffic window size. (seconds)

Please configure /etc/umicat/umicat.conf before you start using it:

{
    "mode": "tcp",
    "localport": 10201,
    "policy": "round_robin",
    "upstream": [
        {
            "upstream_ip": "127.0.0.1",
            "upstream_port": 9832,
            "weight": 10,
            "traffic_window": 30,
            "max_fails": 2,
            "fail_timeout": 10,
            "is_fallback": 1,
            "check": {
                "type": "tcp",
                "port": 9832,
                "interval": 5,
                "timeout": 5,
                "fall": 3,
                "rise": 2
            }
        },
        {
            "upstream_ip": "127.0.0.1",
            "upstream_port": 9999,
            "weight": 10,
            "traffic_window": 30,
            "max_fails": 2,
            "fail_timeout": 10,
            "is_fallback": 1,
            "check": {
                "type": "tcp",
                "port": 9999,
                "interval": 15,
                "timeout": 5,
                "fall": 3,
                "rise": 2
            }
        }
    ],
    "workers": "auto",
    "log_level": "info",
    "log_file": "/var/log/umicat/umicat.log"
}

Then, you can enjoy it:

sudo umicat -c /etc/umicat/umicat.conf -l /var/log/umicat/umicat.log

Docker

docker run -P -it --rm sunbk201/umicat

License

BSD-2 License

About

umicat is a L4 reverse proxy load balance server. umicat can provide load balancing service for TCP/UDP network services in the form of reverse proxy.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages