Skip to content

Instantly share code, notes, and snippets.

View xuzhaokui's full-sized avatar
🐌
Focusing

Huluba xuzhaokui

🐌
Focusing
View GitHub Profile
@xuzhaokui
xuzhaokui / maglev-hashing.go
Created March 2, 2016 03:00
Google Maglev 一致性 hash 算法
package main
import (
"fmt"
"hash/crc32"
"strconv"
)
type table struct {
next []int // track the next index in permutation to be condidered for backend i