correctness and performance for stateful chained network … · 2019-03-12 · stateful chained...

120
Correctness and Performance for Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W 1 *This work does not have any affiliation with Google

Upload: others

Post on 14-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Correctness and Performance for Stateful Chained Network Functions

Junaid KhalidW,G and Aditya AkellaW

1*This work does not have any affiliation with Google

Page 2: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Network Function Virtualization (NFV)

Hardware NF → software NF over commodity server

2

Page 3: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Network Function Virtualization (NFV)

Intrusion

detection

system (IDS)

Hardware NF → software NF over commodity server

2

Page 4: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Network Function Virtualization (NFV)

Caching

proxy

Intrusion

detection

system (IDS)

Hardware NF → software NF over commodity server

2

Page 5: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Network Function Virtualization (NFV)

Firewall

Caching

proxy

Intrusion

detection

system (IDS)

Hardware NF → software NF over commodity server

2

Page 6: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Network Function Virtualization (NFV)

Firewall

Caching

proxy

Intrusion

detection

system (IDS)

WAN

optimizer

Hardware NF → software NF over commodity server

2

Page 7: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Network Function Virtualization (NFV)

Firewall

Caching

proxy

Intrusion

detection

system (IDS)

WAN

optimizer

Hardware NF → software NF over commodity server

• Enables resource consolidation• Dynamic allocation of packet processing• Adding new functionality

2

Page 8: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Network Function Virtualization (NFV)

Firewall

Caching

proxy

Intrusion

detection

system (IDS)

WAN

optimizer

Hardware NF → software NF over commodity server

• Enables resource consolidation• Dynamic allocation of packet processing• Adding new functionality• Simplifies service chaining

2

Page 9: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Service Chaining

3

Page 10: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Service Chaining

3

Page 11: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Service Chaining

3

Intrusion

detection

system (IDS)

WAN

optimizer

Page 12: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Service Chaining

4

Page 13: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Service Chaining

5

Page 14: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Service Chaining

5

Page 15: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Service Chaining

Chain output equivalence (COE): for any input the aggregate output of a dynamic set of instances should be equivalent to the output produced by a single instance

5

Page 16: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Service Chaining

Chain output equivalence (COE): for any input the aggregate output of a dynamic set of instances should be equivalent to the output produced by a single instance.

6

Our goal is to provide COE in service chaining without compromising performance or correctness

Page 17: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Service Chaining

Chain output equivalence (COE): for any input the aggregate output of a dynamic set of instances should be equivalent to the output produced by a single instance.

6

Our goal is to provide COE in service chaining without compromising performance or correctness

Ensuring COE is challenging: NF chain attributes & Dynamic Actions

Page 18: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF Chain Attributes

7

Page 19: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF Chain Attributes

• Perform sophisticated stateful actions on packets/flows

7

1. NF statefulness

Page 20: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF Chain Attributes

IDS maintains cross-flows state (e.g., per host active conn. count) and per-flow state(e.g., TCP conn. state)

• Perform sophisticated stateful actions on packets/flows

7

1. NF statefulness

Page 21: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF Chain Attributes

IDS maintains cross-flows state (e.g., per host active conn. count) and per-flow state(e.g., TCP conn. state)

• Perform sophisticated stateful actions on packets/flows

7

1. NF statefulness

Page 22: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF Chain Attributes

• Perform sophisticated stateful actions on packets/flows

8

1. NF statefulness

Page 23: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF Chain Attributes

• Perform sophisticated stateful actions on packets/flows

• Action taken by an NF instance depends on the state updates from other NF instances

8

1. NF statefulness

2. Consistent state updates

updating shared state

Page 24: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF Chain Attributes

• Perform sophisticated stateful actions on packets/flows

• Action taken by an NF instance depends on the state updates from other NF instances

9

1. NF statefulness

2. Consistent state updates

off-path

Page 25: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF Chain Attributes

