one sketch to rule them all: rethinking network flow monitoring

28
One Sketch to Rule Them All: Rethinking Network Flow Monitoring with UnivMon Zaoxing Liu, Antonis Manousis, Greg Vorsanger, Vyas Sekar, and Vladimir Braverman

Upload: lehanh

Post on 12-Feb-2017

219 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

One Sketch to Rule Them All:Rethinking Network Flow Monitoring

with UnivMon

Zaoxing Liu, Antonis Manousis, Greg Vorsanger,

Vyas Sekar, and Vladimir Braverman

Page 2: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Many Monitoring Requirements

2

TrafficEngineering“FlowSizeDistribution”

AnomalyDetection“Entropy”,“TrafficChanges”

WormDetection“SuperSpreaders”

Accounting“HeavyHitters”

• Who’s sendinga lotmore traffic than 10minago?(Change)

• Who’s sendinga lotfrom 10.0.1.0/16?(Heavy Hitter)

• Areyou being DDoS-ed?

Page 3: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Traditional: Packet Sampling

1613111

Flow reports1

Prior work: Not good for fine-grained analysis!

11316111131611

12

Sample packets at random, group into flows

FlowId CounterFlow = Packets with same patternSource and Destination Address and Ports

Estimate: FSD, Entropy, Heavy Hitters …

3

Page 4: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Alternative: App-Specific Sketches

PacketProcessing

CounterData

Structures

Application-LevelMetric

HeavyHitter Entropy Superspreader

Higher Complexity with more applicationsHigher development time as new applications appear

Tight Binding between monitoring data and control plane

….

PacketProcessing

CounterData

Structures

Application-LevelMetric

PacketProcessing

CounterData

Structures

Application-LevelMetric

….

Traffic

4

Pre-deployed Algorithms

Page 5: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Motivating Question

5

XOR

Today

AND

Canweachievethis

e.g.,NetFlow e.g.,Sketches

GeneralityLateBinding Fidelity

Page 6: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

UnivMon Vision

Control Plane

Data Plane

• One Sketch for multiple tasks • Naturally Late-binding

6

PacketProcessing “General”

Sketch

App1

Application-specificComputation

Appn…...

Traffic

UpdateCounters

Configure Report

Page 7: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Many Natural Challenges!

Does such a construction exist?

If it exists, is it feasible to implement?

Does it extend to a network-wide setting?e.g., Multiple paths, Multiple dimensions

Is it competitive w.r.t. custom algorithms?7

Page 8: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

This Talk

Does such a construction exist?

If it exists, is it feasible to implement?

Does it extend to a network-wide setting?e.g., Multiple paths, Multiple dimensions

Is it competitive w.r.t. custom algorithms?8

Page 9: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

This Talk

Does such a construction exist?

If it exists, is it feasible to implement?

Does it extend to a network-wide setting?e.g., Multiple paths, Multiple dimensions

Is it competitive w.r.t. custom algorithms?9

Page 10: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Concept of Universal Streaming

1331511 2 4 6 5 …...

10

frequency vector < f1,f2 … fn >

• Basic Streaming Algorithms:Frequency Moments Fk = ∑ 𝑓#$%

#&'

F2 : AMS Sketch, Count Sketch…...

One algorithm solves one problem

• Universal Streaming?

1331511 2 4 6 5 …...

