Caching 50.5* + Apache Kafka

Slides:



Advertisements
Similar presentations
Fast Data at Massive Scale Lessons Learned at Facebook Bobby Johnson.
Advertisements

IP Router Architectures. Outline Basic IP Router Functionalities IP Router Architectures.
Efficient Event-based Resource Discovery Wei Yan*, Songlin Hu*, Vinod Muthusamy +, Hans-Arno Jacobsen +, Li Zha* * Chinese Academy of Sciences, Beijing.
Scalable Content-Addressable Network Lintao Liu
FAWN: Fast Array of Wimpy Nodes Developed By D. G. Andersen, J. Franklin, M. Kaminsky, A. Phanishayee, L. Tan, V. Vasudevan Presented by Peter O. Oliha.
Scalable Content-aware Request Distribution in Cluster-based Network Servers Jianbin Wei 10/4/2001.
CompSci 356: Computer Network Architectures Lecture 21: Content Distribution Chapter 9.4 Xiaowei Yang
Web Caching Schemes1 A Survey of Web Caching Schemes for the Internet Jia Wang.
Internet Networking Spring 2006 Tutorial 12 Web Caching Protocols ICP, CARP.
Lecture 6 – Google File System (GFS) CSE 490h – Introduction to Distributed Computing, Winter 2008 Except as otherwise noted, the content of this presentation.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #13 Web Caching Protocols ICP, CARP.
Large Scale Sharing GFS and PAST Mahesh Balakrishnan.
Internet Networking Spring 2002 Tutorial 13 Web Caching Protocols ICP, CARP.
Content Addressable Networks. CAN Associate with each node and item a unique id in a d-dimensional space Goals –Scales to hundreds of thousands of nodes.
Squirrel: A decentralized peer- to-peer web cache Paul Burstein 10/27/2003.
Or, Providing Scalable, Decentralized Location and Routing Network Services Tapestry: Fault-tolerant Wide-area Application Infrastructure Motivation and.
Web Caching Schemes For The Internet – cont. By Jia Wang.
1CS 6401 Peer-to-Peer Networks Outline Overview Gnutella Structured Overlays BitTorrent.
Storage management and caching in PAST PRESENTED BY BASKAR RETHINASABAPATHI 1.
1 Content Distribution Networks. 2 Replication Issues Request distribution: how to transparently distribute requests for content among replication servers.
Distributed Data Stores – Facebook Presented by Ben Gooding University of Arkansas – April 21, 2015.
Supporting Strong Cache Coherency for Active Caches in Multi-Tier Data-Centers over InfiniBand S. Narravula, P. Balaji, K. Vaidyanathan, S. Krishnamoorthy,
Distributed Systems Tutorial 11 – Yahoo! PNUTS written by Alex Libov Based on OSCON 2011 presentation winter semester,
Infrastructure for Better Quality Internet Access & Web Publishing without Increasing Bandwidth Prof. Chi Chi Hung School of Computing, National University.
CH2 System models.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Xiaozhou Li COS 461: Computer Networks (precept 04/06/12) Princeton University.
1 Distributed Hash Tables (DHTs) Lars Jørgen Lillehovde Jo Grimstad Bang Distributed Hash Tables (DHTs)
MapReduce and GFS. Introduction r To understand Google’s file system let us look at the sort of processing that needs to be done r We will look at MapReduce.
1 Peer-to-Peer Technologies Seminar by: Kunal Goswami (05IT6006) School of Information Technology Guided by: Prof. C.R.Mandal, School of Information Technology.
GFS. Google r Servers are a mix of commodity machines and machines specifically designed for Google m Not necessarily the fastest m Purchases are based.
P2P Group Meeting (ICS/FORTH) Monday, 28 March, 2005 A Scalable Content-Addressable Network Sylvia Ratnasamy, Paul Francis, Mark Handley, Richard Karp,
1 Secure Peer-to-Peer File Sharing Frans Kaashoek, David Karger, Robert Morris, Ion Stoica, Hari Balakrishnan MIT Laboratory.
1 MSRBot Web Crawler Dennis Fetterly Microsoft Research Silicon Valley Lab © Microsoft Corporation.
Information-Centric Networks Section # 5.3: Content Distribution Instructor: George Xylomenos Department: Informatics.
CS 6401 Overlay Networks Outline Overlay networks overview Routing overlays Resilient Overlay Networks Content Distribution Networks.
Scalable Data Scale #2 site on the Internet (time on site) >200 billion monthly page views Over 1 million developers in 180 countries.
Hiearchial Caching in Traffic Server. Hiearchial Caching  A set of techniques and mechanisms to increase the size and performance of network caches.
Apache Kafka A distributed publish-subscribe messaging system
CMSC 491 Hadoop-Based Distributed Computing Spring 2016 Adam Shook
Wide-area Network Acceleration for the Developing World
Distributed, real-time actionable insights on high-volume data streams
Web Server Load Balancing/Scheduling
Coral: A Peer-to-peer Content Distribution Network
Web Server Load Balancing/Scheduling
Advanced Topics in Concurrency and Reactive Programming: Case Study – Google Cluster Majeed Kassis.
Presented by Haoran Wang
VIRTUAL SERVERS Presented By: Ravi Joshi IV Year (IT)
COS 518: Advanced Computer Systems Lecture 9 Michael Freedman
Google Filesystem Some slides taken from Alan Sussman.
PA an Coordinated Memory Caching for Parallel Jobs
Load Balancing Memcached Traffic Using SDN
Internet Networking recitation #12
Plethora: Infrastructure and System Design
COS 518: Advanced Computer Systems Lecture 9 Michael Freedman
Be Fast, Cheap and in Control
Jinyang Li’s Research Distributed Systems Wireless Networks
Distributed Systems CS
A Scalable content-addressable network
Distributed P2P File System
Ewen Cheslack-Postava
Distributed Systems CS
Evolution of messaging systems and event driven architecture
Content Distribution Networks
Implementing an OpenFlow Switch on the NetFPGA platform
EECS 498 Introduction to Distributed Systems Fall 2017
Content Distribution Networks + P2P File Sharing
A Scalable Content Addressable Network
THE GOOGLE FILE SYSTEM.
Consistent Hashing and Distributed Hash Table
Content Distribution Networks + P2P File Sharing
Presentation transcript:

