ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page...

18
ClickNF: a Modular Stack for Custom Network Functions Massimo Gallo, Rafael Laufer

Transcript of ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page...

Page 1: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

ClickNF: a Modular Stack for Custom Network FunctionsMassimo Gallo, Rafael Laufer

Page 2: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

Firewall

TLS/SSL Server

Proxy Server

L7 Load Balancer

IntroductionNetwork Function evolution

Page 3: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

Firewall

TLS/SSL Server

Proxy Server

L7 Load Balancer

IntroductionNetwork Function evolution

Can we build a fully modular and customizable stack (L2-L7) for

NF deployment without sacrificing performance?

Page 4: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

Firewall

TLS/SSL Server

Proxy Server

L7 Load Balancer

IntroductionNetwork Function evolution

Can we build a fully modular and customizable stack (L2-L7) for

NF deployment without sacrificing performance?

Page 5: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

5

Click Router

• Elements that initiate packet flow have a task scheduled periodically

• FromDevice and ToDevice call push and pull within their tasks

Overview

Page 6: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

6

Click RouterFeatures & Limitations

MODULARITY PROGRAMMABILITY

MULTITHREADING KERNEL/USER SPACE NO BLOCKING I/O

NO TRANSPORTNO NETWORK

ACCELERATION

NO APPLICATION(MODULARITY)

Page 7: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

7

ClickNFDesign

• Monolithic Network stacks :

– Lack of flexibility

– Hard to customize and debug

• ClickNF, decompose it into several simple elements:

– Unfettered acces to the network stack

– Module reuse

– Easier cross-layer optimization

1.

2.

3.

4.

Page 8: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

8

− 10/40 GbE cards

− Polling to fetch packets

− Wrap into Click packet and push

− Hardware flow control

− IP checksum offloading

− TCP checksum offloading

DPDK MODULEHARDWARE

OFFLOADING

ClickNF1. High-Speed Packet I/O

MULTICORE

− Receive Side Scaling

− Dedicated per-core data structure

Page 9: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

9

• Full compliance with standards

• Support for:

– TCP options

– Congestion control

– RTT estimation

• Composed of 60+ elements

• Elements modify TCP Control Block stored in TCPInfo

• Packet annotations and flags

ClickNF2. Click TCP

Page 10: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

10

ClickNF3. Blocking I/O

yield

click_recv

Regular vs Blocking tasksT

ime

push

...

push

...

...

...

wake_up

...

push

• Click natively supports nonblocking I/O

– Complex logic for applications

• Blocking I/O

– Simpler, equivalent performance

– Blocking for socket I/O multiplexing

• ClickNF introduces blocking tasks

– If I/O request cannot be completed, task yields CPU

– Task resumes illusion of continuity

– Backwards compatible

Page 11: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

11

ClickNF4. Application modularity

• ClickNF provides 4 building blocks:

– TCPEpollServer

– TCPEpollClient

– SSLServer

– SSLClient

• Application layer elements use packet annotations to control lower layers

• Simplify NF programming and code reuse

Page 12: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

12

ClickNF4. Application modularity

• ClickNF provides 4 building blocks:

– TCPEpollServer

– TCPEpollClient

– SSLServer

– SSLClient

• Application layer elements use packet annotations to control lower layers

• Simplify NF programming and code reuse

Page 13: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

13

ClickNFExperimental results

• Hardware:

– 3 machines Intel Xeon® 40-core E5-2660 v3 2.60GHz, 64 GB RAM

– Intel Xeon®82599ES NICs with two10 GbE interfaces

• Software:

– Ubuntu 16.10 (GNU/Linux 4.4.0-51-generic x86 64)

– Click 2.1

– DPDK 17.02, DPDK Traffic generator

• Tests:

– Microbenchmarks ( Packet I/O, modularity , HW offloading, Performance )

– Applications (HTTP Cache/Server, SOCKS4 proxy )

Page 14: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

14

I/O & Modularity

No I/O (TX) RX (FWD)

• 64bytes packet, increasing # elements

– Modularity has a cost!

– Mitigated by batch processing

ClickNFMicrobenchmarks

Page 15: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

15

• Small TCP connection (64bytes packet). Echo request <-> Echo reply

– Slightly better than state of the art user-space stack

Performance

ClickNFPerformance

Page 16: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

16

• SOCKS4 Proxy server, increasing page size

– High performance

– Composable i.e., add remove SSL/TLS

– Simple modules i.e., 100s LoC

ClickNFApplication

Application

Page 17: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules

17

• Compose custom, modular NF (end-host or in-network)

• Good scaling properties

• Flexibility

• Open source https://github.com/nokia/ClickNF

ClickNFConclusion

Page 18: ClickNF: a Modular Stack for Custom Network Functions · •SOCKS4 Proxy server, increasing page size –High performance –Composable i.e., add remove SSL/TLS –Simple modules