SwiShmem: Distributed Shared State Abstractions for Programmable Switches Lior Zeno , Dan R. K. Ports, Jacob Nelson, Mark Silberstein
Hardware Trend: PISA Barefoot Tofino Broadcom Trident NVIDIA Networking Spectrum
Current Trend: In-Switch Acceleration Offloading Real-time DDoS Attack Detection SilkRoad: Making Stateful Layer-4 Load Balancing Fast and Cheap Using Switching ASICs to Programmable Data Planes [SIGCOMM 2017] [IM 2019] Heavy-Hitter Detection Entirely in the Data Cheetah: Accelerating Database Queries Plane with Switch Pruning [SOSR 2017] [SIGMOD 2020] Just say NO to Paxos Overhead: Replacing NetCache: Balancing Key-Value Stores with Fast Consensus with Network Ordering In-Network Caching [OSDI 2016] [SOSP 2017]
Unrealized Potential Scalability Locality Availability Packet Problem: Stateful + Distributed is a challenging combination
Network-Wide Heavy-Hitters Detection Data-plane updateable registers Match Counter flow 0 128 flow 1 64 flow 2 1024 … …
Network-Wide Heavy-Hitters Detection Match Counter flow 0 128 flow 1 64 flow 2 1024 … …
Network-Wide Heavy-Hitters Detection Control-plane replication is insufficient for data-plane Controller objects Match Counter flow 0 512 flow 1 64 flow 2 256 Match Counter Match Counter … … flow 0 flow 0 512 512 flow 2 64 flow 1 32 flow 4 512 flow 2 128 … … … … An ad-hoc solution
Network-Wide Heavy-Hitters Detection Match Shared Counter flow 0 1024 flow 1 64 Match Shared Match Shared flow 2 256 Counter Counter … … flow 0 1024 flow 0 1024 flow 2 flow 1 256 64 flow 4 flow 2 512 256 … … … … Counters are replicated entirely in the data-plane
A Principled Approach Map proven and tested Do not reinvent the wheel replication protocols
Applications with frequent updates can tolerate weak Taxonomy of State Access in NFs consistency Weak consistency Strong consistency Frequent updates Frequent updates This combination is DDoS challenging Rate Write frequency limiter Weak consistency Strong consistency Infrequent updates Infrequent updates Strong consistency is often Load NAT paired with infrequent balancer IPS updates Firewall Consistency
SwiShmem Registers • Eventual Write-Optimized (EWO) • Eventual consistency (low read/write latency) In the paper • Strong Read-Optimized (SRO) • Linearizability • Eventual Read-Optimized (ERO) • Eventual consistency (lower read latency)
Design Principles Memory is scarce ( 𝑷(𝟐𝟏 𝑵𝑪) SRAM) Communication is cheap ( 𝑷(𝟔 𝑼𝒄𝒒𝒕) )
Eventual Write-Optimized: HH Detection CRDTs Match Shared Counter flow 0 (0, 0, 0) … … Match Match Shared Shared Counter Counter flow 0 (0, 0, 0) flow 0 (0, 0, 0) … … … …
Eventual Write-Optimized: HH Detection Increment local counter and broadcast the update Packet Match Shared Counter flow 0 (0, 1, 0) … … Match Match Shared Shared Counter Counter flow 0 (0, 0, 0) flow 0 (0, 0, 0) … … … …
Eventual Write-Optimized: HH Detection Reads are performed locally by summing all the elements Packet Match Shared Counter flow 0 (0, 1, 0) … … Match Match Shared Shared Counter Counter flow 0 (0, 1, 0) flow 0 (0, 1, 0) … … … …
What About Packet Loss? Periodic synchronization Match Shared Counter flow 0 (0, 0, 0) … … Match Match Shared Shared Counter Counter flow 0 (0, 0, 0) flow 0 (0, 0, 0) … … … … Updates may get lost
Vision: “ The One Big Switch Abstraction ” The One Big Switch Abstraction Automation tools: automatic transformation of a single-switch program Data-plane primitives State management library directory for locality SwiShmem: Distributed shared state management Thank you! Questions?
Recommend
More recommend