• Perform sophisticated stateful actions on packets/flows

• Action taken by an NF instance depends on the state updates from other NF instances

• Action at the downstream NF may depend on the upstream NFs

9

1. NF statefulness

2. Consistent state updates

3. Dependency between different NF instances

FTP

SSHoff-path

Page 26: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF Chain Attributes

• Perform sophisticated stateful actions on packets/flows

• Action taken by an NF instance depends on the state updates from other NF instances

• Action at the downstream NF may depend on the upstream NFs

9

1. NF statefulness

2. Consistent state updates

3. Dependency between different NF instances

SSHoff-path

Page 27: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Dynamic ActionsKey requirements

10

Page 28: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Dynamic ActionsKey requirementsLoad balancing/elastic scaling

• Flows are moved from one instance to another to balance load or handle traffic spikes

10

Page 29: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Dynamic ActionsKey requirements

• Safe cross-instance state transfer

Load balancing/elastic scaling

• Flows are moved from one instance to another to balance load or handle traffic spikes

10

Page 30: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Dynamic ActionsKey requirements

• Safe cross-instance state transfer

Load balancing/elastic scaling

• Flows are moved from one instance to another to balance load or handle traffic spikes

10

Page 31: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Dynamic ActionsKey requirements

• Safe cross-instance state transfer

• Consistent shared state

Load balancing/elastic scaling

• Flows are moved from one instance to another to balance load or handle traffic spikes

10

Page 32: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Dynamic ActionsKey requirements

• Safe cross-instance state transfer

• Consistent shared state

11

Page 33: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Dynamic ActionsKey requirements

• Safe cross-instance state transfer

• Consistent shared state

• State availability

Failure recovery

• When NF fails, all its state disappears. For fault tolerance, that state needs to be recovered

11

Page 34: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Dynamic ActionsKey requirements

• Safe cross-instance state transfer

• Consistent shared state

• State availability

12

Page 35: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Dynamic ActionsKey requirements

• Safe cross-instance state transfer

• Consistent shared state

• State availability

• Duplicate suppression

Instance slowdown

• Clones may be launched to handle a straggler NF (a slow NF)

12

Page 36: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Dynamic ActionsKey requirements

• Safe cross-instance state transfer

• Consistent shared state

• State availability

• Duplicate suppression

• Chain-wide ordering

Instance slowdown

• Clones may be launched to handle a straggler NF (a slow NF)

• Downstream NFs rely on the order at upstream NFs

12

Page 37: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Key Requirements for COE

Page 38: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

• NF statefulness

• Consistent state updates

• Dependency between different NF instances

NF chain attributes

Key Requirements for COE

Page 39: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

x• NF statefulness

• Consistent state updates

• Dependency between different NF instances

NF chain attributes

Key Requirements for COEDynamic actions

• Elastic scaling

• Failure recovery

• Instance slowdown

Page 40: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

13

x =• NF statefulness

• Consistent state updates

• Dependency between different NF instances

NF chain attributes Key requirements

• Safe cross-instance state transfer

• Consistent shared state

• State availability

• Duplicate suppression

• Chain-wide ordering

Key Requirements for COEDynamic actions

• Elastic scaling

• Failure recovery

• Instance slowdown

Page 41: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Existing Solutions

Framework State availability

State transfer

Consistent shared state

Duplicate suppression

Chain-wide ordering

Split/Merge[NSDI’13]

OpenNF[SIGCOMM’14]

FTMB [SIGCOMM’ 15]

S6 [NSDI’18]

Pico Rep.[SOCC’13]

StatelessNF[NSDI’17]

14

Page 42: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Existing Solutions

Framework State availability

State transfer

Consistent shared state

Duplicate suppression

Chain-wide ordering

Split/Merge[NSDI’13]

OpenNF[SIGCOMM’14]

FTMB [SIGCOMM’ 15]

S6 [NSDI’18]

