TCP Round-Trip Time Measurement

Measuring TCP RTT in 
the
 
data
 
plane
Xiaoqi Chen
, Hyojoon Kim, Javed M Aman,
Willie Chang, Mack Lee, Jennifer Rexford
Why
 
measure
 
round-trip
 
time?
 
Security
BGP hijack, inter-ISP path change
IP
 
spoofing
 
Performance
Persistent
 
link
 
congestion
Infer
 
user
 
Quality
 
of
 
Experience
 
(QoE)
2
Monitoring
 
at
 
a
 
vantage
 
point
Internet
C
lient
 
Vantage
Point
 
Passive
 
monitoring:
 
split
 
client-
server
 
RTT
 
into
 
two
 
legs
1
Run
 
a
 
programmable
 
switch
 
at
the
 
vantage
 
point?
Line-rate
 
traffic,
multiple
 
samples
 
per
 
flow
Directly in data plane,
enabling real-time reroutes
 
1
Cziva et al. 
Ruru: High-speed, Flow-level
Latency
 
Measurement and Visualization
of Live Internet Traffic. 
SIGCOMM 2017
3
TCP
 
sequence
 
numbers
Internet
C
lient
Vantage
Point
4
A
 
table
 
with
 
timestamps
Outgoing
 
Packet
A->B,
 
SEQ=1001,
 
Len=3
(eACK=1004)
Incoming
 
Packet
C->A,
 
ACK=1050
expected
 
ACK:
 
SEQ
 
+
 
Len
5
Challenge:
 
delayed
 
ACK
 
Issue
 
1:
 
ACK
 
is
 
not
 
immediate,
 
might
 
be
 
delayed
 
for
 
50ms
Solution:
 
heuristics
Look
 
at ACKs for
 
MTU-sized
 
packets,
 
likely
 
not
 
experiencing
 
delay
 
Issue
 
2:
 
Many
 
packets
 
never
 
receive
 
their
 
ACK
Solution:
 
lazy-expiration of
 
entries
An
 
entry
 
is
 
considered
 
timed
 
out
 
when
 
timestamp
 
is
 
too
 
old
Upon
 
table
 
insertion,
 
check
 
timestamp
 
and
 
erase
 
old
 
entry
6
Multi-stage hash tables
 
Per-stage
 
random
 
hash
 
functions
Multiple
 
chances
 
to
 
sidestep
 
hash
 
collisions
 
h
2
(fid,
 
eACK)
 
h
3
(fid,
 
eACK)
 
h
4
(fid,
 
eACK)
 
h
1
(fid,
 
eACK)
F
low
 
id:
 *
eACK:
 ***
 
Inserted
 
7
Multi-stage hash tables
 
Check
 
every
 
stage,
 
until
 
a
 
match
 
is
 
found
 
 
h
2
(fid,
 
ACK)
 
h
3
(fid,
 
ACK)
 
h
4
(fid,
 
ACK)
 
h
1
(fid,
 
ACK)
 
Occupied
8
fid
 
reversed
ACK:
 ***
Evaluation
 
Traffic:
 
captured
 
from
 
10Gbps
 
campus
 
border
 
links
Metric:
 
%
 
of
 
RTT
 
samples
 
matched
Parameters
 
for
 
multi-stage
 
hash
 
table:
Size
 
per
 
table
 
(#
 
of
 
entries)
Total
 
number
 
of
 
tables
9
Evaluation
Better
10
(32KB)
(0.5MB)
Deployment
 
University
 
campus
 
deployment
Mirrored
 
traffic,
 
non-invasive
External
 
leg:
cloud
 
service
 
latency
 
monitoring
Internal
 
leg:
Wi-Fi
 
client
 
latency
 
diagnostics
11
Internet
Vantage
Point
Mirrored
 
Tofino
Summary
,
 
Q&A
Match
 
TCP
 
SEQ/ACK
 
numbers
 
for
 
RTT
 
samples
Multi-stage
 
hash
 
table
 
with
 
lazy expiration of
 
entries
Tested
 
&
 
deployed
 
on
 
10Gbps
 
campus
 
border
 
