19 releases (12 breaking)

Uses old Rust 2015

0.13.0 Jul 8, 2021
0.11.59 Apr 19, 2021
0.11.52 Jan 14, 2021
0.11.50 Oct 22, 2020
0.2.0 Apr 20, 2017

#1712 in Network programming

Download history 2/week @ 2023-08-02 35/week @ 2023-08-16 132/week @ 2023-08-23 1/week @ 2023-08-30 23/week @ 2023-09-06 20/week @ 2023-09-13 4/week @ 2023-09-20 4/week @ 2023-09-27 1/week @ 2023-10-04 2/week @ 2023-10-11 3/week @ 2023-10-18 13/week @ 2023-10-25 29/week @ 2023-11-01 4/week @ 2023-11-08 21/week @ 2023-11-15

67 downloads per month


10K SLoC

sozuctl, a command line interface for the sozu proxy

Sozuctl is a command line interface for the proxy. You can send configuration orders (e.g. Add a new worker) or reclaim some metrics at the proxy with this executable. Sozuctl talks to the proxy through a unix socket.

You can specify its path by adding to your config.toml:

command_socket = "path/to/your/command_folder/sock"

Add application with http frontend

First you need to create a new application with an id and a load balancing policy (roundrobin or random):

sozuctl --config /etc/sozu/config.toml application add --id <my_application_id> --load-balancing-policy roundrobin

It won't show anything but you can verify that the application has been added successfully by querying sozu:

sozuctl --config /etc/sozu/config.toml query applications

Then you need to add a backend:

sozuctl --config /etc/sozu/config.toml backend add --address --backend-id <my_backend_id> --id <my_application_id>

Finally you have to create a frontend to allow sozu to send traffic from the listener to your backend:

sozuctl --config /etc/sozu/config.toml frontend http add --address --hostname <my_application_hostname> --id <my_application_id>

Check the status of sozu

It shows a list of workers and show informations about their statuses.

sozuctl --config /etc/sozu/config.toml status

Get metrics and statistics

It will show global statistics about sozu, workers and applications metrics.

sozuctl --config /etc/sozu/config.toml metrics

Dump and restore state

If sozu configurations (applications, frontends & backends) are not written in the config file, you can save sozu state to restore it later.

sozuctl --config /etc/sozu/config.toml state save --file state.json

Then shutdown gracefully sozu:

sozuctl --config /etc/sozu/config.toml shutdown

Restart sozu and restore its state:

sozuctl --config /etc/sozu/config.toml state load --file state.json

You should be able to request your application like before the shutdown.


~213K SLoC