State Abstractions for Programmable Switches Lior Zeno , Dan R. K. - - PowerPoint PPT Presentation

state abstractions for
SMART_READER_LITE
LIVE PREVIEW

State Abstractions for Programmable Switches Lior Zeno , Dan R. K. - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

SwiShmem: Distributed Shared State Abstractions for Programmable Switches

Lior Zeno, Dan R. K. Ports, Jacob Nelson, Mark Silberstein

slide-2
SLIDE 2

Hardware Trend: PISA

Barefoot Tofino Broadcom Trident NVIDIA Networking Spectrum

slide-3
SLIDE 3

Current Trend: In-Switch Acceleration

SilkRoad: Making Stateful Layer-4 Load Balancing Fast and Cheap Using Switching ASICs [SIGCOMM 2017] Heavy-Hitter Detection Entirely in the Data Plane [SOSR 2017] Just say NO to Paxos Overhead: Replacing Consensus with Network Ordering [OSDI 2016] NetCache: Balancing Key-Value Stores with Fast In-Network Caching [SOSP 2017] Offloading Real-time DDoS Attack Detection to Programmable Data Planes [IM 2019] Cheetah: Accelerating Database Queries with Switch Pruning [SIGMOD 2020]

slide-4
SLIDE 4

Unrealized Potential

Problem: Stateful + Distributed is a challenging combination

Scalability Availability

Packet

Locality

slide-5
SLIDE 5

Network-Wide Heavy-Hitters Detection

Match Counter flow0 128 flow1 64 flow2 1024 … … Data-plane updateable registers

slide-6
SLIDE 6

Network-Wide Heavy-Hitters Detection

Match Counter flow0 128 flow1 64 flow2 1024 … …

slide-7
SLIDE 7

Network-Wide Heavy-Hitters Detection

Match Counter flow0 512 flow1 64 flow2 256 … … Match Counter flow0 512 flow2 64 flow4 512 … … Match Counter flow0 512 flow1 32 flow2 128 … … Controller Control-plane replication is insufficient for data-plane

  • bjects

An ad-hoc solution

slide-8
SLIDE 8

Network-Wide Heavy-Hitters Detection

Match Shared Counter flow0 1024 flow1 64 flow2 256 … … Match Shared Counter flow0 1024 flow2 256 flow4 512 … … Match Shared Counter flow0 1024 flow1 64 flow2 256 … … Counters are replicated entirely in the data-plane

slide-9
SLIDE 9

A Principled Approach

Do not reinvent the wheel Map proven and tested replication protocols

slide-10
SLIDE 10

Taxonomy of State Access in NFs

Consistency Write frequency Strong consistency Frequent updates Strong consistency Infrequent updates Weak consistency Frequent updates Weak consistency Infrequent updates NAT Load balancer Firewall IPS DDoS Rate limiter Strong consistency is often paired with infrequent updates Applications with frequent updates can tolerate weak consistency This combination is challenging

slide-11
SLIDE 11

SwiShmem Registers

  • Eventual Write-Optimized (EWO)
  • Eventual consistency (low read/write latency)
  • Strong Read-Optimized (SRO)
  • Linearizability
  • Eventual Read-Optimized (ERO)
  • Eventual consistency (lower read latency)

In the paper

slide-12
SLIDE 12

Design Principles

Memory is scarce (𝑷(𝟐𝟏 𝑵𝑪) SRAM) Communication is cheap (𝑷(𝟔 𝑼𝒄𝒒𝒕))

slide-13
SLIDE 13

Eventual Write-Optimized: HH Detection

Match Shared Counter flow0 (0, 0, 0) … … Match Shared Counter flow0 (0, 0, 0) … … Match Shared Counter flow0 (0, 0, 0) … … CRDTs

slide-14
SLIDE 14

Eventual Write-Optimized: HH Detection

Match Shared Counter flow0 (0, 0, 0) … … Packet Increment local counter and broadcast the update Match Shared Counter flow0 (0, 1, 0) … … Match Shared Counter flow0 (0, 0, 0) … …

slide-15
SLIDE 15

Eventual Write-Optimized: HH Detection

Match Shared Counter flow0 (0, 1, 0) … … Packet Reads are performed locally by summing all the elements Match Shared Counter flow0 (0, 1, 0) … … Match Shared Counter flow0 (0, 1, 0) … …

slide-16
SLIDE 16

What About Packet Loss?

Updates may get lost Match Shared Counter flow0 (0, 0, 0) … … Match Shared Counter flow0 (0, 0, 0) … … Match Shared Counter flow0 (0, 0, 0) … … Periodic synchronization

slide-17
SLIDE 17

Vision: “The One Big Switch Abstraction”

SwiShmem: Distributed shared state management Data-plane primitives library State management directory for locality Automation tools: automatic transformation

  • f a single-switch program

The One Big Switch Abstraction

Thank you! Questions?