� 1 The Network is The Computer: Running Distributed Services on Programmable Switches Robert Soulé Università della Svizzera italiana and Barefoot Networks
� 2 Conventional Wisdom The network is “just plumbing” Teach systems grad students the end-to-end principle [Saltzer, Reed, and Clark, 1981] Programmable networks are too expensive, too slow, or consume too much power
� 3 This Has Changed A new breed of switch is now available: They are programmable No power or cost penalties They are just as fast as fixed-function devices (6.5 Tbps!)* * Yes, I work at Barefoot Networks.
� 4 If This Trend Continues… Java OpenCL MatLab TensorFlow ? CPUs GPUs DSPs TPUs ASICs Programmable ASICs will replace fixed-function chips in data centers
� 5 What Functionality Belongs in the Network? Load Balancing Firewall Congestion Control
� 6 Tremendous Opportunity Fault-tolerance Key-Value Store Stream Processing Run important, widely used distributed services in the network
� 7 Tremendous Opportunity A 10,000x improvement in throughput Fault-tolerance [NetPaxos SOSR ’15, P4xos CCR ’16]
� 8 Tremendous Opportunity 2 billion queries / second with 50% reduction Key-Value Store in latency [NetCache, NSDI ’17]
� 9 Tremendous Opportunity Process 4 billion events per second. Stream Processing [Linear Road, SOSR ’18]
� 10 Key Questions This sounds good on paper, but… How do we actually program network devices? What are the limitations? What are the abstractions? What (parts of) applications could or should be in the network? What is the right architecture? Given that we are asking the network to do so much more work, how can we be sure that it is implemented correctly?
� 11 Agenda and Tools Programmable Distributed network applications Leverage hardware emerging hardware… This talk … to accelerate distributed services… … and prove that the implementations are correct. Logic and formal methods
� 12 Outline of This Talk Introduction Programmable Network Hardware Co-designing Networks and Distributed Systems Proving Correctness Outlook
� 13 Programmable Network Hardware
� 14 What is A Programmable Network? Rules “If ip.dst is 10.0.0.1, forward out port 1” Control Plane Data Plane Packets
� 15 What is A Programmable Network? Source Rules Compiler Language e.g., Merlin Controller [CoNext ’14] Control Plane Data Plane e.g., P4FPGA [SOSR ’17] Source Compiler Language Packets
� 16 Match Action Table Match Action Data plane programming { specifies: - fields to read - possible actions - size of table Main abstraction for data plane programming
� 17 Match Action Table Match Action 10.0.0.1 Drop Control plane { programming 10.0.0.2 Forward out 1 specifies the rules in 10.0.0.3 Forward out 2 the table 10.0.0.4 Modify header
� 18 Match Action Unit Action Match • Stateless ALU • SRAM for exact match • Limited instruction set • TCAM for ternary match • Arithmetic operations Match • Bitwise operations • Stateful ALU Action • Counters Unit • Meters Massively Parallelized: • Data Parallelism for performance • Pipelined stages for data dependencies
� 19 Programmable Data Plane Ingress Egress Match Match Match Match Action Action Action Action Match Match Match Match Queues De- Action Action Action Action Parser and Parser Crossbar … … … … Match Match Match Match Action Action Action Action Programmable ASIC Architecture
� 20 P4 Language Concepts Match Match Match Match Action Action Action Action Match Match Match Match Queues De- Action Action Action Action Parser and Parser Crossbar … … … … Match Match Match Match Action Action Action Action
� 20 P4 Language Concepts Specify header format and how to parse Match Match Match Match Action Action Action Action Match Match Match Match Queues De- Action Action Action Action Parser and Parser Crossbar … … … … Match Match Match Match Action Action Action Action
� 20 P4 Language Concepts Specify header format and how to parse Match Match Match Match Action Action Action Action Match Match Match Match Queues De- Action Action Action Action Parser and Parser Crossbar … … … … Define Match Match Match Match tables that match on Action Action Action Action header fields and perform actions (e.g., modify or drop)
� 20 P4 Language Concepts Specify Compose header format and lookup tables how to parse Match Match Match Match Action Action Action Action Match Match Match Match Queues De- Action Action Action Action Parser and Parser Crossbar … … … … Define Match Match Match Match tables that match on Action Action Action Action header fields and perform actions (e.g., modify or drop)
� 21 Target Constraints Match Match Match Match Action Action Action Action Match Match Match Match Queues De- Action Action Action Action Parser and Parser Crossbar … … … … Match Match Match Match Action Action Action Action
� 21 Target Constraints Fixed-length pipeline Match Match Match Match Action Action Action Action Match Match Match Match Queues De- Action Action Action Action Parser and Parser Crossbar … … … … Match Match Match Match Action Action Action Action
� 21 Target Constraints Fixed-length pipeline Match Match Match Match Action Action Action Action Match Match Match Match Queues De- Action Action Action Action Parser and Parser Crossbar … … … … Match Match Match Match Action Action Action Action Limited Memory
� 21 Target Constraints Fixed-length pipeline Match Match Match Match Action Action Action Action Match Match Match Match Queues De- Action Action Action Action Parser and Parser Crossbar … … … … Match Match Match Match Action Action Action Action Data and Limited control Memory dependencies
� 22 Observations Architecture is designed for speed and e ffi ciency Performance doesn’t come for free Limited degree of programmability Not Turing complete by design Language syntax and hardware generations may change, but the basic design is fundamental
� 23 Co-Designing Networks and Distributed Systems
� 24 What Applications Should We Put in the Network? Monte Carlo Simulation Fundamental Building Blocks
� 25 Building Blocks For Distributed Systems Building Block Description System Essential for building fault- NetPaxos SOSR ’15 Consensus tolerant, replicated P4xos, CCR ’16 systems Maximize utilization of NetCache, SOSP ’17 Caching available resources NetChain, NSDI ’18 In-network computation Data Processing Linear Road, SOSR ’18 and analytics Publish/ Semantically meaningful In submission Subscribe communication
� 26 Consensus Protocols Get a group of replicas to agree on next application state Consensus protocols are the foundation for fault-tolerant systems E.g., OpenReplica, Ceph, Chubby Many distributed systems problems can be reduced to consensus E.g., Atomic broadcast, atomic commit
� 27 Ways to Improve Consensus Performance Consensus Protocols Enforce Push logic particular into network network hardware behavior Programmable Networks
� 28 Consensus / Network Design Space No message loss, FIFO delivery Assumptions Traditional Paxos Best e ff ort Weak Programmability Strong Forward packets Storage and logic
� 29 Consensus / Network Design Space No message loss, FIFO delivery Assumptions Fast Paxos Traditional Paxos Best e ff ort Weak Programmability Strong Forward packets Storage and logic
� 30 Consensus / Network Design Space No message loss, FIFO Protocol 1 Protocol 3 delivery Assumptions Fast Paxos Protocol 2 Traditional Protocol 4 Paxos Best e ff ort Weak Programmability Strong Forward packets Storage and logic
� 31 Consensus / Network Design Space No message loss, FIFO NetPaxos Protocol 3 delivery Assumptions Fast Paxos Protocol 2 Traditional Protocol 4 Paxos Best e ff ort Weak Programmability Strong Forward packets Storage and logic
� 32 Consensus / Network Design Space No message loss, FIFO NetPaxos Protocol 3 delivery 99.9% of the time, Assumptions assumptions held Fast Paxos Protocol 2 Traditional Protocol 4 Paxos Best e ff ort Weak Programmability Strong Forward packets Storage and logic
Recommend
More recommend