frequency vector < f1,f2 … fn >G-sum = ∑ 𝑔(𝑓#)%

#&'

Universality:arbitrary g() function?

(A stream of length m with n unique items)

Page 11: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Theory of Universal Streaming [BO’10, BO’13]

Thm 1: There exists a universal approach to estimate G-sum wheng() function is non-decreasing such that g(0)=0, and 𝑔(𝑓#)doesn’t grow monotonically faster than 𝑓#2 .

11

Thm 2: A universal sketch construction can be used to estimate G-sum with high probability using polylogarithmic memory.

Page 12: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Intuition of Universal Sketch

12

Informal Definition: Item 𝑖 is a 𝑔-heavy hitter if changing its frequency 𝑓# significantly affects its G-sum.

Case 1: there is one sufficiently large a 𝑔-heavy hitter

Most of mass is concentrated in this heavy hitter.Use L2 Heavy-Hitter algorithm to find such a heavy hitter.

Case 2: there is NO single sufficiently large 𝑔-heavy hitter

Find heavy hitters on a series of sampled substreams ofincreasingly smaller size.

Page 13: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Universal Sketch Data Structure

1331511 2 4 6 5

11511

25

2

L2HeavyHitter(HH)Alg

(1,4),(3,2),(5,2)

(1,4),(5,2),(2,1)

…...

(2,1)

(5,2),(2,1)

0

1

log(n)

…...

2 5

5

Levels

HeavyHitterAlg

HeavyHitterAlg

HeavyHitterAlg

HeavyHitterAlg

InParallel HeavyHittersandCounters

13

Generatelog(n)substreamsbyzero-onehashfuncs

H1….Hlog(n)Count-Sketchetc.

EstimatedG-sum

Page 14: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

This Talk

Does such a construction exist?

If it exists, is it feasible to implement?

Does it extend to a network-wide setting?e.g., Multiple paths, Multiple dimensions

Is it competitive w.r.t. custom algorithms?14

Page 15: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

How to Map to P4

1331511 2 4 6 5

11511

2

(1,4),(3,2),(5,2)

(1,4),(5,2),(2,1)

…...

(2,1)

0

1

log(n)

…...

2 5

HeavyHitterAlg

HeavyHitterAlg

HeavyHitterAlg

15

EstimatedG-sum

Sampling Sketching Top-K

App-Estimation

…...

Page 16: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Mapping to P4

16

Sampling Sketching Top-K

App-Estimation

P4 Hash Funcs P4 Registers Hash Funcs+

P4 Registers

Custom Libraries

Page 17: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Top-K Stage on Switch

17

HWComplexity(needPriorityQueue)

Storage/Comm Overhead(report tocontroller)

Hardinhardware

Sampling Sketching Top-K

App-Estimation

Page 18: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Split Top-K Stage

18

Sampling Sketching Top-K

App-Estimation

HWComplexity(w/oPriorityQueue)

Storage/Comm.Overhead(report tocontroller)

SeveralMBsmore

Page 19: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

19

Sampling(Hashfunc)

SketchingP4register

App1

Application-specificComputation

Appn…...

Traffic

UpdateCounters

Implementation Summary

Top-KPossiblekeys

Top-K

SketchingSampling Top-K App-Estimation

Page 20: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

This Talk

Does such a construction exist?

If it exists, is it feasible to implement?

Does it extend to a network-wide setting?e.g., Multiple paths, Multiple dimensions

Is it competitive w.r.t. custom algorithms?20

Page 21: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Network-wide Problem

21

O1

O2

A B

D1

D2

N nodes D dimensions

(e.g., src, srcdst)

Trivial sol: place D*N sketchesOur goal: Place s sketches, where s<<D*NOne-big-switch abstraction

D

D

D

DD

D

One sketch for each dim

𝐷2

𝐷2

Page 22: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

This talkDoes such a construction exist?

If it exists, is it feasible to implement?

Does it extend to a network-wide setting?e.g., Multiple paths, Multiple dimensions

Is it competitive w.r.t. custom algorithms?22

Page 23: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Evaluation Setup

• Traces: CAIDA backbone traces• Split into different “epoch” durations

• Memory setup: 600KB—5MB

• Application metrics: HH, Change, DDoS, etc.

• Custom algorithms from OpenSketch

23

Page 24: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

UnivMon is Competitive Per-App

Maxerrorgap<3.6%;Resultsholdacrossmultipletraces

24

N/A

Page 25: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Clearadvantageswhenhandlingmoreapplications25

UnivMon Better for Larger Portfolio

Page 26: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Memory needs are reasonable

200

300

5s 30s 1m 5m

Me

mo

ry U

sag

e (

KB

)

Monitoring Time Interval

OS-trace1OS-trace2OS-trace3OS-trace4OS-trace5

UM-trace1UM-trace2UM-trace3UM-trace4UM-trace5

Slowincrease(logarithmically) andsupportslargerwindows

26

Page 27: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

• Network management needs many metrics

• Traditional: Generality XOR Fidelity• E.g., NetFlow vs Custom Sketches

• New opportunity: Universal Sketches!• Generality AND Fidelity AND Late Binding

• UnivMon brings this opportunity to fruition • Practical, realizable in P4• Comparable (and better) than custom• Amenable to “network-wide” abstractions• Many exciting future directions:

• Theoretical improvements, Native multidimensional, etc.

Conclusions

27

Page 28: One Sketch to Rule Them All: Rethinking Network Flow Monitoring

Network-wide coordination helps

28

0

500

1000

1500

2000

ATT-N.A. GEANT BellSouth

Ave

rage M

em

ory

(KB

)Network Wide Evaluation (600KB per sketch)

IngressGreedy-D.&C.

Q.&S.UnivMon