Pico Rep.[SOCC’13]

StatelessNF[NSDI’17]

14

Incomplete support → restricted functionality

Page 43: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC

CHC is a generic NFV framework to support all of these requirements without trading off correctness for performance or functionality

15

Page 44: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC

CHC is a generic NFV framework to support all of these requirements without trading off correctness for performance or functionality

16

Page 45: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC

CHC is a generic NFV framework to support all of these requirements without trading off correctness for performance or functionality

CHC consist of three main building blocks

16

Page 46: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC

CHC is a generic NFV framework to support all of these requirements without trading off correctness for performance or functionality

CHC consist of three main building blocks1. State store external to NF

16

Datastore

Page 47: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC

CHC is a generic NFV framework to support all of these requirements without trading off correctness for performance or functionality

CHC consist of three main building blocks1. State store external to NF2. NF state-aware state management algorithms

16

Datastore

Page 48: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC

CHC is a generic NFV framework to support all of these requirements without trading off correctness for performance or functionality

CHC consist of three main building blocks1. State store external to NF2. NF state-aware state management algorithms3. Metadata – logical clock and logs

16

Root splitter

Datastore

Page 49: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC

CHC is a generic NFV framework to support all of these requirements without trading off correctness for performance or functionality

CHC consist of three main building blocks1. State store external to NF2. NF state-aware state management algorithms3. Metadata – logical clock and logs

17

Page 50: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC – State Externalization

NF state is stored in an in-memory external state store (similar to statelessNF)

18

Page 51: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC – State Externalization

NF state is stored in an in-memory external state store (similar to statelessNF)• This ensures state availability and simplifies reasoning about state ownership

and concurrency control across instances

18

External store

Page 52: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC – State Externalization

NF state is stored in an in-memory external state store (similar to statelessNF)• This ensures state availability and simplifies reasoning about state ownership

and concurrency control across instances

Naively externalizing the state can degrade NF performance

18

External store

Page 53: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC

CHC is a generic NFV framework to support all of these requirements without trading off correctness for performance or functionality

CHC consist of three main building blocks1. State store external to NF2. NF state-aware state management algorithms3. Metadata – logical clock and logs

19

Page 54: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

State Management Strategies

State

20

Page 55: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

State Management Strategies

State

per-flow cross-flow

20

Page 56: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

State Management Strategies

State

per-flow cross-flow

Any

Instance-local caching w/ periodic nonblocking flush

20

Page 57: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

State Management Strategies

State

per-flow cross-flow

AnyWrite rarely (read heavy)

Instance-local caching w/ periodic nonblocking flush

Instance-local caching w/ callbacks

20

Page 58: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

State Management Strategies

State

per-flow cross-flow

AnyWrite rarely (read heavy)

Write mostlyRead rarely

Instance-local caching w/ periodic nonblocking flush

Instance-local caching w/ callbacks

20

Page 59: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

State Management Strategies

State

per-flow cross-flow

AnyWrite rarely (read heavy)

Write mostlyRead rarely

Write/read often

Instance-local caching w/ periodic nonblocking flush

Instance-local caching w/ callbacks

20

Page 60: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

State Management Strategies

State

per-flow cross-flow

AnyWrite rarely (read heavy)

Write mostlyRead rarely

Write/read often

Instance-local caching w/ periodic nonblocking flush

Instance-local caching w/ callbacks

20

Operation offloading

Page 61: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

State Maintenance - Offloading Operation

21

An NF instance can offload operations and instruct the datastore to perform them on its behalf

Page 62: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

State Maintenance - Offloading Operation

Operation Description

Increment/Decrement a value

Increment or decrement the value stored at key by the given value

Push/pop a value to/from list

Push or pop the value in/from the list stored at the given key

Compare and update Update the value, if the condition is true

21

An NF instance can offload operations and instruct the datastore to perform them on its behalf

Page 63: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

