28
FBOSS: Building Switch Software at Scale Sean Choi, Boris Burkov, Alex Eckert, Tian Fang, Saman Kazemkhani, Rob Sherwood, Ying Zhang, James Zeng

FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

FBOSS:Building Switch Software at Scale

Sean Choi, Boris Burkov, Alex Eckert, Tian Fang, Saman Kazemkhani, Rob Sherwood, Ying Zhang, James Zeng

Page 2: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

Motivation

Page 3: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

2.23B MonthlyActive Users

Scale of Facebook Community

1.3B MonthlyActive Users

1B MonthlyActive Users

1.5B MonthlyActive Users

2.5B people use at least one of these products

Page 4: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

Our DC Network is Growing FAST!

1x

5x

10x

15x

20x

30x

0 3 6 9 12 15 18 21 24

FBO

SS D

eplo

ymen

ts →

Months →

Growth of FBOSS Deployments

Page 5: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

• Vendor switch software is built for all of their user needs• Most users have to deal with software with a lot of unused features

• Complexity in managing excess networking features• Increased downtime, operational complexity, and security holes

• Slower rate of change to validate a large range of features

Challenges in Scaling the NetworkIssues with Extraneous Features

Page 6: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

• Customized hardware• Pick the minimal

software needed for the specific network• Powerful CPU to run

more complex software

Arrival of the White Box SwitchCustomizable switch hardware and software

Power SupplyFan

TemperatureSensor

x86 CPU

SSD

BMC

Switch ASIC

CPLD

QSFP Ports

Page 7: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

• Facebook has an infrastructure already in place for…•Monitoring and Data Analytics• Logging• Service Management and etc.

• Vendors generally do not have full access to these tools

Existing Software ServicesReusing Existing Infrastructure

Page 8: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

FBOSS: Facebook Open Switching System

Page 9: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

we can run switch softwarein a similar way

we run our software services

FBOSS: Facebook Open Switching Systemis an experiment to discover if…

Page 10: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

• Switch-as-a-Server• Continuous integration and staged deployment• Integrate closely with existing software services• Open-source software

• Deploy-Early-and-Iterate• Focus on developing and deploying minimal set of features• Quickly iterate with smaller “diffs”

FBOSS Design Principles

Page 11: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

• Scuba: Real-time monitoring and data analysis (VLDB 2013)

• Gorilla: In-memory time-series database (VLDB 2015)

• Robotron: Network Management (SIGCOMM 2016)

Facebook Software InfrastructureSome example of Existing Software Services

Page 12: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

FBOSS Overview

FBOSS

Switch ASIC

Switch Software

Switch Hardware

Protocols(BGP, ECMP)

NetworkConfigurator

Monitoring Service

External Software

Page 13: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

FBOSS Architecture

BMCx86 Microserver

Switch ASIC

Switch Software

Switch Hardware

Front Panel Ports and Modules Console and OOBManagement Ports

Linux Kernel

StandardSystem Tools &

Libraries

Monitor Configuration Manager

Routing Daemon

FBOSS(Agent, QSFP Service, CLI)

OpenBMCSwitch SDK

PowerSupplyFans

Page 14: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

FBOSS Architecture• Switch SDK: Vendor provided

software for ASIC interaction• Hardware Abstraction:

Hardware specific implementation• HwSwitch: Generic interface for

switch hardware, e.g., port control• SwSwitch: Hardware independent

switching logic, e.g., L2, L3 and ACL

Link Status Handler

Slow PathPacket Handler

Switch ASICAPIs

Switch Feature Implementation(L2, L3, ACL, LAG)

Event HandlerCallback

Hardware Abstraction

Generic Switch Hardware Abstraction

HwSwitch

Hardware Independent Routing Logic

Switch State Manager

Thrift Handler

SwSwitch

SDK

FBOSS Agent

Page 15: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

FBOSS Architecture• State Observers: Manage changes

in the states within SwSwitch• Local Config Generator: Generates

local configuration from externally generated configuration

