FLAIR: Accelerating Reads with Consistency-Aware Network Routing
Hatem Takruri, Ibrahim Kettaneh, Ahmed Alquraan, Samer Al-Kiswany
1
Network Routing Hatem Takruri, Ibrahim Kettaneh , Ahmed Alquraan, - - PowerPoint PPT Presentation
FLAIR: Accelerating Reads with Consistency-Aware Network Routing Hatem Takruri, Ibrahim Kettaneh , Ahmed Alquraan, Samer Al-Kiswany 1 In Introduction Modern cloud applications Are read intensive R:W in Googles F1 advertising system
Hatem Takruri, Ibrahim Kettaneh, Ahmed Alquraan, Samer Al-Kiswany
1
2 [1] J. Shute, R. Vingralek, B. Samwel, et al., F1: a distributed SQL database that scales. Proc. VLDB Endow., 2013. 6(11): p. 1068-1079. [2] N. Bronson, Z. Amsden, G. Cabrera, et al. TAO: Facebook's distributed data store for the social graph. in Proceedings of the USENIX Technical Conference. 2013. San Jose, CA: USENIX
3
4
WriteRequest Replicate Replicate Replicate Replicate
5
6
7
8
9
10
11
Example: key-based routing pipeline Node 1 Node 2 Key range: [0, 1000) Key range: [1000, 2000) Client L2 L3 GET: Key = 200
12
Example: key-based routing pipeline
L2 Table IPV4 Table ACL Table KV Routing Table Packet header and metadata
Pipeline Stage
13
Match header.key [0, 1000) header.key [1000, 2000) Action forward(0) forward(1) Example: key-based routing pipeline
L2 Table IPV4 Table ACL Table KV Routing Table Packet header and metadata
Match + Action Tables
14
L2 Table IPV4 Table ACL Table KV Routing Table Packet header and metadata
Match header.key [0, 1000) header.key [1000, 2000) Action forward(0) forward(1)
addressArray IP 1 IP 2 IP 3 Example: key-based routing pipeline
Custom Actions Switch Memory
15
16
17
FLAIR pipeline
Which nodes can serve Read(Key1)?
Clients Leader Follower1 Follower2 Flair modules Read(Key1) Network controller
18
Objects stability array
19
Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Stable Stable … Stable Replicas All All All … Objects stability array
Read(KeyHash = 5000)
Key = 5000 Value = A Key = 5000 Value = A Key = 5000 Value = A
20
Objects stability array Check
20
Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Stable Stable … Stable Replicas All All All … Read(KeyHash = 5000)
Key = 5000 Value = A Key = 5000 Value = A Key = 5000 Value = A
21
Objects stability array
Key = 5000 Value = A Key = 5000 Value = A Key = 5000 Value = A
Read(KeyHash = 5000) ReadResponse(KeyHash = 5000, Val = A) Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Stable Stable … Stable Replicas All All All …
22
Objects stability array Write(KeyHash = 5000, Val = B)
Key = 5000 Value = A Key = 5000 Value = A Key = 5000 Value = A
Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Stable Stable … Stable Replicas All All All …
23
Objects stability array Update Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Unstable Stable … Stable Replicas All
… Write(KeyHash = 5000, Val = B)
Key = 5000 Value = A Key = 5000 Value = A Key = 5000 Value = A
24
Objects stability array
Key = 5000 Value = A Key = 5000 Value = A Key = 5000 Value = A
Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Unstable Stable … Stable Replicas All
… Write(KeyHash = 5000, Val = B)
25
Objects stability array Read(KeyHash = 5000) Write(KeyHash = 5000, Val = B)
Key = 5000 Value = A Key = 5000 Value = A Key = 5000 Value = A
Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Unstable Stable … Stable Replicas All
…
26
Objects stability array Read(KeyHash = 5000) Check Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Unstable Stable … Stable Replicas All
… Write(KeyHash = 5000, Val = B)
Key = 5000 Value = A Key = 5000 Value = A Key = 5000 Value = A
27
Objects stability array Write(KeyHash = 5000, Val = B)
Key = 5000 Value = A Key = 5000 Value = A Key = 5000 Value = A
ReadResponse(KeyHash = 5000) Read(KeyHash = 5000) Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Unstable Stable … Stable Replicas All
…
28
Objects stability array
Key = 5000 Value = A Key = 5000 Value = A
Write(KeyHash = 5000, Val = B)
Key = 5000 Value = A
Write(KeyHash = 5000, Val = B) Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Unstable Stable … Stable Replicas All
… Write(KeyHash = 5000, Val = B)
29
Objects stability array
Key = 5000 Value = B Key = 5000 Value = B Key = 5000 Value = A
Ack. Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Unstable Stable … Stable Replicas All
…
30
Objects stability array
Key = 5000 Value = B Key = 5000 Value = B Key = 5000 Value = A
WriteResponse(Key1,[L,F1]) Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Unstable Stable … Stable Replicas All
…
31
Objects stability array WriteResponse(Key1,[L,F1]) Update
Key = 5000 Value = B Key = 5000 Value = B Key = 5000 Value = A
Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Stable Stable … Stable Replicas All L, F1 All …
32
Objects stability array
Key = 5000 Value = B Key = 5000 Value = B Key = 5000 Value = A
WriteResponse(Key1,[L,F1]) Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Stable Stable … Stable Replicas All L, F1 All …
33
Objects stability array
Key = 5000 Value = B Key = 5000 Value = B Key = 5000 Value = A
Key range [0,4096) [4096, 8192) [8192, 12288) … Status Stable Stable Stable … Stable Replicas All L, F1 All … Read(KeyHash = 5000) Read(KeyHash = 5000) Read(KeyHash = 5000) Check
34
35
36
Time
w2(x) w1(x)
w1request w2request w1response w2response
37
Time
w2(x, w2_seq#) w1(x, w1_seq#)
w1request w2request w1response w2response
38
Time
w2(x, w2_seq#) w1(x, w1_seq#)
w1request w2request w1response w2response
Hash range [0,4096) … Status Unstable … Stable Replicas
Seq#
w2_seq#
…
39
40
Alternatives
Metrics
41
42
Throughput (1000 ops/sec)
43
Throughput (1000 ops/sec)
Raft Fast Paxos VR
44
Throughput (1000 ops/sec)
Raft Fast Paxos Unrep. VR
45
Throughput (1000 ops/sec)
Fleases
Raft Fast Paxos Unrep. VR
46
Throughput (1000 ops/sec)
FlairKV Fleases
Raft Fast Paxos Unrep. VR
47
48
49
50
51
52