State Maintenance - Offloading Operation

Operation Description

Increment/Decrement a value

Increment or decrement the value stored at key by the given value

Push/pop a value to/from list

Push or pop the value in/from the list stored at the given key

Compare and update Update the value, if the condition is true

21

An NF instance can offload operations and instruct the datastore to perform them on its behalf

The datastore serializes operations issued by different instances for the same shared state object and applies them in the background

Page 64: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

An NF instance can offload operations and instruct the datastore to perform them on its behalf

State Maintenance - Offloading Operation

22

Page 65: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF1

An NF instance can offload operations and instruct the datastore to perform them on its behalf

State Maintenance - Offloading Operation

22

NF2NF1 DatastoreX=0

Without operation offload

Page 66: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF1

An NF instance can offload operations and instruct the datastore to perform them on its behalf

State Maintenance - Offloading Operation

22

NF2

NF1

DatastoreX=0

Without operation offload

Page 67: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF1

An NF instance can offload operations and instruct the datastore to perform them on its behalf

State Maintenance - Offloading Operation

22

NF2NF1 DatastoreX=0

Without operation offload

Page 68: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF1

An NF instance can offload operations and instruct the datastore to perform them on its behalf

State Maintenance - Offloading Operation

22

NF2

NF1

DatastoreX=0

X++

Without operation offload

Page 69: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF1

An NF instance can offload operations and instruct the datastore to perform them on its behalf

State Maintenance - Offloading Operation

22

NF2NF1 DatastoreX=0

X++

Without operation offload

Page 70: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF1

An NF instance can offload operations and instruct the datastore to perform them on its behalf

State Maintenance - Offloading Operation

22

NF2

NF1

DatastoreX=0

X++

X++

Without operation offload

Page 71: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF1

An NF instance can offload operations and instruct the datastore to perform them on its behalf

State Maintenance - Offloading Operation

22

NF2NF1 Datastore

X=2

X=0

X++

X++

Without operation offload

Page 72: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF1

An NF instance can offload operations and instruct the datastore to perform them on its behalf

State Maintenance - Offloading Operation

22

NF2

NF1

Datastore

X=2

X=0

X++

X++

NF2NF1 DatastoreX=0

Without operation offload With operation offload

Page 73: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF1

An NF instance can offload operations and instruct the datastore to perform them on its behalf

State Maintenance - Offloading Operation

22

NF2NF1 Datastore

X=2

X=0

X++

X++

NF2NF1 DatastoreX=0

Without operation offload With operation offload

Page 74: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF1

An NF instance can offload operations and instruct the datastore to perform them on its behalf

State Maintenance - Offloading Operation

22

NF2

NF1

Datastore

X=2

X=0

X++

X++

NF2NF1 DatastoreX=0

Without operation offload With operation offload

Page 75: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF1

An NF instance can offload operations and instruct the datastore to perform them on its behalf

State Maintenance - Offloading Operation

22

NF2NF1 Datastore

X=2

X=0

X++

X++

NF2NF1 DatastoreX=0

Without operation offload With operation offload

Page 76: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF1

An NF instance can offload operations and instruct the datastore to perform them on its behalf

State Maintenance - Offloading Operation

22

NF2

NF1

Datastore

X=2

X=0

X++

X++

NF2NF1 DatastoreX=0

X=2

Without operation offload With operation offload

Page 77: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

State Management Strategies

State

per-flow cross-flow

AnyWrite rarely (read heavy)

Write mostlyRead rarely

23

Instance-local caching w/ periodic nonblocking flush

Instance-local caching w/ callbacks

Page 78: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

State Management Strategies

State

per-flow cross-flow

AnyWrite rarely (read heavy)

Write mostlyRead rarely

Non-blocking operation without

caching

23

Instance-local caching w/ periodic nonblocking flush

Instance-local caching w/ callbacks

Page 79: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

State Management Strategies

State

per-flow cross-flow

