1
1
---
2
2
title : 混排切片(Shuffle Sharding)
3
- id : shuffle- sharding
3
+ id : shuffle sharding
4
4
date : 2020-03-04
5
5
full_link :
6
6
short_description : >
@@ -40,8 +40,8 @@ We are often concerned with insulating different flows of requests
40
40
from each other, so that a high-intensity flow does not crowd out low-intensity flows.
41
41
A simple way to put requests into queues is to hash some
42
42
characteristics of the request, modulo the number of queues, to get
43
- the index of the queue to use. The hash function uses as input
44
- characteristics of the request that align with flows. For example, in
43
+ the index of the queue to use. The hash function uses as input
44
+ characteristics of the request that align with flows. For example, in
45
45
the Internet this is often the 5-tuple of source and destination
46
46
address, protocol, and source and destination port.
47
47
-->
@@ -57,21 +57,21 @@ address, protocol, and source and destination port.
57
57
That simple hash-based scheme has the property that any high-intensity flow
58
58
will crowd out all the low-intensity flows that hash to the same queue.
59
59
Providing good insulation for a large number of flows requires a large
60
- number of queues, which is problematic. Shuffle sharding is a more
60
+ number of queues, which is problematic. Shuffle sharding is a more
61
61
nimble technique that can do a better job of insulating the low-intensity
62
- flows from the high-intensity flows. The terminology of shuffle sharding uses
62
+ flows from the high-intensity flows. The terminology of shuffle sharding uses
63
63
the metaphor of dealing a hand from a deck of cards; each queue is a
64
- metaphorical card. The shuffle sharding technique starts with hashing
64
+ metaphorical card. The shuffle sharding technique starts with hashing
65
65
the flow-identifying characteristics of the request, to produce a hash
66
- value with dozens or more of bits. Then the hash value is used as a
66
+ value with dozens or more of bits. Then the hash value is used as a
67
67
source of entropy to shuffle the deck and deal a hand of cards
68
- (queues). All the dealt queues are examined, and the request is put
69
- into one of the examined queues with the shortest length. With a
68
+ (queues). All the dealt queues are examined, and the request is put
69
+ into one of the examined queues with the shortest length. With a
70
70
modest hand size, it does not cost much to examine all the dealt cards
71
71
and a given low-intensity flow has a good chance to dodge the effects of a
72
- given high-intensity flow. With a large hand size it is expensive to examine
72
+ given high-intensity flow. With a large hand size it is expensive to examine
73
73
the dealt queues and more difficult for the low-intensity flows to dodge the
74
- collective effects of a set of high-intensity flows. Thus, the hand size
74
+ collective effects of a set of high-intensity flows. Thus, the hand size
75
75
should be chosen judiciously.
76
76
-->
77
77
这种简单的基于哈希的模式有一种特性,高密度的请求序列(流)会湮没那些被
0 commit comments