facebook Mystery Machine

Data Flow

consistent sampling

1
local log --> Scribe --> Hive --> UberTrace --> UI

Log Schema

1
2
3
4
request id
host id
host-local timestamp
unique event label(event name, task name)

Timestamp Normalize

  • 不考虑local clock skew
  • 假设client/server间的RTT是对称的
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Client Server
1|------------>|
| |--+1.1
| | | logic
| |<-+1.2
2|<------------|
1.2 - 1.1 = 0.1
2 - 1 = 1.0
RTT = (1.0 - 0.1)/2 = 0.45
clock(1.1) = 1 + 0.45 = 1.45
clock(1.2) = 1.45 + 0.1 = 1.55
RTT是个经验值,根据大量的trace后稳定下来: 使用最小值
Share Comments