Partitioning Proxies Caching Indexes Redundancy Replication SQL vs NoSQL Consistent Hashing CAP Theorem PACELC Theorem Bloom Quorum Leader and Follower
Clock Idempotent Receiver State Watch Quorum SYSTEMS DESIGN PATTERNS www.sitereliabilityenginering.co . www.yurynino.com https://martinfowler.com/articles/patterns-of-distributed-systems/
SYSTEM DESIGN WHAT IS NALSD? SRE Ability to assess, design, and evaluate large systems. Robust and scalable designs with low operational costs. www.sitereliabilityenginering.co . www.yurynino.com
to start resource planning with a basic whiteboard diagram of a system, think through the various scaling and failure domains, and focus their design into a concrete proposal for resources. www.sitereliabilityenginering.co . www.yurynino.com
people designing distributed systems need to develop and continuously exercise the muscle of design into concrete estimates of resources at multiple steps in the process. www.sitereliabilityenginering.co . www.yurynino.com
Machine Now we’ll need multiple machines, what’s the best design to join them? Distributed System * Is it possible? * Can we do better? * Is it feasible? * Is it resilient? Design Process * Read & Understand * Required SLOs * Ask that you consider Initial Requirements NALSD IN DETAIL www.sitereliabilityenginering.co . www.yurynino.com
Main Memory Reference Time Round trip within same datacenter Power of ten? ns / us / ms Speed Read sequentially from SSD From: https://cloud.google.com/blog/products/manage ment-tools/sre-principles-and-flashcards-to-design- nalsd Time Read 1 MB sequentially from memory www.sitereliabilityenginering.co . www.yurynino.com
on Google Web Search. • The click-through rate (CTR) metric tells advertisers how well their ads are performing. • CTR is the ratio of times the ad is clicked versus the number of times the ad is shown. AdWords Challenge Design a system capable of measuring and reporting an accurate CTR for every AdWords ad. www.sitereliabilityenginering.co . www.yurynino.com
is keyed by ad_id and is associated with a list of search terms selected by the advertiser. * How often this search term triggered this ad to be shown? * How many times the ad was clicked by someone who saw the ad? * With this information, we can calculate the CTR CTR: the number of clicks divided by the number of impressions. www.sitereliabilityenginering.co . www.yurynino.com
things: ◦ That the dashboard displays quickly! ◦ That the data is recent. Therefore, we will consider our requirements in terms of SLOs: • 99.9% of dashboard queries complete in < 1 second. • 99.9% of the time, the CTR data displayed is less than 5 minutes old. www.sitereliabilityenginering.co . www.yurynino.com
TIME the query occurred A QUERY_ID unique identifier An AD_ID The AD IDs of THE AdWords advertisements shown for the search A SEARCH_TERM the query content www.sitereliabilityenginering.co . www.yurynino.com
logs with a MapReduce. * We can grab the accumulated query logs and click logs. MapReduce will produce a data set organized by ad_id & the number of clicks each search_term received. Unfortunately, this type of batch process can’t meet our SLO of joined log availability within 5 minutes of logs being received. www.sitereliabilityenginering.co . www.yurynino.com