TL;DR
Miresga is a hybrid Layer-7 (L7) load balancer that combines the raw speed of programmable switches with the flexibility of general-purpose servers. By strategically offloading massive "elephant flows" to hardware while handling complex protocol parsing in software, it achieves up to 3.9× the throughput of traditional software solutions and significantly outperforms existing hardware-accelerated designs for small-object traffic.
What Problem Does This Paper Address?
Load balancing is the backbone of the modern cloud, but it faces a performance wall. Traditional Layer-4 (L4) load balancers are fast because they only look at IP addresses and ports, but they are "blind" to the actual content. Layer-7 (L7) load balancers are "smart"—they can route traffic based on URLs or domain names—but they are computationally expensive.
Currently, engineers face a lose-lose choice:
- Software LBs (e.g., HAProxy, Nginx): Flexible and smart, but limited by CPU speeds and kernel overhead. They struggle with high-volume traffic.
- Hardware LBs (Programmable Switches): Incredibly fast (Tbps line-rate), but they have "tiny brains." They have very limited memory (SRAM) and are slow at updating internal tables, making them poor at handling the millions of short-lived "mouse flows" typical of web traffic.
Miresga tackles this "memory vs. speed" trade-off by co-designing hardware and software to play to their respective strengths.
Methods
The authors introduce a hybrid architecture that partitions the L7 load-balancing task into three distinct parts:
- The Programmable Switch (The Fast Path): Built on the Intel Tofino ASIC, the switch handles the initial L4 handshake (SYN-ACK) and subsequent data forwarding for "elephant flows" (large data transfers). To save precious SRAM, Miresga uses table entry compression, identifying flows using only a compressed index rather than full IP/Port tuples.
- The Front-end Server (The Brain): This server runs a custom, lightweight protocol stack using DPDK to bypass the slow Linux kernel. It parses the application-layer data (like HTTP headers), decides which back-end server should handle the request, and determines if a flow is large enough to be offloaded to the switch.
- The Back-end Agent (The State Sync): One of Miresga’s most novel features is an eBPF-based agent running on the destination Web servers. L7 load balancing requires "connection splicing," where the LB must synchronize sequence numbers between the client and the server. Instead of wasting switch memory on this, Miresga moves this task to the back-end server’s CPU via eBPF, which has much more memory to spare.
Datasets
The paper does not use a static dataset for training but evaluates the system using a high-performance testbed:
- Hardware: A 3.2 Tbps Intel Tofino switch and a cluster of servers with 100 Gbps NICs.
- Traffic Generation: The authors used
wrkto generate HTTP/1.1 requests andNginxas the back-end web server. - Workloads: They simulated heavy-tailed traffic distributions (common in real data centers) where a small percentage of flows (elephants) account for the vast majority of data, while the rest are tiny requests (mice).
Key Insights and Ideas
- Selective Offloading: Miresga doesn't offload everything. It uses a 64KB threshold. If a response is smaller than 64KB, the overhead of updating the switch's hardware tables is actually higher than the benefit. These "mouse flows" stay in software, while "elephant flows" move to hardware.
- Asymmetric State Management: By using an eBPF agent on the destination server to handle sequence number translation, the authors bypassed the biggest bottleneck of programmable switches: limited SRAM. This allows the switch to remain a simple, high-speed forwarder.
- Parallelism over Blocking: Unlike previous state-of-the-art designs (like Prism) that block traffic while the switch table is being updated, Miresga allows the software to handle packets in the interim. This prevents the "latency spikes" that usually plague hardware-accelerated LBs when dealing with many small objects.
Key Results
- Throughput: Miresga achieved 3.9× the throughput of a DPDK-accelerated HAProxy setup.
- Latency: It reduced latency by 60% (0.4×) compared to software solutions.
- Small Object Performance: Compared to Prism (the previous state-of-the-art), Miresga delivered 5× the throughput and 0.2× the latency for small objects, proving that its hybrid approach handles "mouse flows" far better than pure-hardware offloading.
- Scalability: The system scales linearly; adding more CPU cores to the front-end server directly increases the number of requests per second the system can handle.
Limitations and Future Work
- Control Plane Bottleneck: The built-in CPU on programmable switches is still relatively slow at inserting table entries, which limits how many new connections (Connections Per Second) the system can offload.
- Encryption (TLS): The current prototype struggles with encrypted traffic because TLS termination is difficult to perform on a switch ASIC. The authors suggest using hardware accelerators (like QAT) in the future.
- QUIC Support: Since QUIC encrypts headers and uses UDP, the current eBPF/Switch logic cannot easily modify headers. This is flagged as a direction for future research.
Summary updated