Dropbox

Meet Bandaid, the Dropbox service proxy

Mar 1, 2018Dmitry Kopytkov
Meet Bandaid, the Dropbox service proxy
SummaryAI, from the source post

This post introduces Bandaid, a service proxy written in Go, designed to accelerate the adoption of Service Oriented Architecture at Dropbox. Bandaid functions as a reverse proxy with advanced features including various load balancing methods (round-robin, least N random choices, absolute least connection, pinning peer), SSL termination, HTTP2 support, metro rerouting, request/response buffering, logical isolation of endpoints, dynamic reconfiguration, service discovery, per-route stats, gRPC proxying, health checking, and weighted traffic management for canary testing. Key internal design aspects include a request handler that routes requests to queues, which are then processed by a fixed-size worker pool. The queueing mechanism uses LIFO processing to manage overloaded backends and prevent processing of expired requests. Bandaid also manages connections in user-space queues to avoid issues with kernel accept queues and delayed detection of closed connections. The service proxy enables weighted traffic management for canary deployments by assigning weights to queues belonging to a single upstream, allowing for dynamic configuration without restarts. It also supports logical isolation of critical and non-critical routes within the same host.

More from the Internal Load Balancing Service trail