Arpit Gupta Princeton University Rob Harrison, Ankita Pawar, Rdiger - - PowerPoint PPT Presentation

arpit gupta
SMART_READER_LITE
LIVE PREVIEW

Arpit Gupta Princeton University Rob Harrison, Ankita Pawar, Rdiger - - PowerPoint PPT Presentation

SONATA: Query-Driven Network Telemetry Arpit Gupta Princeton University Rob Harrison, Ankita Pawar, Rdiger Birkner, Marco Canini, Nick Feamster, Jennifer Rexford, Walter Willinger Conventional Network Telemetry Compute Store Analysis


slide-1
SLIDE 1

SONATA: Query-Driven Network Telemetry

Arpit Gupta

Princeton University

Rob Harrison, Ankita Pawar, Rüdiger Birkner, Marco Canini, Nick Feamster, Jennifer Rexford, Walter Willinger

slide-2
SLIDE 2

2

Conventional Network Telemetry

Compute Store Queries NetFlow, pcap sFlow, SNMP, etc.

Collection Analysis

slide-3
SLIDE 3

3

Conventional Network Telemetry

Compute Store NetFlow, pcap sFlow, SNMP, etc.

Collection Analysis

Collection is not driven by Analysis

Queries

slide-4
SLIDE 4

Problems with Status Quo

  • Expressibility

– Configure collection & analysis stages separately – Static (and often coarse) data collection – Brittle analysis setup---specific to collection tools

4

slide-5
SLIDE 5

Problems with Status Quo

  • Expressibility

– Configure collection & analysis stages separately – Static (and often coarse) data collection – Brittle analysis setup---specific to collection tools

  • Scalability

As Traffic Volume or # Monitoring Queries increases

  • Hard to answer queries in real-time
  • Hard to transport data from monitoring sensors

5

Hard to express & scale queries for network telemetry tasks!

slide-6
SLIDE 6

SONATA: Query-Driven Telemetry

  • Uniform Programming Abstraction

Express queries as dataflow operations over pkt. tuples

  • Query-Driven Data Reduction

Execute subset of dataflow operations in data plane

  • Coordinated Data Collection & Analysis

Select query plans that make best use of available resources

6

slide-7
SLIDE 7

Uniform Programming Abstraction

  • Extensible Packet-tuple Abstraction

Queries operate over all packet tuples, at every location in the network

  • Expressive Dataflow Operators

– Most telemetry applications require

  • collecting aggregate statistics over subset of traffic
  • joining results of one analysis with the other

– Easy to express them as declarative queries composed of dataflow operators

7

slide-8
SLIDE 8

Example Query

Detecting DNS Reflection Attack

Detect hosts for which # of unique source IPs sending DNS response messages exceeds threshold (Th)

8

victimIPs = pktStream(W) .filter(p => p.srcPort == 53) .map(p => (p.dstIP, p.srcIP)) .distinct() .map((dstIP, srcIP) => (dstIP, 1)) .reduceByKey(sum) .filter((dstIP, count) => count > Th) .map((dstIP, count) => dstIP)

Express queries without worrying about where and how they get executed

slide-9
SLIDE 9

Changing Status Quo

  • Expressibility

– Express dataflow queries over packet tuples – Not tied to low-level (3rd party/platform-specific) APIs – Trivial to add new queries and change collection tools

9

slide-10
SLIDE 10

10

Query Execution

Packet Capture Stream Processor Runtime Queries Packet Tuples

Process all (or subset of) captured packet tuples using state-of-the-art Stream Processor

Expressible but not Scalable!

slide-11
SLIDE 11

PISA Targets for Data Reduction

  • Programmable parsing

Allow new query-specific header fields for parsing

  • State in packets & registers

Support simple stateful computations

  • Customizable hash functions

Support hash functions over flexible set of fields

  • Flexible match/action table pipelines

Support match/action tables with prog. actions

11

slide-12
SLIDE 12

Compiling Dataflow Operators

  • Map, Filter & Sample

Apply sequence of match-action tables

  • Distinct & Reduce

– Compute index, & read value from hash tables – Apply function (e.g., bit_or for distinct) & then update the hash table – Use sketches, e.g. reduce(sum) à CM Sketches

  • Limitations

– Complex transformations, e.g. log, regex, etc.

12

slide-13
SLIDE 13

Compiling Dataflow Queries

  • Compiling a Single Query

– Generate & update query-specific metadata fields – Apply operator’s match-action tables in sequence – Clone packet if report bit set

  • Compiling Multiple Queries

– Generate & update metadata fields for all queries – Apply operators for all queries in sequence – Clone packet if report bit is set for at least one query

13

slide-14
SLIDE 14

