Netflix's Zuul gateway, designed for handling requests and responses, initially assumed connections were essentially free. However, the growth of streaming services and the adoption of mTLS (mutual TLS) led to a significant increase in connections, putting a strain on the system.
The first step towards improving the connection overhead was implementing HTTP/2 (H2) multiplexing. This technique enables multiple requests to be sent over a single connection, significantly reducing the number of connections required.
To address the limitations of multiplexing, the article introduced a new approach: connection subsetting. This involved dividing origin servers into subsets, with each event loop responsible for connecting to only a subset of the origins.
Implementing subsetting involved integrating with Eureka service discovery changes to dynamically create and manage subsets based on origin server registrations and changes.
The results of subsetting implementation were remarkable, demonstrating significant improvements in connection counts, churn, and overall system performance.
The article concluded that connection subsetting proved to be a valuable optimization strategy for Netflix's Zuul gateway, achieving a dramatic reduction in connections and improving overall system performance without compromising resiliency or load balancing. This approach, combined with HTTP/2 multiplexing, represents a successful solution for managing connections in large-scale distributed systems.
The article highlighted several key takeaways for optimizing connections in distributed systems:
Ask anything...