AnyWrite rarely (read heavy)

Write mostlyRead rarely

Write/read often

Non-blocking operation without

caching

Depends upon traffic split. Cache, if split allows; flush periodically

23

Instance-local caching w/ periodic nonblocking flush

Instance-local caching w/ callbacks

Page 80: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC

CHC is a generic NFV framework to support all of these requirements without trading off correctness for performance or functionality

CHC consist of three main building blocks1. State store external to NF2. NF state-aware state management algorithms3. Metadata – logical clock and logs

24

Page 81: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Metadata

CHC adds a “root splitter” at the entry of a chain that:

Root splitter25

Page 82: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Metadata

CHC adds a “root splitter” at the entry of a chain that:

• Root splitter attaches a unique logical clock with each packet. Logical clock is used for duplication suppression, ordering, and traffic replay

Root splitter25

Adding logical clock

Page 83: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Metadata

CHC adds a “root splitter” at the entry of a chain that:

• Root splitter attaches a unique logical clock with each packet. Logical clock is used for duplication suppression, ordering, and traffic replay

• It also logs all the in-transit packets

Root splitter25

Packet logging

Adding logical clock

Page 84: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Metadata

CHC adds a “root splitter” at the entry of a chain that:

• Root splitter attaches a unique logical clock with each packet. Logical clock is used for duplication suppression, ordering, and traffic replay

• It also logs all the in-transit packets

CHC encodes state object’s ownership information and logical clock associated with state operations as metadata

Root splitter25

Packet logging

Adding logical clock

State ownership info

Page 85: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC – Elastic Scaling

Root splitter

26Old instance

Page 86: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC – Elastic Scaling

Root splitter

• CHC marks the last packet going to the old instance and first packet going to the new instance

26Old instance

Last pkt

First pkt

Page 87: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC – Elastic Scaling

Root splitter

• CHC marks the last packet going to the old instance and first packet going to the new instance

• Ownership information encoded as metadata of state objects is used to ensure consistent handover of per-flow state

26Old instance

Last pkt

First pkt

Page 88: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC – Elastic Scaling

Root splitter

• CHC marks the last packet going to the old instance and first packet going to the new instance

• Ownership information encoded as metadata of state objects is used to ensure consistent handover of per-flow state

• Cross-flow state does not require any special handling as operation offloading is used to update it

26Old instance

Last pkt

First pkt

Page 89: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC provides fault tolerance for:

• NF instance

• Root splitter

• Datastore

CHC – Fault Tolerance

27

Page 90: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC provides fault tolerance for:

• NF instance

• Root splitter

• Datastore

CHC – Fault Tolerance

27

Page 91: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF instance failure recovery:

CHC – Fault Tolerance

28

Page 92: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF instance failure recovery:

• Failover instance takes over

CHC – Fault Tolerance

28

Page 93: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF instance failure recovery:

• Failover instance takes over

• Datastore associates the failover instance ID with the relevant state

CHC – Fault Tolerance

28

Page 94: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF instance failure recovery:

• Failover instance takes over

• Datastore associates the failover instance ID with the relevant state

• Root replays the packet

CHC – Fault Tolerance

28

Page 95: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF instance failure recovery:

• Failover instance takes over

• Datastore associates the failover instance ID with the relevant state

• Root replays the packet

CHC – Fault Tolerance

28

Page 96: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

NF instance failure recovery:

• Failover instance takes over

• Datastore associates the failover instance ID with the relevant state

• Root replays the packet

• Metadata is used to suppress duplicate state-update and processing

CHC – Fault Tolerance

28

Page 97: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

CHC – Straggler Mitigation

29

Page 98: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

• Metadata (logical clocks) is used to suppress duplicate state updates at the datastore and duplicate packets at downstream NFs

CHC – Straggler Mitigation

29

Page 99: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

• Metadata (logical clocks) is used to suppress duplicate state updates at the datastore and duplicate packets at downstream NFs

