Distributed Systems

System Design Interview - Chapter 7 - Design a Unique ID Generator in Distributed Systems

System Design Interview - Chapter 7 - Design a Unique ID Generator in Distributed Systems

Translations: RU

Generating unique ID seems to be a simple task, but it is not in a high-load distributed systems!

This topic consists of:

  • Understanding the requirements and why it is a complicated task
  • Possible solutions:
    • Multi-master replication
    • Universally unique identifier (UUID)
    • Ticket server
    • Twitter SNOWFLAKE approach (seems to be the best one!)
  • Details:
    • Timestamp
    • Sequence number
  • Other issues
    • Clock synchronization
    • Section length tuning
    • High availability

These items are disclosed in a very interesting Chapter 7 of the book:

System Design Interview - Chapter 6 - Design a Key-Value store

System Design Interview - Chapter 6 - Design a Key-Value store

Translations: RU

Key-Value stores are the most basic but widely used data storages.

Design of key-value store consists of understanding the following topics:

  • What do we want from key-value store?
  • Single server key-value store
  • DISTRIBUTED key-value store:
    • CAP theorem
    • Real-world trade-offs for distributed systems
  • System components:
    • Data partition
    • Data replication
    • Consistency
    • Inconsistency resolution: Versioning
    • Handling all types of failures: Failure detection, Handling TEMPORARY failures, Handling PERMANENT failures, Handling data center outage
  • System architecture diagram
  • Write path
  • Read path

These items are disclosed in a very interesting Chapter 6 of the book: