Open sourcing Sōzu connectors

bannier Sozu
Clever Cloud is today the main developer of Sōzu, a Reverse Proxy that was developped at Clever Cloud, in Rust, to meet the needs of our infrastructure for performance and hot reloading.

Clever Cloud is today the main developer of Sōzu, a Reverse Proxy that was developped at Clever Cloud, in Rust, to meet the needs of our infrastructure for performance and hot reloading. Sōzu is used throughout Clever Cloud, paired with HAProxy, to route traffic to our customer’s applications.

What we used to do:

Up until now, our Reverse Proxy Sōzu used to be managed by Clever Cloud by a closed source program that ran on the same machine and assumed two big responsibilities:

  • Firstly, listen to a RabbitMQ topic and redirect requests to Sōzu (via its UNIX socket)
  • Secondly, watch over a PKI directory (Public Key Infrastructure) to redirect TLS certificates to Sōzu (via its UNIX socket)

Turning open source

While working on a new Prometheus connector for Sōzu, we realized we could open source it. With this realization came the idea of porting the logic of the former Sōzu manager (described above) from its closed source state into new open source repositories.
What we ultimately aim to develop is an entirely open-source ecosystem around our Reverse Proxy Sōzu.
This blog post details what these new open source components are, and summarizes what they do.

Our open-source ecosystem around Sōzu

Sōzu Prometheus connector

Prometheus is a monitoring and alerting software suite.
This simple connector operates alongside Sōzu. It waits for HTTP requests on the /metrics route, queries Sōzu for its metrics, formats the metrics to be Prometheus-compatible, and sends them in the HTTP response.
This means that Prometheus metrics are readily available on the IP address of a Sōzu machine.

Sōzu Pulsar connector

Apache Pulsar is a highly scalable messaging platform. We use it extensively at Clever Cloud because of its distributed aspect and cutting-edge throughput performance.
The Sōzu Pulsar connector subscribes to a Pulsar topic and transmits messages to Sōzu. Sōzu uses these messages to perform hot reloading on the proxy, which is a key feature of our Reverse Proxy.
What it means for us and anyone using the Sōzu ecosystem: this connector enables updating traffic redirection in real time.

Sōzu PKI connector

PKI stands for Public Key Infrastructure, an omnipresent security framework on the Internet, typically used for securing connections with HTTPS (among other things). In the PKI framework, Sōzu functions as a TLS endpoint: it decrypts HTTPS traffic into HTTP traffic.
The Sōzu PKI connector runs alongside Sōzu, watches over a given directory in the file system, reads TLS certificates that were put there by either human or machine, and transmits them to Sōzu.
Then , what this ultimately means is: write a TLS certificate on the machine, Sōzu will have it.

Sōzu client

This is a code library used by all above connectors. It pools connections to Sōzu’s UNIX socket and functions entirely asynchronously. All in all, it makes writing new connectors easier.

What’s next
The best thing we wish is for the open-source community to join us in using and improving Sōzu as it goes. Our end-game is to build a web UI to manage a Sōzu instance in the navigator.


Blog

À lire également

Clever Cloud announces 11 new products at its Clever Cloud Fest

Clever Cloud is celebrating its 15th anniversary with the Clever Cloud Fest on 6 and 7 February 2025 in Nantes. This event will bring together customers and partners, during which Clever Cloud will unveil 11 new products and an international growth strategy.
Company Événements Press

What is Clever AI?

AI services are everywhere, but the sheer number and diversity of them makes it harder for developers to manage them. All the more so when they work in a team. That's why we came up with Clever AI: a multi-vendor, multi-model range of solutions to simplify access to AI for businesses.
Company

Protect yourself: beware of job scams spoofing Clever Cloud’s brand

At Clever Cloud, we provide reliable, secure cloud hosting services for businesses and developers worldwide. Unfortunately, our reputation is being exploited by malicious actors engaging in fraudulent activities under the guise of our company name. We want to set the record straight and help protect you from falling victim to these scams.
Company