/plushcap/analysis/cloudflare/oxy-fish-bumblebee-splicer-subsystems-to-improve-reliability

Oxy: Fish/Bumblebee/Splicer subsystems to improve reliability

What's this blog post about?

The architecture of Bumblebee follows the Unix principle of "do one thing and do it well". Instead of adding functionalities directly to the main proxy application, smaller services are created which can be restarted without dropping connections. These smaller services improve development agility and system reliability. Unix Domain Sockets are used for inter-process communication in Bumblebee. Unix sockets allow passing file descriptors between different processes, a feature essential for graceful restarts and the overall architecture of Bumblebee. The hot-potato library is used for file descriptor passing. Graceful restart is implemented using tokio and file descriptor passing. When an upgrade request (usually SIGHUP) is received, all tasks are paused, waited to be fully paused, and sent to a new process. To implement graceful shutdown, which is necessary for graceful restart, tasks must be made cancellation-safe. The results of the paused tasks are collected into a JoinSet and then passed to the new process using file descriptor passing.

Company
Cloudflare

Date published
April 20, 2023

Author(s)
Quang Luong, Chris Branch

Word count
1818

Language
English

Hacker News points
2


By Matt Makai. 2021-2024.