Sunday, August 16, 2020

System design: Turning Caches into Distributed Systems with mcrouter - Data@Scale

August 16, 2020

Introduction

It is best time for me to learn system design. I do not have to worry about onsite system design, and I have time to take break, no need to run a Leetcode marathon. It is best time for me to learn something about FACEBOOK distributed system. 

Mcrouter -  

Here is the link.

2:57/ 32:04

Usage models

- demand-filled, look-aside cache

     - "standard model" of memocache

    - suggest model for most use cases

- Non-durable store

    - Your data could disappear at any moment!

- Fast published store

    - Lookup regularly published values

     - Often replicated for redundancy


Set TTL - 

6:00 - 32:04

Memcache at Facebook

- Query cache for expensive TAO/DB queries

    - Birthday index

    - Typeahead bootstrap data

- Replicated cache for extremely hot TAO/DB data

    - chat visibility

Memcache at Facebook

- write-heavy, non-durable storage

    - For data that is nice-to-have, but not necessary for correct operation

    - Might be a performance or quality optimization

- Example 

    - Complex calculation analytics

8:38/ 32:04

What we want

As simple as a single memcached instance, except:

 - server never fails

 - Network never flaps

 -It has limitless memory

 - It offers infinite read throughput

 - All clients see uniformly low latency

mcrouter 

- feels as simple as a sginle memcached instance

- operates as a robust distributed system

10:16/32:04

From memcached to Memcache

Not just backspace

 - As the system scales, we encounter many issues

    - growing working set

    - high read rates

    - Heterogeneous workloads

    - hardware and transient network failures

    - Inter-cluster inconsistencies

    - Planned maintenance and data center issues

Growing working set


    - account confirmation status




No comments:

Post a Comment