Sōzu HTTP reverse proxy, configurable at runtime, fast and safe, built in Rust.
10K+
it will be awesome when it will be ready
Build the most reliable reverse proxy ever:
Requirements:
You can create the required executables like this:
cd ctl && cargo build; cd ../bin && cargo build
This will create the sozu executable for the reverse proxy, and sozuctl to command it.
To start the reverse proxy:
cd bin;
../target/debug/sozu start -c config.toml
You can edit the reverse proxy's configuration with the config.toml file. You can declare
new applications, their frontends and backends through that file, but for more flexibility,
you should use the command socket (you can find one end of that unix socket at the path
designed by command_socket in the configuration file).
sozuctl has a few commands you can use to interact with the reverse proxy:
sozuctl -c config.toml shutdownsozuctl -c config.toml shutdown --hardsozuctl -c config.toml state dumpsozuctl -c config.toml state save -f state.jsonMac OS uses an old version of openssl, so we need to use one from Homebrew:
brew install openssl
brew link --force openssl
If it does not work, set the following environment variables before building:
export OPENSSL_LIB_DIR=/usr/local/opt/openssl/lib/
export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include/
The reverse proxy uses env_logger. You can select which module displays logs at which level with an environment variable. Here is an example to display most logs at info level, but use trace level for the HTTP parser module:
RUST_LOG=info,sozu_lib::parser::http11=trace ./target/debug/sozu
lib/: the sozu_lib reverse proxy library contains the event loop management, the parsers and protocolsbin/: the sozu executable wraps the library in worker processes, and handle dynamic configurationctl/: the sozuctl executable can send commands to the reverse proxyCopyright (C) 2015-2018 Geoffroy Couprie, Clément Delafargue and Clever Cloud
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
Content type
Image
Digest
sha256:3fd994152…
Size
38.9 MB
Last updated
about 22 hours ago
docker pull clevercloud/sozu:0cb1e2a79409f77f219d5e1f759731c1b565263b