Dropboxがnginxからenvoyへ移行した話

これもRebuildで聞いた話題。Dropboxに関してはUnknown Protocolでは上場申請書とかPythonのBDFLだったGuido van Rossumが働いてたこととか書いているが、ようやく大好物の技術選定ネタが飛び込んできた。

なお、nginxをWebサーバではなく、ロードバランサやAPIゲートウェイ、サービスメッシュとしてのソフトウェアという認識で読まないと混乱すると思う。

When we moved most of Dropbox traffic to Envoy, we had to seamlessly migrate a system that already handles tens of millions of open connections, millions of requests per second, and terabits of bandwidth. This effectively made us into one of the biggest Envoy users in the world.

Envoyというのは前にLyftというライドシェアの会社がAWSのロードバランサに満足できなくて開発したという話を書いたが、Dropboxはトラフィックの大半を処理するためにEnvoyを使い、今や世界で最大級のEnvoyユーザとなった。

Nginx served us well for almost a decade. But it didn’t adapt to our current development best-practices:
- Our internal and (private) external APIs are gradually migrating from REST to gRPC which requires all sorts of transcoding features from proxies.
- Protocol buffers became de facto standard for service definitions and configurations.
- All software, regardless of the language, is built and tested with Bazel.
- Heavy involvement of our engineers on essential infrastructure projects in the open source community.

それまで使っていたのはnginxだが、Dropboxで開発に使っているAPIがRESTからgRPCやProtocol buffersに移行し、そのたびにトランスコーディングが必要になったり、Bazelによるビルドやテストに対応できないことが悩みのタネだった。

As we frequently mention, internally we rely heavily on the Golang-based proxy called Bandaid. It has a great integration with Dropbox infrastructure, because it has access to the vast ecosystem of internal Golang libraries: monitoring, service discoveries, rate limiting, etc.

DropboxとしてはGoで書かれたBandaidというプロキシを使っており、nginxからEnvoyへ移行する前にBandaidへの移行を考えるべきではないかという疑問がある。これについて次の3点をあげている。

- Golang is more resource intensive than C/C++. Low resource usage is especially important for us on the Edge since we can’t easily “auto-scale” our deployments there.
- No FIPS support for Go’s TLS stack.
- Bandaid does not have a community outside of Dropbox, which means that we can only rely on ourself for feature development.

Goで書いているとC/C++よりもリソースが使われ、on the Edge(エッジコンピューティングという意味?それとも「崖っぷち」という意味?)でauto-scaleするには向いてないということ、GoのライブラリでFIPSという暗号に関するセキュリティ要件を満たせていないこと、BandaidはDropboxの社内だけで作ったものなので、自分たちでなんとかするしかないことを上げている。

Unknown ProtocolでもGoとRustの比較について何度か書いてるが、Goを推してる人にとってDropboxがGoを理由にBandaidを手放すという話が幾分センシティブだということもあって話題になってるということだろう。

全くの余談だがBandaid(絆創膏)という名称だった時点で幸先がよくなさそうだった気もする。


この記事が気に入ったらサポートをしてみませんか?