Caching 50.5* + Apache Kafka COS 518: Advanced Computer Systems Lecture 10 Michael Freedman * Half of 101

Basic caching rule Tradeoff Based on two assumptions Fast: Costly, small, close Slow: Cheap, large, far Based on two assumptions Temporal location: Will be accessed again soon Spatial location: Nearby data will be accessed soon

Multi-level caching in hardware https://en.wikipedia.org/wiki/Cache_memory

Caching in distributed systems Web Caching and Zipf-like Distributions: Evidence and Implications Lee Breslau, Pei Cao, Li Fan, Graham Phillips, Scott Shenker

Caching common in distributed systems Web Web proxies at edge of enterprise networks “Server surrogates” in CDNs downstream of origin DNS Caching popular NS, A records File sharing Gnutella & flooding-based p2p networks

Caching within datacenter systems load balancers front-end web servers DB / backend identical identical partitioned

Caching within datacenter systems load balancers front-end web servers DB / backend identical identical partitioned cache

Caching within datacenter systems look-through cache load balancers front-end web servers DB / backend identical identical partitioned partitioned

Caching within datacenter systems look-aside cache load balancers front-end web servers DB / backend identical identical partitioned partitioned

Cache management Write-through Write-back Data written simultaneously to cache and storage Write-back Data updated only in cache On cache eviction, written “back” to storage

Caching within datacenter systems look-aside cache load balancers front-end web servers DB / backend identical identical partitioned partitioned

New system / hardware architectures: New opportunities for caching

Be Fast, Cheap and in Control with SwitchKV Xiaozhou Li Raghav Sethi Michael Kaminsky David G. Andersen Michael J. Freedman NSDI 2016

Traditional architectures: High-overhead for skewed/dynamic workloads clients backends cache miss clients failure point miss backends cache (load balancer) Look-aside Look-through Cache must process all queries and handle misses In our case, cache is small and hit ratio could be low Throughput is bounded by the cache I/O High latency for queries for uncached keys

SwitchKV: content-aware routing clients controller OpenFlow Switches cache backends Switches route requests directly to the appropriate nodes Latency can be minimized for all queries Throughput can scale out with # of backends Availability would not be affected by cache node failures

Exploit SDN and switch hardware Clients encode key information in packet headers Encode key hash in MAC for read queries Encode destination backend ID in IP for all queries Switches maintain forwarding rules and route query packets L2 table hit Packet In Packet Out exact match rule per cached key to the cache miss TCAM table Packet Out match rule per physical machine

Keep cache and switch rules updated New challenges for cache updates Only cache the hottest O(nlogn) items Limited switch rule update rate Goal: react quickly to workload changes with minimal updates switch rule update top-k <key, load> list (periodic) cache fetch <key, value> backend controller bursty hot <key, value> (instant)

Distributed Queues & Apache Kafka

What is pub sub ? Producer Consumer msg Consumer Producer msg publish(topic, msg) Producer subscribe Consumer Topic 1 msg Topic 2 Multiple subscribers, decoupling Some examples : email notification on adding connection etc Topic 3 Publish subscribe system Consumer Producer msg

Automatic load balancing Producer Producer Parties Producers write data to brokers Consumers read data from brokers Data stored in topics Topics split into partitions Partitions are replicated for failure recovery Broker Broker Consumer Consumer

Topics Topic: name to which messages are published Kafka prunes “head” based on age or max size or “key” Broker(s) new Producer A1 Producer A2 Producer An … Producers always append to “tail” (think: append to a file) Kafka topic … Older msgs Newer msgs

Topics Broker(s) Consumers use an “offset pointer” to Consumer group C1 Consumers use an “offset pointer” to track/control their read progress (and decide the pace of consumption) Consumer group C2 Broker(s) new Producer A1 Producer A2 Producer An … Producers always append to “tail” (think: append to a file) Kafka topic … Older msgs Newer msgs

Partitions A topic consists of partitions. Partition: ordered + immutable sequence of msgs, continually appended to Number of partitions determines max consumer parallelism

Partition offsets Offset: messages in partitions are each assigned a unique (per partition) and sequential id called the offset Consumers track their pointers via (offset, partition, topic) tuples Consumer group C1

Wednesday: Welcome to BIG DATA