links
12
Our
 
P4
 
code
 
is
 
open-source!
github.com/Princeton-Cabernet/p4-projects
Slide Note
Embed
Share

This presentation delves into the importance of measuring TCP round-trip time in the data plane, highlighting key reasons such as security against BGP hijacks and IP spoofing, performance enhancements, and improving user Quality of Experience. It explores monitoring at a vantage point, TCP sequence numbers, table with timestamps, challenges like delayed ACK, and multi-stage hash tables to optimize measurement accuracy.

  • TCP Round-Trip Time
  • Data Plane
  • Security
  • Performance
  • Quality of Experience

Uploaded on Sep 25, 2024 | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Measuring TCP RTT in the data plane Xiaoqi Chen, Hyojoon Kim, Javed M Aman, Willie Chang, Mack Lee, Jennifer Rexford

  2. Why measure round-trip time? Security BGP hijack, inter-ISP path change IP spoofing Performance Persistent link congestion Infer user Quality of Experience (QoE) 2

  3. Monitoring at a vantage point Internet Passive monitoring: split client- server RTT into two legs1 Run a programmable switch at the vantage point? Line-rate traffic, multiple samples per flow Directly in data plane, enabling real-time reroutes External Leg Vantage Point Internal Leg Client 1Cziva et al. Ruru: High-speed, Flow-level Latency Measurement and Visualization of Live Internet Traffic. SIGCOMM 2017 3

  4. TCP sequence numbers Internet External Leg Vantage Point Internal Leg External Leg RTT Internal Leg RTT Internal Leg RTT External Leg RTT Client 4

  5. A table with timestamps expected ACK: SEQ + Len T=105 Flow id, eACK Timestamp Outgoing Packet A->B, SEQ=1001, Len=3 (eACK=1004) (A->B, 1001) T=101 Insert record (A->B, 1004) T=105 Match & erase (A->C, 1050) T=122 RTT = 3 T=125 Incoming Packet C->A, ACK=1050 (D->E, 1020) T=107 5

  6. Challenge: delayed ACK Issue 1: ACK is not immediate, might be delayed for 50ms Solution: heuristics Look at ACKs for MTU-sized packets, likely not experiencing delay Issue 2: Many packets never receive their ACK Solution: lazy-expiration of entries An entry is considered timed out when timestamp is too old Upon table insertion, check timestamp and erase old entry 6

  7. Multi-stage hash tables h2(fid, eACK) h4(fid, eACK) h1(fid, eACK) Flow id: * eACK: *** h3(fid, eACK) Stage 1 Stage 2 Stage 3 Stage 4 T=* Occupied Occupied Expired Expired Occupied Outgoing Packet Insert record Occupied Occupied Occupied Expired Occupied Occupied Occupied Expired Inserted Occupied Per-stage random hash functions Multiple chances to sidestep hash collisions 7

  8. Multi-stage hash tables h2(fid, ACK) h4(fid, ACK) h1(fid, ACK) h3(fid, ACK) fid reversed ACK: *** Stage 1 Stage 2 Stage 3 Stage 4 T=* Occupied Occupied Expired Expired Occupied Incoming Packet Query record Expired Occupied Expired Expired Expired Matched RTT Occupied Occupied Occupied Occupied Check every stage, until a match is found 8

  9. Evaluation Traffic: captured from 10Gbps campus border links Metric: % of RTT samples matched Parameters for multi-stage hash table: Size per table (# of entries) Total number of tables 9

  10. Evaluation 100% Better 75% Match rate 50% 25% 0%212 (32KB) 213 214 215 216 (0.5MB) Size per table (# entries) 10

  11. Deployment Internet University campus deployment External Leg Mirrored traffic, non-invasive External leg: cloud service latency monitoring Internal leg: Wi-Fi client latency diagnostics Mirrored Vantage Point Tofino Internal Leg Campus 11

  12. Summary, Q&A Match TCP SEQ/ACK numbers for RTT samples Multi-stage hash table with lazy expiration of entries Tested & deployed on 10Gbps campus border links Our P4 code is open-source! github.com/Princeton-Cabernet/p4-projects 12

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#