Coordinated Data Coll. & Analysis

  • Query Partitioning

– Execute subset of dataflow operators in data plane – Reduce packet tuples at the cost of additional state in the data plane

  • Iterative Refinement

– Iteratively zoom-in on traffic of interests – Reduce state at the cost of additional detection delay

14

How to select the best query plan?

slide-15
SLIDE 15

Query Planning

15

  • Reflection Attack Query
  • Partitioning Plans

Plan 1: Data Plane only Plan 2: Stream Processor only

  • Refinement Plans

– Refinement key: dstIP – Refinement levels: {/8, /32}

pktStream(W) .filter(p => p.srcPort == 53) .map(p => (p.dstIP, p.srcIP)) .distinct() .map((dstIP, srcIP)=>(dstIP,1)) .reduceByKey(sum) .filter((dstIP,count)=>count>Th) .map((dstIP, count) => dstIP)

slide-16
SLIDE 16

Query Planning

16

  • Reflection Attack Query
  • Partitioning Plans

Plan 1: Data Plane only Plan 2: Stream Processor only

  • Refinement Plans

– Refinement key: dstIP – Refinement levels: {/8, /32} Query Plan Graph

dIP/8,1 dIP/8,2 dIP/32,1 dIP/32,2 dIP/32,1 dIP/32,2

Src Tgt

w0,8,1 w0,8,2 w0,32,2 w0,32,1 w8,32,1 w8,32,2 w8,32,2 w8,32,1

slide-17
SLIDE 17

Query Planning

17

Src à dIP/8,1 à dIP/32,2 à Tgt

Query Plan Graph

dIP/8,1 dIP/8,2 dIP/32,1 dIP/32,2 dIP/32,1 dIP/32,2

Src Tgt

w0,8,1 w0,8,2 w0,32,2 w0,32,1 w8,32,1 w8,32,2 w8,32,2 w8,32,1

Selects plan with smallest weighted cost

slide-18
SLIDE 18

Implementation

18

Streaming Driver Data Plane Target Packets In Stream Processor SONATA’s API Queries

Q1

(qid, …) (qid, …)

Q2 QN

Queries Runtime Data Plane Driver Packets Out

Collection is now driven by Analysis!

Query Partitioning Iterative Refinement

slide-19
SLIDE 19

Evaluation

  • Workload

Large-IXP network: 2 hours long IPFIX trace, 3 Tbps peak traffic, packet sampling rate = 1/10K

  • Queries

DDoS-UDP, SSpreader, PortScan, Reflection Attack

  • Comparisons

Stream-Only, Part-OF, Part-PISA, Fixed-Refinement

19

slide-20
SLIDE 20

Benefits of Query Planning

20

2.5 5.0 7.5 10.0 12.5 15.0

Part-OF Part-PISA

2 4 6 8 2.5 5.0 7.5 10.0 12.5 15.0

Fixed Refinement

2 4 6 8

Sonata

0.0 0.2 0.4 0.6 0.8 1.0 Nmax (Kpps) 0.0 0.2 0.4 0.6 0.8 1.0 Bmax (KB) 1 2 3 4 5 6 7 8

Selects eight different query plans for different system configurations

  • Bmax: Max. state data

plane can support

  • Nmax: Max. pkt. tuples

stream processor can process

  • Each color represents a

unique query plan

SONATA makes best use of available resources

slide-21
SLIDE 21

Scaling Query Executions

21 DDoS-UDP SSpreader PortScan All Queries 6 12 18 24 30 Number of Tuples (x1000)

Part-OF SONATA

Number of pkt tuples processed by Stream Processor

Executing stateful operations in data plane reduces workload on Stream Proc.

slide-22
SLIDE 22

Scaling Query Executions

22

State (KB) required by data plane targets

Iterative refinement reduces state required by the data plane targets

DDoS-UDP SSpreader PortScan All Queries 5 10 15 20 25 State (KB)

Part-PISA Fixed Ref. SONATA

slide-23
SLIDE 23

Changing Status Quo

  • Expressibility

– Express Dataflow queries over packet tuples – Not worry about how and where the query is executed – Adding new queries and collection tools is trivial

  • Scalability

– Answers hundreds of queries in real-time for traffic volume as high as few Tb/s – Strikes a balance between available resources, i.e.

  • tuples processed by the stream processor
  • state in the data plane

23

Expressible & Scalable!

slide-24
SLIDE 24

Summary

  • SONATA makes it easier to express and scale

network monitoring queries using

– Programmable Data Plane – Scalable Stream Processor

  • Running Code

– Github: github.com/Sonata-Princeton/SONATA-DEV – Run test queries or express new ones

  • SONATA@arxiv: arxiv.org/abs/1705.01049

24