Ketama Consisent Hash
问题描述
有一些目标节点 v1, v2...vn
需要一个算法,能够将任意key映射到目标节点中的一个vx
评价方式
1. 对于一个比较大的key集合,分布在各个目标节点的key的数量要尽可能均匀
2. 如果目标节点集合有增减,key和vx的映射关系变化最小
普通的一致性哈希有明显的问题,不做赘述。
Ketama的java实现如下:
package com.alibaba.ketama; import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.SortedMap;
import java.util.TreeMap; public class KetamaConsistentHash { private List<String> dstNodes = null;
private SortedMap<Integer, String> rMap = null;
private List<Integer> rList = null; private final int VirtualFactor = 128; public void init() {
this.rMap = new TreeMap<Integer, String>(); for(String s: this.dstNodes) {
for(int i = 0; i < VirtualFactor; i++) {
int md5 = hash(s + i);
this.rMap.put(md5, s);
}
}
this.rMap.put(0, this.dstNodes.get(0)); this.rList = new ArrayList<Integer>(this.rMap.size());
this.rList.addAll(this.rMap.keySet());
this.rList.sort(null);
} private int hash(String key) {
MessageDigest md = null;
try {
md = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
if(null == md) {
return 0;
}
md.update(key.getBytes());
byte[] md5hash = md.digest();
assert(md5hash.length == 4);
return (((int)md5hash[0]) << 24)
| (((int)md5hash[1]) << 16)
| (((int)md5hash[2]) << 8)
| (((int)md5hash[0]));
} public KetamaConsistentHash() {
dstNodes = new LinkedList<String>();
} public List<String> getDstNodes() {
return this.dstNodes;
} public void removeDstNode(String node) {
if(dstNodes.contains(node)) {
dstNodes.remove(node);
this.init();
}
} public void addNewDstNode(String node) {
if(!dstNodes.contains(node)) {
dstNodes.add(node);
this.init();
}
} public String getNode(String key) {
if(null == this.dstNodes) {
return null;
}
int md5 = hash(key);
int i;
for(i = 0; i < this.rList.size(); i++) {
if(md5 < this.rList.get(i)) {
break;
}
}
return this.rMap.get(this.rList.get(i - 1));
} public void print() {
System.out.println("size of dstNodes: " + dstNodes.size());
System.out.println("dstNodes:" + dstNodes.toString());
System.out.println("rMap:" + rMap.toString());
System.out.println("rList:" + rList.toString());
} public static void main(String[] args) {
KetamaConsistentHash kch = new KetamaConsistentHash();
kch.addNewDstNode("127.0.0.1:11211");
kch.addNewDstNode("127.0.0.2:11211");
kch.addNewDstNode("127.0.0.3:11211");
kch.addNewDstNode("127.0.0.4:11211");
kch.init();
kch.print(); System.out.println(kch.getNode("key1"));
System.out.println(kch.getNode("key2"));
System.out.println(kch.getNode("key3"));
System.out.println(kch.getNode("key4"));
System.out.println(kch.getNode("key5"));
System.out.println(kch.getNode("key6"));
System.out.println(kch.getNode("key7"));
System.out.println(kch.getNode("key8"));
System.out.println(kch.getNode("key9"));
System.out.println(kch.getNode("key10"));
System.out.println(kch.getNode("key11"));
System.out.println(kch.getNode("key12")); kch.removeDstNode("127.0.0.1:11211");
kch.init();
kch.print(); System.out.println(kch.getNode("key1"));
System.out.println(kch.getNode("key2"));
System.out.println(kch.getNode("key3"));
System.out.println(kch.getNode("key4"));
System.out.println(kch.getNode("key5"));
System.out.println(kch.getNode("key6"));
System.out.println(kch.getNode("key7"));
System.out.println(kch.getNode("key8"));
System.out.println(kch.getNode("key9"));
System.out.println(kch.getNode("key10"));
System.out.println(kch.getNode("key11"));
System.out.println(kch.getNode("key12")); kch.addNewDstNode("127.0.0.1:11211");
kch.init();
kch.print();
System.out.println(kch.getNode("key1"));
System.out.println(kch.getNode("key2"));
System.out.println(kch.getNode("key3"));
System.out.println(kch.getNode("key4"));
System.out.println(kch.getNode("key5"));
System.out.println(kch.getNode("key6"));
System.out.println(kch.getNode("key7"));
System.out.println(kch.getNode("key8"));
System.out.println(kch.getNode("key9"));
System.out.println(kch.getNode("key10"));
System.out.println(kch.getNode("key11"));
System.out.println(kch.getNode("key12"));
}
} 运行结果
size of dstNodes: 4
dstNodes:[127.0.0.1:11211, 127.0.0.2:11211, 127.0.0.3:11211, 127.0.0.4:11211]
rMap:{-8303758=127.0.0.2:11211, -8238828=127.0.0.4:11211, -7923916=127.0.0.2:11211, -7640999=127.0.0.1:11211, -7521006=127.0.0.4:11211, -7513765=127.0.0.1:11211, -7513539=127.0.0.4:11211, -7439323=127.0.0.3:11211, -6930900=127.0.0.1:11211, -6928840=127.0.0.4:11211, -6865642=127.0.0.4:11211, -6800881=127.0.0.1:11211, -6474452=127.0.0.4:11211, -6474378=127.0.0.3:11211, -6396384=127.0.0.2:11211, -6353117=127.0.0.3:11211, -6331267=127.0.0.4:11211, -6284704=127.0.0.3:11211, -6142912=127.0.0.3:11211, -6139552=127.0.0.3:11211, -6074297=127.0.0.2:11211, -6001111=127.0.0.3:11211, -5543596=127.0.0.2:11211, -5489869=127.0.0.3:11211, -5043351=127.0.0.1:11211, -4832717=127.0.0.1:11211, -4821406=127.0.0.2:11211, -4775392=127.0.0.4:11211, -4773547=127.0.0.3:11211, -4757890=127.0.0.3:11211, -4707986=127.0.0.4:11211, -4642804=127.0.0.3:11211, -4494809=127.0.0.1:11211, -4227319=127.0.0.1:11211, -4062854=127.0.0.2:11211, -3984819=127.0.0.1:11211, -3913919=127.0.0.3:11211, -3725796=127.0.0.2:11211, -3453839=127.0.0.4:11211, -3317716=127.0.0.4:11211, -3210979=127.0.0.2:11211, -3181717=127.0.0.3:11211, -2871545=127.0.0.4:11211, -2748069=127.0.0.4:11211, -2530274=127.0.0.3:11211, -2470122=127.0.0.2:11211, -2261495=127.0.0.2:11211, -2012117=127.0.0.3:11211, -1966040=127.0.0.4:11211, -1763986=127.0.0.4:11211, -1747382=127.0.0.2:11211, -1675219=127.0.0.1:11211, -1420531=127.0.0.4:11211, -1176201=127.0.0.1:11211, -1167814=127.0.0.1:11211, -1015998=127.0.0.4:11211, -821978=127.0.0.4:11211, -760210=127.0.0.2:11211, -638884=127.0.0.2:11211, -379105=127.0.0.4:11211, -255916=127.0.0.2:11211, -129259=127.0.0.4:11211, -32768=127.0.0.4:11211, -32711=127.0.0.2:11211, -32487=127.0.0.4:11211, -32227=127.0.0.1:11211, -32155=127.0.0.2:11211, -31716=127.0.0.2:11211, -31709=127.0.0.4:11211, -31659=127.0.0.2:11211, -31187=127.0.0.4:11211, -31182=127.0.0.1:11211, -30931=127.0.0.3:11211, -30425=127.0.0.3:11211, -30397=127.0.0.4:11211, -30385=127.0.0.2:11211, -30348=127.0.0.3:11211, -29896=127.0.0.3:11211, -29672=127.0.0.3:11211, -29654=127.0.0.3:11211, -29415=127.0.0.1:11211, -28805=127.0.0.1:11211, -28620=127.0.0.2:11211, -28361=127.0.0.1:11211, -28091=127.0.0.3:11211, -27791=127.0.0.4:11211, -27629=127.0.0.2:11211, -27606=127.0.0.1:11211, -27363=127.0.0.4:11211, -27277=127.0.0.2:11211, -27068=127.0.0.4:11211, -27061=127.0.0.2:11211, -26848=127.0.0.3:11211, -26843=127.0.0.1:11211, -26767=127.0.0.4:11211, -25822=127.0.0.4:11211, -25740=127.0.0.3:11211, -25550=127.0.0.2:11211, -25533=127.0.0.2:11211, -25279=127.0.0.2:11211, -25229=127.0.0.2:11211, -24997=127.0.0.3:11211, -24730=127.0.0.1:11211, -24514=127.0.0.3:11211, -24461=127.0.0.1:11211, -24028=127.0.0.4:11211, -23807=127.0.0.2:11211, -23488=127.0.0.1:11211, -23429=127.0.0.2:11211, -23281=127.0.0.3:11211, -23016=127.0.0.2:11211, -22688=127.0.0.4:11211, -22454=127.0.0.1:11211, -22149=127.0.0.1:11211, -21991=127.0.0.1:11211, -21986=127.0.0.4:11211, -21753=127.0.0.3:11211, -21244=127.0.0.2:11211, -21181=127.0.0.2:11211, -21178=127.0.0.4:11211, -20944=127.0.0.2:11211, -20881=127.0.0.4:11211, -20643=127.0.0.2:11211, -20474=127.0.0.2:11211, -20446=127.0.0.4:11211, -20198=127.0.0.1:11211, -19632=127.0.0.4:11211, -18939=127.0.0.1:11211, -18905=127.0.0.4:11211, -18410=127.0.0.4:11211, -17837=127.0.0.1:11211, -17601=127.0.0.2:11211, -17304=127.0.0.3:11211, -17284=127.0.0.2:11211, -16832=127.0.0.3:11211, -16604=127.0.0.1:11211, -16554=127.0.0.2:11211, -16347=127.0.0.4:11211, -16260=127.0.0.1:11211, -16011=127.0.0.3:11211, -15490=127.0.0.3:11211, -15048=127.0.0.4:11211, -15029=127.0.0.3:11211, -14817=127.0.0.2:11211, -14801=127.0.0.2:11211, -14332=127.0.0.4:11211, -14326=127.0.0.3:11211, -13815=127.0.0.3:11211, -13794=127.0.0.3:11211, -13746=127.0.0.1:11211, -13563=127.0.0.1:11211, -13551=127.0.0.2:11211, -13523=127.0.0.3:11211, -13458=127.0.0.3:11211, -12173=127.0.0.3:11211, -12027=127.0.0.4:11211, -12010=127.0.0.4:11211, -11916=127.0.0.3:11211, -11771=127.0.0.4:11211, -11492=127.0.0.2:11211, -11472=127.0.0.3:11211, -11428=127.0.0.1:11211, -11242=127.0.0.2:11211, -10702=127.0.0.2:11211, -10674=127.0.0.4:11211, -10232=127.0.0.1:11211, -10194=127.0.0.4:11211, -10147=127.0.0.2:11211, -9397=127.0.0.1:11211, -9184=127.0.0.1:11211, -9134=127.0.0.1:11211, -8951=127.0.0.2:11211, -8899=127.0.0.2:11211, -8656=127.0.0.1:11211, -8654=127.0.0.4:11211, -8614=127.0.0.4:11211, -8416=127.0.0.3:11211, -8362=127.0.0.3:11211, -7927=127.0.0.3:11211, -7616=127.0.0.2:11211, -7557=127.0.0.2:11211, -6911=127.0.0.3:11211, -6590=127.0.0.3:11211, -6051=127.0.0.1:11211, -5525=127.0.0.1:11211, -5269=127.0.0.3:11211, -4851=127.0.0.4:11211, -4737=127.0.0.4:11211, -4510=127.0.0.2:11211, -4266=127.0.0.2:11211, -4088=127.0.0.1:11211, -4066=127.0.0.3:11211, -4013=127.0.0.1:11211, -3536=127.0.0.2:11211, -3043=127.0.0.4:11211, -2559=127.0.0.3:11211, -2010=127.0.0.1:11211, -1713=127.0.0.3:11211, -1460=127.0.0.4:11211, -1259=127.0.0.3:11211, -1178=127.0.0.1:11211, -983=127.0.0.4:11211, -981=127.0.0.4:11211, -918=127.0.0.4:11211, -663=127.0.0.2:11211, -652=127.0.0.4:11211, -441=127.0.0.1:11211, -142=127.0.0.3:11211, -128=127.0.0.4:11211, -127=127.0.0.3:11211, -126=127.0.0.3:11211, -125=127.0.0.4:11211, -124=127.0.0.3:11211, -123=127.0.0.3:11211, -122=127.0.0.1:11211, -121=127.0.0.3:11211, -120=127.0.0.3:11211, -117=127.0.0.3:11211, -116=127.0.0.4:11211, -115=127.0.0.2:11211, -114=127.0.0.3:11211, -113=127.0.0.4:11211, -112=127.0.0.2:11211, -111=127.0.0.2:11211, -110=127.0.0.4:11211, -109=127.0.0.4:11211, -108=127.0.0.4:11211, -107=127.0.0.1:11211, -106=127.0.0.3:11211, -105=127.0.0.3:11211, -104=127.0.0.3:11211, -103=127.0.0.3:11211, -102=127.0.0.2:11211, -101=127.0.0.4:11211, -100=127.0.0.4:11211, -99=127.0.0.4:11211, -98=127.0.0.4:11211, -97=127.0.0.1:11211, -96=127.0.0.4:11211, -95=127.0.0.3:11211, -94=127.0.0.4:11211, -93=127.0.0.4:11211, -92=127.0.0.4:11211, -91=127.0.0.4:11211, -89=127.0.0.4:11211, -88=127.0.0.3:11211, -87=127.0.0.4:11211, -86=127.0.0.4:11211, -85=127.0.0.4:11211, -83=127.0.0.4:11211, -82=127.0.0.4:11211, -80=127.0.0.4:11211, -79=127.0.0.3:11211, -76=127.0.0.4:11211, -75=127.0.0.1:11211, -74=127.0.0.3:11211, -73=127.0.0.2:11211, -71=127.0.0.3:11211, -70=127.0.0.3:11211, -69=127.0.0.2:11211, -68=127.0.0.4:11211, -67=127.0.0.4:11211, -66=127.0.0.4:11211, -65=127.0.0.4:11211, -64=127.0.0.4:11211, -63=127.0.0.2:11211, -62=127.0.0.3:11211, -61=127.0.0.1:11211, -60=127.0.0.1:11211, -59=127.0.0.4:11211, -57=127.0.0.4:11211, -55=127.0.0.4:11211, -52=127.0.0.3:11211, -50=127.0.0.4:11211, -49=127.0.0.4:11211, -48=127.0.0.1:11211, -46=127.0.0.2:11211, -45=127.0.0.4:11211, -44=127.0.0.4:11211, -42=127.0.0.4:11211, -41=127.0.0.1:11211, -38=127.0.0.3:11211, -37=127.0.0.3:11211, -34=127.0.0.4:11211, -33=127.0.0.1:11211, -32=127.0.0.4:11211, -31=127.0.0.4:11211, -30=127.0.0.4:11211, -29=127.0.0.4:11211, -27=127.0.0.2:11211, -26=127.0.0.2:11211, -25=127.0.0.4:11211, -24=127.0.0.4:11211, -23=127.0.0.3:11211, -22=127.0.0.4:11211, -21=127.0.0.3:11211, -19=127.0.0.3:11211, -18=127.0.0.3:11211, -17=127.0.0.4:11211, -15=127.0.0.3:11211, -14=127.0.0.4:11211, -13=127.0.0.3:11211, -12=127.0.0.1:11211, -11=127.0.0.4:11211, -10=127.0.0.2:11211, -9=127.0.0.4:11211, -7=127.0.0.3:11211, -6=127.0.0.3:11211, -5=127.0.0.4:11211, -4=127.0.0.3:11211, -3=127.0.0.4:11211, -2=127.0.0.3:11211, -1=127.0.0.4:11211, 0=127.0.0.1:11211, 3166720=127.0.0.2:11211, 5725440=127.0.0.2:11211, 69939460=127.0.0.2:11211, 75391236=127.0.0.1:11211, 122299399=127.0.0.2:11211, 142151432=127.0.0.4:11211, 151264265=127.0.0.4:11211, 157958921=127.0.0.2:11211, 240848142=127.0.0.2:11211, 241119246=127.0.0.2:11211, 290593297=127.0.0.2:11211, 325071379=127.0.0.4:11211, 337903892=127.0.0.3:11211, 455881755=127.0.0.1:11211, 540084256=127.0.0.3:11211, 560072737=127.0.0.4:11211, 623787557=127.0.0.3:11211, 659427623=127.0.0.2:11211, 706698794=127.0.0.4:11211, 724514603=127.0.0.2:11211, 774722094=127.0.0.2:11211, 788610095=127.0.0.1:11211, 840464946=127.0.0.4:11211, 894778165=127.0.0.1:11211, 913855286=127.0.0.2:11211, 964384825=127.0.0.3:11211, 1062820927=127.0.0.1:11211, 1075674688=127.0.0.1:11211, 1076056384=127.0.0.2:11211, 1111319874=127.0.0.1:11211, 1162698821=127.0.0.1:11211, 1260091467=127.0.0.2:11211, 1264278859=127.0.0.2:11211, 1265501771=127.0.0.1:11211, 1313932878=127.0.0.3:11211, 1383203410=127.0.0.3:11211, 1400111955=127.0.0.2:11211, 1444098390=127.0.0.3:11211, 1480327256=127.0.0.2:11211, 1482497880=127.0.0.1:11211, 1496911449=127.0.0.3:11211, 1544519516=127.0.0.1:11211, 1579028574=127.0.0.3:11211, 1634095713=127.0.0.4:11211, 1763668585=127.0.0.1:11211, 1830028141=127.0.0.2:11211, 1845771118=127.0.0.2:11211, 1882290544=127.0.0.4:11211, 1885471088=127.0.0.2:11211, 1931487859=127.0.0.2:11211, 2000446327=127.0.0.1:11211, 2132835455=127.0.0.2:11211, 2134857599=127.0.0.4:11211, 2137145471=127.0.0.1:11211}
rList:[-8303758, -8238828, -7923916, -7640999, -7521006, -7513765, -7513539, -7439323, -6930900, -6928840, -6865642, -6800881, -6474452, -6474378, -6396384, -6353117, -6331267, -6284704, -6142912, -6139552, -6074297, -6001111, -5543596, -5489869, -5043351, -4832717, -4821406, -4775392, -4773547, -4757890, -4707986, -4642804, -4494809, -4227319, -4062854, -3984819, -3913919, -3725796, -3453839, -3317716, -3210979, -3181717, -2871545, -2748069, -2530274, -2470122, -2261495, -2012117, -1966040, -1763986, -1747382, -1675219, -1420531, -1176201, -1167814, -1015998, -821978, -760210, -638884, -379105, -255916, -129259, -32768, -32711, -32487, -32227, -32155, -31716, -31709, -31659, -31187, -31182, -30931, -30425, -30397, -30385, -30348, -29896, -29672, -29654, -29415, -28805, -28620, -28361, -28091, -27791, -27629, -27606, -27363, -27277, -27068, -27061, -26848, -26843, -26767, -25822, -25740, -25550, -25533, -25279, -25229, -24997, -24730, -24514, -24461, -24028, -23807, -23488, -23429, -23281, -23016, -22688, -22454, -22149, -21991, -21986, -21753, -21244, -21181, -21178, -20944, -20881, -20643, -20474, -20446, -20198, -19632, -18939, -18905, -18410, -17837, -17601, -17304, -17284, -16832, -16604, -16554, -16347, -16260, -16011, -15490, -15048, -15029, -14817, -14801, -14332, -14326, -13815, -13794, -13746, -13563, -13551, -13523, -13458, -12173, -12027, -12010, -11916, -11771, -11492, -11472, -11428, -11242, -10702, -10674, -10232, -10194, -10147, -9397, -9184, -9134, -8951, -8899, -8656, -8654, -8614, -8416, -8362, -7927, -7616, -7557, -6911, -6590, -6051, -5525, -5269, -4851, -4737, -4510, -4266, -4088, -4066, -4013, -3536, -3043, -2559, -2010, -1713, -1460, -1259, -1178, -983, -981, -918, -663, -652, -441, -142, -128, -127, -126, -125, -124, -123, -122, -121, -120, -117, -116, -115, -114, -113, -112, -111, -110, -109, -108, -107, -106, -105, -104, -103, -102, -101, -100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -89, -88, -87, -86, -85, -83, -82, -80, -79, -76, -75, -74, -73, -71, -70, -69, -68, -67, -66, -65, -64, -63, -62, -61, -60, -59, -57, -55, -52, -50, -49, -48, -46, -45, -44, -42, -41, -38, -37, -34, -33, -32, -31, -30, -29, -27, -26, -25, -24, -23, -22, -21, -19, -18, -17, -15, -14, -13, -12, -11, -10, -9, -7, -6, -5, -4, -3, -2, -1, 0, 3166720, 5725440, 69939460, 75391236, 122299399, 142151432, 151264265, 157958921, 240848142, 241119246, 290593297, 325071379, 337903892, 455881755, 540084256, 560072737, 623787557, 659427623, 706698794, 724514603, 774722094, 788610095, 840464946, 894778165, 913855286, 964384825, 1062820927, 1075674688, 1076056384, 1111319874, 1162698821, 1260091467, 1264278859, 1265501771, 1313932878, 1383203410, 1400111955, 1444098390, 1480327256, 1482497880, 1496911449, 1544519516, 1579028574, 1634095713, 1763668585, 1830028141, 1845771118, 1882290544, 1885471088, 1931487859, 2000446327, 2132835455, 2134857599, 2137145471]
127.0.0.3:11211
127.0.0.2:11211
127.0.0.1:11211
127.0.0.4:11211
127.0.0.4:11211
127.0.0.3:11211
127.0.0.3:11211
127.0.0.1:11211
127.0.0.3:11211
127.0.0.3:11211
127.0.0.4:11211
127.0.0.1:11211
size of dstNodes: 3
dstNodes:[127.0.0.2:11211, 127.0.0.3:11211, 127.0.0.4:11211]
rMap:{-8303758=127.0.0.2:11211, -8238828=127.0.0.4:11211, -7923916=127.0.0.2:11211, -7521006=127.0.0.4:11211, -7513539=127.0.0.4:11211, -7439323=127.0.0.3:11211, -6928840=127.0.0.4:11211, -6865642=127.0.0.4:11211, -6474452=127.0.0.4:11211, -6474378=127.0.0.3:11211, -6396384=127.0.0.2:11211, -6353117=127.0.0.3:11211, -6331267=127.0.0.4:11211, -6284704=127.0.0.3:11211, -6142912=127.0.0.3:11211, -6139552=127.0.0.3:11211, -6074297=127.0.0.2:11211, -6001111=127.0.0.3:11211, -5543596=127.0.0.2:11211, -5489869=127.0.0.3:11211, -4821406=127.0.0.2:11211, -4775392=127.0.0.4:11211, -4773547=127.0.0.3:11211, -4757890=127.0.0.3:11211, -4707986=127.0.0.4:11211, -4642804=127.0.0.3:11211, -4062854=127.0.0.2:11211, -3913919=127.0.0.3:11211, -3725796=127.0.0.2:11211, -3453839=127.0.0.4:11211, -3317716=127.0.0.4:11211, -3210979=127.0.0.2:11211, -3181717=127.0.0.3:11211, -2871545=127.0.0.4:11211, -2748069=127.0.0.4:11211, -2530274=127.0.0.3:11211, -2470122=127.0.0.2:11211, -2261495=127.0.0.2:11211, -2012117=127.0.0.3:11211, -1966040=127.0.0.4:11211, -1763986=127.0.0.4:11211, -1747382=127.0.0.2:11211, -1420531=127.0.0.4:11211, -1015998=127.0.0.4:11211, -821978=127.0.0.4:11211, -760210=127.0.0.2:11211, -638884=127.0.0.2:11211, -379105=127.0.0.4:11211, -255916=127.0.0.2:11211, -129259=127.0.0.4:11211, -32768=127.0.0.4:11211, -32711=127.0.0.2:11211, -32487=127.0.0.4:11211, -32155=127.0.0.2:11211, -31716=127.0.0.2:11211, -31709=127.0.0.4:11211, -31659=127.0.0.2:11211, -31187=127.0.0.4:11211, -30931=127.0.0.3:11211, -30425=127.0.0.3:11211, -30397=127.0.0.4:11211, -30385=127.0.0.2:11211, -30348=127.0.0.3:11211, -29896=127.0.0.3:11211, -29672=127.0.0.3:11211, -29654=127.0.0.3:11211, -28620=127.0.0.2:11211, -28091=127.0.0.3:11211, -27791=127.0.0.4:11211, -27629=127.0.0.2:11211, -27363=127.0.0.4:11211, -27277=127.0.0.2:11211, -27068=127.0.0.4:11211, -27061=127.0.0.2:11211, -26848=127.0.0.3:11211, -26767=127.0.0.4:11211, -25822=127.0.0.4:11211, -25740=127.0.0.3:11211, -25550=127.0.0.2:11211, -25533=127.0.0.2:11211, -25279=127.0.0.2:11211, -25229=127.0.0.2:11211, -24997=127.0.0.3:11211, -24514=127.0.0.3:11211, -24028=127.0.0.4:11211, -23807=127.0.0.2:11211, -23429=127.0.0.2:11211, -23281=127.0.0.3:11211, -23016=127.0.0.2:11211, -22688=127.0.0.4:11211, -21986=127.0.0.4:11211, -21753=127.0.0.3:11211, -21244=127.0.0.2:11211, -21181=127.0.0.2:11211, -21178=127.0.0.4:11211, -20944=127.0.0.2:11211, -20881=127.0.0.4:11211, -20643=127.0.0.2:11211, -20474=127.0.0.2:11211, -20446=127.0.0.4:11211, -19632=127.0.0.4:11211, -18905=127.0.0.4:11211, -18410=127.0.0.4:11211, -17601=127.0.0.2:11211, -17304=127.0.0.3:11211, -17284=127.0.0.2:11211, -16832=127.0.0.3:11211, -16554=127.0.0.2:11211, -16347=127.0.0.4:11211, -16011=127.0.0.3:11211, -15490=127.0.0.3:11211, -15048=127.0.0.4:11211, -15029=127.0.0.3:11211, -14817=127.0.0.2:11211, -14801=127.0.0.2:11211, -14332=127.0.0.4:11211, -14326=127.0.0.3:11211, -13815=127.0.0.3:11211, -13794=127.0.0.3:11211, -13551=127.0.0.2:11211, -13523=127.0.0.3:11211, -13458=127.0.0.3:11211, -12173=127.0.0.3:11211, -12027=127.0.0.4:11211, -12010=127.0.0.4:11211, -11916=127.0.0.3:11211, -11771=127.0.0.4:11211, -11492=127.0.0.2:11211, -11472=127.0.0.3:11211, -11242=127.0.0.2:11211, -10702=127.0.0.2:11211, -10674=127.0.0.4:11211, -10194=127.0.0.4:11211, -10147=127.0.0.2:11211, -8951=127.0.0.2:11211, -8899=127.0.0.2:11211, -8654=127.0.0.4:11211, -8614=127.0.0.4:11211, -8416=127.0.0.3:11211, -8362=127.0.0.3:11211, -7927=127.0.0.3:11211, -7616=127.0.0.2:11211, -7557=127.0.0.2:11211, -6911=127.0.0.3:11211, -6590=127.0.0.3:11211, -5269=127.0.0.3:11211, -4851=127.0.0.4:11211, -4737=127.0.0.4:11211, -4510=127.0.0.2:11211, -4266=127.0.0.2:11211, -4066=127.0.0.3:11211, -3536=127.0.0.2:11211, -3043=127.0.0.4:11211, -2559=127.0.0.3:11211, -1713=127.0.0.3:11211, -1460=127.0.0.4:11211, -1259=127.0.0.3:11211, -983=127.0.0.4:11211, -981=127.0.0.4:11211, -918=127.0.0.4:11211, -663=127.0.0.2:11211, -652=127.0.0.4:11211, -142=127.0.0.3:11211, -128=127.0.0.4:11211, -127=127.0.0.3:11211, -126=127.0.0.3:11211, -125=127.0.0.4:11211, -124=127.0.0.3:11211, -123=127.0.0.3:11211, -121=127.0.0.3:11211, -120=127.0.0.3:11211, -117=127.0.0.3:11211, -116=127.0.0.4:11211, -115=127.0.0.2:11211, -114=127.0.0.3:11211, -113=127.0.0.4:11211, -112=127.0.0.2:11211, -111=127.0.0.2:11211, -110=127.0.0.4:11211, -109=127.0.0.4:11211, -108=127.0.0.4:11211, -106=127.0.0.3:11211, -105=127.0.0.3:11211, -104=127.0.0.3:11211, -103=127.0.0.3:11211, -102=127.0.0.2:11211, -101=127.0.0.4:11211, -100=127.0.0.4:11211, -99=127.0.0.4:11211, -98=127.0.0.4:11211, -96=127.0.0.4:11211, -95=127.0.0.3:11211, -94=127.0.0.4:11211, -93=127.0.0.4:11211, -92=127.0.0.4:11211, -91=127.0.0.4:11211, -89=127.0.0.4:11211, -88=127.0.0.3:11211, -87=127.0.0.4:11211, -86=127.0.0.4:11211, -85=127.0.0.4:11211, -83=127.0.0.4:11211, -82=127.0.0.4:11211, -80=127.0.0.4:11211, -79=127.0.0.3:11211, -76=127.0.0.4:11211, -74=127.0.0.3:11211, -73=127.0.0.2:11211, -71=127.0.0.3:11211, -70=127.0.0.3:11211, -69=127.0.0.2:11211, -68=127.0.0.4:11211, -67=127.0.0.4:11211, -66=127.0.0.4:11211, -65=127.0.0.4:11211, -64=127.0.0.4:11211, -63=127.0.0.2:11211, -62=127.0.0.3:11211, -59=127.0.0.4:11211, -57=127.0.0.4:11211, -55=127.0.0.4:11211, -52=127.0.0.3:11211, -50=127.0.0.4:11211, -49=127.0.0.4:11211, -46=127.0.0.2:11211, -45=127.0.0.4:11211, -44=127.0.0.4:11211, -42=127.0.0.4:11211, -38=127.0.0.3:11211, -37=127.0.0.3:11211, -34=127.0.0.4:11211, -32=127.0.0.4:11211, -31=127.0.0.4:11211, -30=127.0.0.4:11211, -29=127.0.0.4:11211, -27=127.0.0.2:11211, -26=127.0.0.2:11211, -25=127.0.0.4:11211, -24=127.0.0.4:11211, -23=127.0.0.3:11211, -22=127.0.0.4:11211, -21=127.0.0.3:11211, -19=127.0.0.3:11211, -18=127.0.0.3:11211, -17=127.0.0.4:11211, -15=127.0.0.3:11211, -14=127.0.0.4:11211, -13=127.0.0.3:11211, -11=127.0.0.4:11211, -10=127.0.0.2:11211, -9=127.0.0.4:11211, -7=127.0.0.3:11211, -6=127.0.0.3:11211, -5=127.0.0.4:11211, -4=127.0.0.3:11211, -3=127.0.0.4:11211, -2=127.0.0.3:11211, -1=127.0.0.4:11211, 0=127.0.0.2:11211, 3166720=127.0.0.2:11211, 5725440=127.0.0.2:11211, 69939460=127.0.0.2:11211, 122299399=127.0.0.2:11211, 142151432=127.0.0.4:11211, 151264265=127.0.0.4:11211, 157958921=127.0.0.2:11211, 240848142=127.0.0.2:11211, 241119246=127.0.0.2:11211, 290593297=127.0.0.2:11211, 325071379=127.0.0.4:11211, 337903892=127.0.0.3:11211, 540084256=127.0.0.3:11211, 560072737=127.0.0.4:11211, 623787557=127.0.0.3:11211, 659427623=127.0.0.2:11211, 706698794=127.0.0.4:11211, 724514603=127.0.0.2:11211, 774722094=127.0.0.2:11211, 840464946=127.0.0.4:11211, 913855286=127.0.0.2:11211, 964384825=127.0.0.3:11211, 1076056384=127.0.0.2:11211, 1260091467=127.0.0.2:11211, 1264278859=127.0.0.2:11211, 1313932878=127.0.0.3:11211, 1383203410=127.0.0.3:11211, 1400111955=127.0.0.2:11211, 1444098390=127.0.0.3:11211, 1480327256=127.0.0.2:11211, 1496911449=127.0.0.3:11211, 1579028574=127.0.0.3:11211, 1634095713=127.0.0.4:11211, 1830028141=127.0.0.2:11211, 1845771118=127.0.0.2:11211, 1882290544=127.0.0.4:11211, 1885471088=127.0.0.2:11211, 1931487859=127.0.0.2:11211, 2132835455=127.0.0.2:11211, 2134857599=127.0.0.4:11211}
rList:[-8303758, -8238828, -7923916, -7521006, -7513539, -7439323, -6928840, -6865642, -6474452, -6474378, -6396384, -6353117, -6331267, -6284704, -6142912, -6139552, -6074297, -6001111, -5543596, -5489869, -4821406, -4775392, -4773547, -4757890, -4707986, -4642804, -4062854, -3913919, -3725796, -3453839, -3317716, -3210979, -3181717, -2871545, -2748069, -2530274, -2470122, -2261495, -2012117, -1966040, -1763986, -1747382, -1420531, -1015998, -821978, -760210, -638884, -379105, -255916, -129259, -32768, -32711, -32487, -32155, -31716, -31709, -31659, -31187, -30931, -30425, -30397, -30385, -30348, -29896, -29672, -29654, -28620, -28091, -27791, -27629, -27363, -27277, -27068, -27061, -26848, -26767, -25822, -25740, -25550, -25533, -25279, -25229, -24997, -24514, -24028, -23807, -23429, -23281, -23016, -22688, -21986, -21753, -21244, -21181, -21178, -20944, -20881, -20643, -20474, -20446, -19632, -18905, -18410, -17601, -17304, -17284, -16832, -16554, -16347, -16011, -15490, -15048, -15029, -14817, -14801, -14332, -14326, -13815, -13794, -13551, -13523, -13458, -12173, -12027, -12010, -11916, -11771, -11492, -11472, -11242, -10702, -10674, -10194, -10147, -8951, -8899, -8654, -8614, -8416, -8362, -7927, -7616, -7557, -6911, -6590, -5269, -4851, -4737, -4510, -4266, -4066, -3536, -3043, -2559, -1713, -1460, -1259, -983, -981, -918, -663, -652, -142, -128, -127, -126, -125, -124, -123, -121, -120, -117, -116, -115, -114, -113, -112, -111, -110, -109, -108, -106, -105, -104, -103, -102, -101, -100, -99, -98, -96, -95, -94, -93, -92, -91, -89, -88, -87, -86, -85, -83, -82, -80, -79, -76, -74, -73, -71, -70, -69, -68, -67, -66, -65, -64, -63, -62, -59, -57, -55, -52, -50, -49, -46, -45, -44, -42, -38, -37, -34, -32, -31, -30, -29, -27, -26, -25, -24, -23, -22, -21, -19, -18, -17, -15, -14, -13, -11, -10, -9, -7, -6, -5, -4, -3, -2, -1, 0, 3166720, 5725440, 69939460, 122299399, 142151432, 151264265, 157958921, 240848142, 241119246, 290593297, 325071379, 337903892, 540084256, 560072737, 623787557, 659427623, 706698794, 724514603, 774722094, 840464946, 913855286, 964384825, 1076056384, 1260091467, 1264278859, 1313932878, 1383203410, 1400111955, 1444098390, 1480327256, 1496911449, 1579028574, 1634095713, 1830028141, 1845771118, 1882290544, 1885471088, 1931487859, 2132835455, 2134857599]
127.0.0.3:11211
127.0.0.2:11211
127.0.0.4:11211
127.0.0.4:11211
127.0.0.4:11211
127.0.0.3:11211
127.0.0.3:11211
127.0.0.3:11211
127.0.0.3:11211
127.0.0.3:11211
127.0.0.4:11211
127.0.0.4:11211
size of dstNodes: 4
dstNodes:[127.0.0.2:11211, 127.0.0.3:11211, 127.0.0.4:11211, 127.0.0.1:11211]
rMap:{-8303758=127.0.0.2:11211, -8238828=127.0.0.4:11211, -7923916=127.0.0.2:11211, -7640999=127.0.0.1:11211, -7521006=127.0.0.4:11211, -7513765=127.0.0.1:11211, -7513539=127.0.0.4:11211, -7439323=127.0.0.3:11211, -6930900=127.0.0.1:11211, -6928840=127.0.0.4:11211, -6865642=127.0.0.4:11211, -6800881=127.0.0.1:11211, -6474452=127.0.0.4:11211, -6474378=127.0.0.3:11211, -6396384=127.0.0.2:11211, -6353117=127.0.0.3:11211, -6331267=127.0.0.4:11211, -6284704=127.0.0.3:11211, -6142912=127.0.0.3:11211, -6139552=127.0.0.3:11211, -6074297=127.0.0.2:11211, -6001111=127.0.0.3:11211, -5543596=127.0.0.2:11211, -5489869=127.0.0.3:11211, -5043351=127.0.0.1:11211, -4832717=127.0.0.1:11211, -4821406=127.0.0.2:11211, -4775392=127.0.0.4:11211, -4773547=127.0.0.3:11211, -4757890=127.0.0.3:11211, -4707986=127.0.0.4:11211, -4642804=127.0.0.3:11211, -4494809=127.0.0.1:11211, -4227319=127.0.0.1:11211, -4062854=127.0.0.2:11211, -3984819=127.0.0.1:11211, -3913919=127.0.0.3:11211, -3725796=127.0.0.2:11211, -3453839=127.0.0.4:11211, -3317716=127.0.0.4:11211, -3210979=127.0.0.2:11211, -3181717=127.0.0.3:11211, -2871545=127.0.0.4:11211, -2748069=127.0.0.4:11211, -2530274=127.0.0.3:11211, -2470122=127.0.0.2:11211, -2261495=127.0.0.2:11211, -2012117=127.0.0.3:11211, -1966040=127.0.0.4:11211, -1763986=127.0.0.4:11211, -1747382=127.0.0.2:11211, -1675219=127.0.0.1:11211, -1420531=127.0.0.4:11211, -1176201=127.0.0.1:11211, -1167814=127.0.0.1:11211, -1015998=127.0.0.4:11211, -821978=127.0.0.4:11211, -760210=127.0.0.2:11211, -638884=127.0.0.2:11211, -379105=127.0.0.4:11211, -255916=127.0.0.2:11211, -129259=127.0.0.4:11211, -32768=127.0.0.4:11211, -32711=127.0.0.2:11211, -32487=127.0.0.4:11211, -32227=127.0.0.1:11211, -32155=127.0.0.2:11211, -31716=127.0.0.2:11211, -31709=127.0.0.4:11211, -31659=127.0.0.2:11211, -31187=127.0.0.4:11211, -31182=127.0.0.1:11211, -30931=127.0.0.3:11211, -30425=127.0.0.3:11211, -30397=127.0.0.4:11211, -30385=127.0.0.2:11211, -30348=127.0.0.3:11211, -29896=127.0.0.3:11211, -29672=127.0.0.3:11211, -29654=127.0.0.3:11211, -29415=127.0.0.1:11211, -28805=127.0.0.1:11211, -28620=127.0.0.2:11211, -28361=127.0.0.1:11211, -28091=127.0.0.3:11211, -27791=127.0.0.4:11211, -27629=127.0.0.2:11211, -27606=127.0.0.1:11211, -27363=127.0.0.4:11211, -27277=127.0.0.2:11211, -27068=127.0.0.4:11211, -27061=127.0.0.2:11211, -26848=127.0.0.3:11211, -26843=127.0.0.1:11211, -26767=127.0.0.4:11211, -25822=127.0.0.4:11211, -25740=127.0.0.3:11211, -25550=127.0.0.2:11211, -25533=127.0.0.2:11211, -25279=127.0.0.2:11211, -25229=127.0.0.2:11211, -24997=127.0.0.3:11211, -24730=127.0.0.1:11211, -24514=127.0.0.3:11211, -24461=127.0.0.1:11211, -24028=127.0.0.4:11211, -23807=127.0.0.2:11211, -23488=127.0.0.1:11211, -23429=127.0.0.2:11211, -23281=127.0.0.3:11211, -23016=127.0.0.2:11211, -22688=127.0.0.4:11211, -22454=127.0.0.1:11211, -22149=127.0.0.1:11211, -21991=127.0.0.1:11211, -21986=127.0.0.4:11211, -21753=127.0.0.3:11211, -21244=127.0.0.2:11211, -21181=127.0.0.2:11211, -21178=127.0.0.4:11211, -20944=127.0.0.2:11211, -20881=127.0.0.4:11211, -20643=127.0.0.2:11211, -20474=127.0.0.2:11211, -20446=127.0.0.4:11211, -20198=127.0.0.1:11211, -19632=127.0.0.4:11211, -18939=127.0.0.1:11211, -18905=127.0.0.4:11211, -18410=127.0.0.4:11211, -17837=127.0.0.1:11211, -17601=127.0.0.2:11211, -17304=127.0.0.3:11211, -17284=127.0.0.2:11211, -16832=127.0.0.3:11211, -16604=127.0.0.1:11211, -16554=127.0.0.2:11211, -16347=127.0.0.4:11211, -16260=127.0.0.1:11211, -16011=127.0.0.3:11211, -15490=127.0.0.3:11211, -15048=127.0.0.4:11211, -15029=127.0.0.3:11211, -14817=127.0.0.2:11211, -14801=127.0.0.2:11211, -14332=127.0.0.4:11211, -14326=127.0.0.3:11211, -13815=127.0.0.3:11211, -13794=127.0.0.3:11211, -13746=127.0.0.1:11211, -13563=127.0.0.1:11211, -13551=127.0.0.2:11211, -13523=127.0.0.3:11211, -13458=127.0.0.3:11211, -12173=127.0.0.3:11211, -12027=127.0.0.4:11211, -12010=127.0.0.4:11211, -11916=127.0.0.3:11211, -11771=127.0.0.4:11211, -11492=127.0.0.2:11211, -11472=127.0.0.3:11211, -11428=127.0.0.1:11211, -11242=127.0.0.2:11211, -10702=127.0.0.2:11211, -10674=127.0.0.4:11211, -10232=127.0.0.1:11211, -10194=127.0.0.4:11211, -10147=127.0.0.2:11211, -9397=127.0.0.1:11211, -9184=127.0.0.1:11211, -9134=127.0.0.1:11211, -8951=127.0.0.2:11211, -8899=127.0.0.2:11211, -8656=127.0.0.1:11211, -8654=127.0.0.4:11211, -8614=127.0.0.4:11211, -8416=127.0.0.3:11211, -8362=127.0.0.3:11211, -7927=127.0.0.3:11211, -7616=127.0.0.2:11211, -7557=127.0.0.2:11211, -6911=127.0.0.3:11211, -6590=127.0.0.3:11211, -6051=127.0.0.1:11211, -5525=127.0.0.1:11211, -5269=127.0.0.3:11211, -4851=127.0.0.4:11211, -4737=127.0.0.4:11211, -4510=127.0.0.2:11211, -4266=127.0.0.2:11211, -4088=127.0.0.1:11211, -4066=127.0.0.3:11211, -4013=127.0.0.1:11211, -3536=127.0.0.2:11211, -3043=127.0.0.4:11211, -2559=127.0.0.3:11211, -2010=127.0.0.1:11211, -1713=127.0.0.3:11211, -1460=127.0.0.4:11211, -1259=127.0.0.3:11211, -1178=127.0.0.1:11211, -983=127.0.0.4:11211, -981=127.0.0.4:11211, -918=127.0.0.4:11211, -663=127.0.0.2:11211, -652=127.0.0.4:11211, -441=127.0.0.1:11211, -142=127.0.0.3:11211, -128=127.0.0.4:11211, -127=127.0.0.3:11211, -126=127.0.0.3:11211, -125=127.0.0.1:11211, -124=127.0.0.1:11211, -123=127.0.0.1:11211, -122=127.0.0.1:11211, -121=127.0.0.1:11211, -120=127.0.0.3:11211, -117=127.0.0.3:11211, -116=127.0.0.4:11211, -115=127.0.0.1:11211, -114=127.0.0.3:11211, -113=127.0.0.4:11211, -112=127.0.0.1:11211, -111=127.0.0.1:11211, -110=127.0.0.1:11211, -109=127.0.0.1:11211, -108=127.0.0.4:11211, -107=127.0.0.1:11211, -106=127.0.0.1:11211, -105=127.0.0.3:11211, -104=127.0.0.1:11211, -103=127.0.0.1:11211, -102=127.0.0.1:11211, -101=127.0.0.4:11211, -100=127.0.0.1:11211, -99=127.0.0.4:11211, -98=127.0.0.4:11211, -97=127.0.0.1:11211, -96=127.0.0.4:11211, -95=127.0.0.3:11211, -94=127.0.0.4:11211, -93=127.0.0.4:11211, -92=127.0.0.4:11211, -91=127.0.0.4:11211, -89=127.0.0.4:11211, -88=127.0.0.1:11211, -87=127.0.0.1:11211, -86=127.0.0.1:11211, -85=127.0.0.4:11211, -83=127.0.0.4:11211, -82=127.0.0.1:11211, -80=127.0.0.1:11211, -79=127.0.0.3:11211, -76=127.0.0.1:11211, -75=127.0.0.1:11211, -74=127.0.0.3:11211, -73=127.0.0.2:11211, -71=127.0.0.3:11211, -70=127.0.0.1:11211, -69=127.0.0.1:11211, -68=127.0.0.1:11211, -67=127.0.0.1:11211, -66=127.0.0.1:11211, -65=127.0.0.4:11211, -64=127.0.0.1:11211, -63=127.0.0.2:11211, -62=127.0.0.3:11211, -61=127.0.0.1:11211, -60=127.0.0.1:11211, -59=127.0.0.1:11211, -57=127.0.0.1:11211, -55=127.0.0.4:11211, -52=127.0.0.3:11211, -50=127.0.0.1:11211, -49=127.0.0.4:11211, -48=127.0.0.1:11211, -46=127.0.0.1:11211, -45=127.0.0.1:11211, -44=127.0.0.1:11211, -42=127.0.0.4:11211, -41=127.0.0.1:11211, -38=127.0.0.3:11211, -37=127.0.0.3:11211, -34=127.0.0.1:11211, -33=127.0.0.1:11211, -32=127.0.0.1:11211, -31=127.0.0.1:11211, -30=127.0.0.4:11211, -29=127.0.0.4:11211, -27=127.0.0.1:11211, -26=127.0.0.2:11211, -25=127.0.0.1:11211, -24=127.0.0.4:11211, -23=127.0.0.3:11211, -22=127.0.0.4:11211, -21=127.0.0.3:11211, -19=127.0.0.1:11211, -18=127.0.0.3:11211, -17=127.0.0.4:11211, -15=127.0.0.3:11211, -14=127.0.0.4:11211, -13=127.0.0.1:11211, -12=127.0.0.1:11211, -11=127.0.0.1:11211, -10=127.0.0.2:11211, -9=127.0.0.4:11211, -7=127.0.0.3:11211, -6=127.0.0.3:11211, -5=127.0.0.4:11211, -4=127.0.0.3:11211, -3=127.0.0.1:11211, -2=127.0.0.1:11211, -1=127.0.0.4:11211, 0=127.0.0.2:11211, 3166720=127.0.0.2:11211, 5725440=127.0.0.2:11211, 69939460=127.0.0.2:11211, 75391236=127.0.0.1:11211, 122299399=127.0.0.2:11211, 142151432=127.0.0.4:11211, 151264265=127.0.0.4:11211, 157958921=127.0.0.2:11211, 240848142=127.0.0.2:11211, 241119246=127.0.0.2:11211, 290593297=127.0.0.2:11211, 325071379=127.0.0.4:11211, 337903892=127.0.0.3:11211, 455881755=127.0.0.1:11211, 540084256=127.0.0.3:11211, 560072737=127.0.0.4:11211, 623787557=127.0.0.3:11211, 659427623=127.0.0.2:11211, 706698794=127.0.0.4:11211, 724514603=127.0.0.2:11211, 774722094=127.0.0.2:11211, 788610095=127.0.0.1:11211, 840464946=127.0.0.4:11211, 894778165=127.0.0.1:11211, 913855286=127.0.0.2:11211, 964384825=127.0.0.3:11211, 1062820927=127.0.0.1:11211, 1075674688=127.0.0.1:11211, 1076056384=127.0.0.2:11211, 1111319874=127.0.0.1:11211, 1162698821=127.0.0.1:11211, 1260091467=127.0.0.2:11211, 1264278859=127.0.0.2:11211, 1265501771=127.0.0.1:11211, 1313932878=127.0.0.3:11211, 1383203410=127.0.0.3:11211, 1400111955=127.0.0.2:11211, 1444098390=127.0.0.3:11211, 1480327256=127.0.0.2:11211, 1482497880=127.0.0.1:11211, 1496911449=127.0.0.3:11211, 1544519516=127.0.0.1:11211, 1579028574=127.0.0.3:11211, 1634095713=127.0.0.4:11211, 1763668585=127.0.0.1:11211, 1830028141=127.0.0.2:11211, 1845771118=127.0.0.2:11211, 1882290544=127.0.0.4:11211, 1885471088=127.0.0.2:11211, 1931487859=127.0.0.2:11211, 2000446327=127.0.0.1:11211, 2132835455=127.0.0.2:11211, 2134857599=127.0.0.4:11211, 2137145471=127.0.0.1:11211}
rList:[-8303758, -8238828, -7923916, -7640999, -7521006, -7513765, -7513539, -7439323, -6930900, -6928840, -6865642, -6800881, -6474452, -6474378, -6396384, -6353117, -6331267, -6284704, -6142912, -6139552, -6074297, -6001111, -5543596, -5489869, -5043351, -4832717, -4821406, -4775392, -4773547, -4757890, -4707986, -4642804, -4494809, -4227319, -4062854, -3984819, -3913919, -3725796, -3453839, -3317716, -3210979, -3181717, -2871545, -2748069, -2530274, -2470122, -2261495, -2012117, -1966040, -1763986, -1747382, -1675219, -1420531, -1176201, -1167814, -1015998, -821978, -760210, -638884, -379105, -255916, -129259, -32768, -32711, -32487, -32227, -32155, -31716, -31709, -31659, -31187, -31182, -30931, -30425, -30397, -30385, -30348, -29896, -29672, -29654, -29415, -28805, -28620, -28361, -28091, -27791, -27629, -27606, -27363, -27277, -27068, -27061, -26848, -26843, -26767, -25822, -25740, -25550, -25533, -25279, -25229, -24997, -24730, -24514, -24461, -24028, -23807, -23488, -23429, -23281, -23016, -22688, -22454, -22149, -21991, -21986, -21753, -21244, -21181, -21178, -20944, -20881, -20643, -20474, -20446, -20198, -19632, -18939, -18905, -18410, -17837, -17601, -17304, -17284, -16832, -16604, -16554, -16347, -16260, -16011, -15490, -15048, -15029, -14817, -14801, -14332, -14326, -13815, -13794, -13746, -13563, -13551, -13523, -13458, -12173, -12027, -12010, -11916, -11771, -11492, -11472, -11428, -11242, -10702, -10674, -10232, -10194, -10147, -9397, -9184, -9134, -8951, -8899, -8656, -8654, -8614, -8416, -8362, -7927, -7616, -7557, -6911, -6590, -6051, -5525, -5269, -4851, -4737, -4510, -4266, -4088, -4066, -4013, -3536, -3043, -2559, -2010, -1713, -1460, -1259, -1178, -983, -981, -918, -663, -652, -441, -142, -128, -127, -126, -125, -124, -123, -122, -121, -120, -117, -116, -115, -114, -113, -112, -111, -110, -109, -108, -107, -106, -105, -104, -103, -102, -101, -100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -89, -88, -87, -86, -85, -83, -82, -80, -79, -76, -75, -74, -73, -71, -70, -69, -68, -67, -66, -65, -64, -63, -62, -61, -60, -59, -57, -55, -52, -50, -49, -48, -46, -45, -44, -42, -41, -38, -37, -34, -33, -32, -31, -30, -29, -27, -26, -25, -24, -23, -22, -21, -19, -18, -17, -15, -14, -13, -12, -11, -10, -9, -7, -6, -5, -4, -3, -2, -1, 0, 3166720, 5725440, 69939460, 75391236, 122299399, 142151432, 151264265, 157958921, 240848142, 241119246, 290593297, 325071379, 337903892, 455881755, 540084256, 560072737, 623787557, 659427623, 706698794, 724514603, 774722094, 788610095, 840464946, 894778165, 913855286, 964384825, 1062820927, 1075674688, 1076056384, 1111319874, 1162698821, 1260091467, 1264278859, 1265501771, 1313932878, 1383203410, 1400111955, 1444098390, 1480327256, 1482497880, 1496911449, 1544519516, 1579028574, 1634095713, 1763668585, 1830028141, 1845771118, 1882290544, 1885471088, 1931487859, 2000446327, 2132835455, 2134857599, 2137145471]
127.0.0.3:11211
127.0.0.2:11211
127.0.0.1:11211
127.0.0.4:11211
127.0.0.4:11211
127.0.0.3:11211
127.0.0.3:11211
127.0.0.1:11211
127.0.0.3:11211
127.0.0.3:11211
127.0.0.4:11211
127.0.0.1:11211
Ketama Consisent Hash的更多相关文章
- 【原】 twemproxy ketama一致性hash分析
转贴请注明原帖位置:http://www.cnblogs.com/basecn/p/4288456.html 测试Twemproxy集群,双主双活 向twemproxy集群做写操作时,发现key的分布 ...
- [转] twemproxy ketama一致性hash分析
评注:提到HAProxy业务层proxy, twemproxy存储的proxy. 其中还提到了ketama算法的实现源码 转自:http://www.cnblogs.com/basecn/p/4288 ...
- memcache的一致性hash算法使用
一.概述 1.我们的memcache客户端(这里我看的spymemcache的源码),使用了一致性hash算法ketama进行数据存储节点的选择.与常规的hash算法思路不同,只是对我们要存储数据的k ...
- 一致性Hash算法在Memcached中的应用
前言 大家应该都知道Memcached要想实现分布式只能在客户端来完成,目前比较流行的是通过一致性hash算法来实现.常规的方法是将server的hash值与server的总台数进行求余,即hash% ...
- 一致性Hash算法(KetamaHash)的c#实现
Consistent Hashing最大限度地抑制了hash键的重新分布.另外要取得比较好的负载均衡的效果,往往在服务器数量比较少的时候需要增加虚拟节点来保证服务器能均匀的分布在圆环上.因为使用一般的 ...
- (转) 一致性Hash算法在Memcached中的应用
前言 大家应该都知道Memcached要想实现分布式只能在客户端来完成,目前比较流行的是通过一致性hash算法来实现.常规的方法是将 server的hash值与server的总台数进行求余,即hash ...
- 转: memcached Java客户端spymemcached的一致性Hash算法
转自:http://colobu.com/2015/04/13/consistent-hash-algorithm-in-java-memcached-client/ memcached Java客户 ...
- 一致性hash算法在memcached中的使用
一.概述 1.我们的memcacheclient(这里我看的spymemcache的源代码).使用了一致性hash算法ketama进行数据存储节点的选择.与常规的hash算法思路不同.仅仅是对我们要存 ...
- 161230、利用代理中间件实现大规模Redis集群
前面在<大规模互联网应用Redis架构要点>和<Redis官方集群方案 Redis Cluster>两篇文章中分别介绍了多Redis服务器集群的两种方式,它们是基于客户端sha ...
随机推荐
- hostent h_addr_list
struct hostent { char FAR * h_name; /* official name of host */ char FAR * FAR * h_aliases; /* alias ...
- MVC(@html.action)调用子操作方法
1*简单调用 子操作方法: 服务端 客户端 2.带有参数的调用 子操作方法 服务端 客户端
- Petit FatFs
FatFs is a generic FAT/exFAT file system module for small embedded systems. The FatFs module is writ ...
- Guava API
1.字符串的处理 字符串的连接&拆分&匹配及常用操作 Joiner&Splitter @Test public void testJoiner() { String[] str ...
- WampServer 下载以及安装问题
WampServer 3.0 下载: http://dl.pconline.com.cn/download/52877-1.html 碰到的问题DDL无法添加,解决方法: http://jingyan ...
- 1.2 Python基本语法
1.交互模式编程 cmd窗口 =>输入 Python => 输入 print "hello,python!"; ps:如果是新版本Python,需要输 ...
- 3d 人物残像
前言: gameunity 框架 还在继续完善中,0.2版本将会是一次 重大的里程碑. 正文: 哈哈,大家一定流汗了吧.请原谅我为自己代言. 好了,今天我要讲的是 3d人物残像. 首先我来说下 目前 ...
- hdu1501 Zipper
Zipper Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other) Total Submis ...
- HDU ACM 1495 非常可乐(广搜BFS)
非常可乐 Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) Total Submissi ...
- hadoop的安全模式
在安全模式下:不能增.删.改操作:但可以查看. 查看hadoop是否i处于安全模式下: 执行命令:hadoop dfsadmin -safemode get 进入hadoop的安全模式下: 执行命令: ...