• Thrift Management Interface: Receives external commands via Thrift interface

• QSFP Service: Manages QSFP Ports Link Status Handler

Slow PathPacket Handler

Switch ASICAPIs

Switch Feature Implementation(L2, L3, ACL, LAG)

Event HandlerCallback

Hardware Abstraction

Generic Switch Hardware Abstraction

HwSwitch

Hardware Independent Routing Logic

Switch State Manager

Thrift Handler

SwSwitch

SDK

FBOSS AgentThrift Management

InterfaceState

Observers

QSFP Service

Local ConfigGenerator

Page 16: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

FBOSS State Management

SwitchState

Ports VLANs Routes

Port1 … …Porti VLAN1… VLANj Route1 Routek

ARP1 ARPj

SwitchState’

VLANs’

VLAN’j

ARP’j

Copy-on-write Tree

SwitchState

Ports VLANs

Port1 … Porti VLAN1… VLANj

ARP1 ARPj

Routes

Route1… Routek

Page 17: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

FBOSS State Management

SwitchState

Ports VLANs Routes

Port1 … …Porti VLAN1 … VLANj Route1 Routek

ARP1 ARPj

SwitchState’

VLANs’

VLAN’j

ARP’j

Copy-on-write Tree

• No Read Locks• Easy Debugging• Easy Restarts

• Complex Implementation• More processing per update

Page 18: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

Testing, Deployment & Management

Page 19: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

FBOSS Testing and DeploymentSources of switch outages

28%24%

8%

7%

14%

11%

5%

2%1%

Misc. Sofware Issues

Microserver Reboot

Kernel Panic

Microserver Unresponsive

Loss of Power

Bus Degradation

SSD Issue

PCI-E Timeout

Misc. Hardware Issues

Soft

war

e (6

0%)

Har

dw

are

(40%

)

Page 20: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

• Continuous Canary• Deploy all commits continuously to 1~2 switches for each type

• Daily Canary• Deploy all of single day’s commits to 10~20 switches for each type

• Staged Deployment• Final stage to push all the commits to all the switches in the DC• Performed once every two weeks for reliability

FBOSS Testing and Deployment3 Stage Deployment via fbossdeploy

Page 21: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

FBOSS ManagementHow FBOSS interacts with network management system

• Configurations are generated by the network management system• Configurations are staged locally• Operational and Monitoring queries

are passed through the Thrift interface

CentralizedConfig Database

OperationManager

Monitor

Robotron

FBOSS AgentThrift

InterfaceLocal ConfigGenerator

Activeconfig

Staged config_1

GenerateStage

Re-use

Revert

Useconfig_x

Config DataQuery/ReceiveDevice States

Configuration Operation Monitoring

Page 22: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

Experiences

Page 23: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

Lessons from Deployment Experiences

• Side effect of infrastructure reuse• Side effect of rapid deployments• Resolving interoperability issues

Page 24: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

Lessons from Deployment Experiences

•Side effect of infrastructure reuse• Side effect of rapid deployments• Resolving interoperability issues

Page 25: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

Side Effect of Infrastructure ReuseIssues with combining applications with different SLAs • Switch software must be more reliable than most software services

• Warm boot: Retain ASIC tables and configurations at restart• BGP graceful restart: Restores BGP states after warm boot• New library caused warm boot to take longer than expected

=> Random BGP restart failures => Random network outages

• Lesson Learned : Be careful when using software with different SLAs

Page 26: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

Conclusion

Page 27: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

Conclusion

• Scaling massive DC networks requires leaner software with rapid updates

• FBOSS started 5 years ago as an experiment to see if we can build and deploy switch software as if we are running a generic software service

• Our experiences show that the experiment is quite successful • FBOSS is capable of quickly iterating, deploying and scaling switch software

Page 28: FBOSS: Building Switch Software at ScaleFBOSS Architecture •Switch SDK:Vendor provided software for ASIC interaction •Hardware Abstraction: Hardware specific implementation •HwSwitch:

Questions?https://github.com/facebook/fboss