CHC – Straggler Mitigation

29

Page 100: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

• Metadata (logical clocks) is used to suppress duplicate state updates at the datastore and duplicate packets at downstream NFs

CHC – Straggler Mitigation

29suppressed

state updates are suppressed

Page 101: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

30

Implementation of CHC

Page 102: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

• Prototype is implemented in C++

• Leverages Mellanox messaging accelerator for low latency communication

30

Implementation of CHC

Page 103: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

• Prototype is implemented in C++

• Leverages Mellanox messaging accelerator for low latency communication

• We implemented four NFs on top of CHC• NAT

• Trojan detector

• Portscan detector

• Load balancer

30

Implementation of CHC

Page 104: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Traditional NF with infinite capacity

31

Evaluation – Performance

State variable Scope State Externalization

Caching Asynch. + op offload

Port mapping per-flow

Total TCP pkt count cross flow

Total IP pkt count cross low

Page 105: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Traditional NF with infinite capacity

Externalized state operations

31

Evaluation – Performance

State variable Scope State Externalization

Caching Asynch. + op offload

Port mapping per-flow

Total TCP pkt count cross flow

Total IP pkt count cross low

Page 106: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Traditional NF with infinite capacity

Externalized state operations

State externalization with caching

31

Evaluation – Performance

State variable Scope State Externalization

Caching Asynch. + op offload

Port mapping per-flow

Total TCP pkt count cross flow

Total IP pkt count cross low

Page 107: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Traditional NF with infinite capacity

Externalized state operations

State externalization with caching

State externalization with caching and asynchronous + offloaded updates

31

Evaluation – Performance

State variable Scope State Externalization

Caching Asynch. + op offload

Port mapping per-flow

Total TCP pkt count cross flow

Total IP pkt count cross low

Page 108: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Traditional NF with infinite capacity

Externalized state operations

State externalization with caching

State externalization with caching and asynchronous + offloaded updates

31

Less than 0.6µs increase in the median per-NF packet processing latency

Evaluation – Performance

Page 109: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Evaluation – Dynamic Actions

32

Page 110: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Evaluation – Dynamic Actions

32

Page 111: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Evaluation – Dynamic Actions

32

Page 112: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Evaluation – Dynamic Actions

During cross instance state sharing

32

Page 113: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Evaluation – Dynamic Actions

During cross instance state sharing

75th%-ile latency of CHC is 20 times lower than OpenNF

32

Page 114: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Evaluation – Dynamic Actions

33

CHC

operation offloading

Page 115: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Evaluation – Dynamic Actions

33

checkpointing every 200ms

CHC

FTMB

operation offloading

Page 116: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Evaluation – Dynamic Actions

Ensuing Fault tolerance

33

checkpointing every 200ms

CHC

FTMB

operation offloading

Page 117: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Evaluation – Dynamic Actions

Ensuing Fault tolerance

75th%-ile latency of CHC is 6 times lower than FTMB

33

checkpointing every 200ms

CHC

FTMB

operation offloading

Page 118: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Evaluation

Portscan detector Load Balancer NAT

CHC operates at line rate with an end-to-end median per packet processing overhead of 11.3us

Trojan detector

Page 119: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

Evaluation

• State management performance

• Metadata overhead

• Correctness requirements:• State availability

• Cross instance state transfer

• Cross instance state sharing

• Chain wide ordering

• Duplication suppression

• Fault tolerance

Page 120: Correctness and Performance for Stateful Chained Network … · 2019-03-12 · Stateful Chained Network Functions Junaid Khalid W,G and Aditya Akella W *This work does not have any

36

• CHC supports output equivalence and high performance state management for NFV chains

• It hides the complexity of handling states during dynamic actions (elastic scaling and failure recovery)

• It relies on managing state external to NFs, but couples it with several caching and state update algorithms to ensure low latency

Summary