Consistent Hashing. Hashing E.g., h(x) = (((a x + b) mod P) mod |B|), where P is prime, P > |U| a,b chosen uniformly at random from Z P x is a serial.

Slides:



Advertisements
Similar presentations
Akamai Content Delivery Network Slides from Bruce Maggs.
Advertisements

Lecture 15 – Consistent hashing and name-by-hash
Hashing Part Two Better Collision Resolution Small parts of this material stolen from "File Organization and Access" by Austing and Cassel.
Precept 6 Hashing & Partitioning 1 Peng Sun. Server Load Balancing Balance load across servers Normal techniques: Round-robin? 2.
1 Server Selection & Content Distribution Networks (slides by Srini Seshan, CS CMU)
MMDS Secs Slides adapted from: J. Leskovec, A. Rajaraman, J. Ullman: Mining of Massive Datasets, October.
Key Algorithms in a Content Delivery System Akamai Technologies and Carnegie Mellon University Bruce Maggs.
© 2006 Pearson Addison-Wesley. All rights reserved13 A-1 Chapter 13 Hash Tables.
1 CSE 326: Data Structures Hash Tables Autumn 2007 Lecture 14.
Hashing in Networked Systems COS 461: Computer Networks Spring 2011 Mike Freedman LB Server.
Consistent Hashing: Load Balancing in a Changing World
Content Overlays (Nick Feamster) February 25, 2008.
MIT Consistent Hashing: Load Balancing in a Changing World David Karger, Eric Lehman, Tom Leighton, Matt Levine, Daniel Lewin, Rina Panigrahy.
How Akamai Handles Large Events Bruce Maggs Carnegie Mellon Duke Akamai Technologies.
D u k e S y s t e m s Dynamo Jeff Chase Duke University
Ihab Mohammed and Safaa Alwajidi. Introduction Hash tables are dictionary structure that store objects with keys and provide very fast access. Hash table.
Lecture 12 Distributed Hash Tables CPE 401/601 Computer Network Systems slides are modified from Jennifer Rexford.
Hashing Fundamental Data Structures and Algorithms Margaret Reid-Miller 18 January 2005.
Midterm Midterm is Wednesday next week ! The quiz contains 5 problems = 50 min + 0 min more –Master Theorem/ Examples –Quicksort/ Mergesort –Binary Heaps.
Chapter 13 C Advanced Implementations of Tables – Hash Tables.
SATMathVideos.Net A set S consists of all multiples of 4. Which of the following sets are contained within set S? A) S2 only B) S4 only C) S2 and S4 D)
IEEE MEDIA INDEPENDENT HANDOVER Title: An existing use of DNS Date Submitted: Authors or Sources: H Anthony Chan Abstract: Current.
Md Tareq Adnan Centralized Approach : Server & Clients Slow content must traverse multiple backbones and long distances Unreliable.
Algorithms used by CDNs Stable Marriage Algorithm Consistent Hashing.
CSC 213 – Large Scale Programming. Today’s Goal  Review when, where, & why we use Map s  Why Sequence -based approach causes problems  How hash can.
EVEN NUMBERS EVEN NUMBERS 1 = prime 2 = prime1 3 = prime 4 = 2 x 22 5 = prime 6 = 2 x 33 7 = prime 8 = 2 x 2 x 24 9 = 3 x 3 10 = 2 x 55.
1 What is it? A side order for your eggs? A form of narcotic intake? A combination of the two?
Hashing (part 2) CSE 2011 Winter March 2018.
Properties of water paper PowerPoint presentation
School of Computing Clemson University Fall, 2012
Scaling Network Load Balancing Clusters
CS276A Text Information Retrieval, Mining, and Exploitation
Distributed Hash Tables
LEARNING OBJECTIVES O(1), O(N) and O(LogN) access times. Hashing:
CS 332: Algorithms Hash Tables David Luebke /19/2018.
Hashing Alexandra Stefan.
8.1 Multiplication Properties of Exponents
(slides by Nick Feamster)
Introduction to Algorithms 6.046J/18.401J
Lecture 21: Hash Tables Monday, February 28, 2005.
EEE2108: Programming for Engineers Chapter 8. Hashing
Web Caching, Content Delivery Networks, Consistent Hashing
Titles make PowerPoint happy.
Dictionaries Dictionaries 07/27/16 16:46 07/27/16 16:46 Hash Tables 
Algorithmic Nuggets in Content Delivery
Hashing: is an alternative search technique (earlier we had BST) Motivation: Try to access directly each possible keys! Suggestion: Enumerate possible.
Hash Table.
Counting How Many Elements Computing “Moments”
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval"
Edge computing (1) Content Distribution Networks
Dictionaries and Their Implementations
Introduction to Algorithms 6.046J/18.401J
Resolving collisions: Open addressing
P2P Systems and Distributed Hash Tables
CH 9.2 : Hash Tables Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++, Goodrich, Tamassia and.
Hash Tables and Associative Containers
EECS 498 Introduction to Distributed Systems Fall 2017
CS202 - Fundamental Structures of Computer Science II
Introduction to Algorithms
Pseudorandom number, Universal Hashing, Chaining and Linear-Probing
Ch Hash Tables Array or linked list Binary search trees
Going round in circles… Going round in circles…
Prime Numbers.
CS 3343: Analysis of Algorithms
Consistent Hashing and Distributed Hash Table
Extendable hashing M.B.Chandak.
DATA STRUCTURES-COLLISION TECHNIQUES
Linear Hashing Example
DATA STRUCTURES-COLLISION TECHNIQUES
Path Oram An Extremely Simple Oblivious RAM Protocol
Presentation transcript:

Consistent Hashing

Hashing E.g., h(x) = (((a x + b) mod P) mod |B|), where P is prime, P > |U| a,b chosen uniformly at random from Z P x is a serial number Universe U of all possible objects, set B of buckets. object: set of web objects with same serial number bucket: web server Hash function h: U  B Assigns objects to buckets

f(d) = d + 1 mod 5 Difficulty changing number of buckets bucket object f(d) = d + 1 mod 4

Consistent Hashing Idea: Map both objects and buckets to unit circle. object bucket Assign object to next bucket on circle in clockwise order. new bucket

Complication – Different Views select servers within cluster Low-level DNS servers act independently and may have different ideas about how many and which servers are alive. a212.g.akamai.net Akamai Low-Level DNS Servers

Properties of Consistent Hashing Monotonicity: When a bucket is added/removed, the only objects affected are those that are/were mapped to the bucket. Balance: Objects are assigned to buckets “randomly”. -- can be improved by mapping each bucket to multiple places on unit circle Load: Objects are assigned to buckets evenly, even over a set of views. Spread: An object should be mapped to a small number of buckets over a set of views.

How we really do it a212: a213: a214: a215: random permutations of servers Why? To spread load for one serial number.