🔏
Tech
  • 🟢App aspects
    • Software architecture
      • Caching
      • Anti-patterns
      • System X-ability
      • Coupling
      • Event driven architecture
        • Command Query Responsibility Segregation (CQRS)
        • Change Data Capture (CDC)
      • Distributed transactions
      • App dev notes
        • Architecture MVP
      • TEMP. Check list
      • Hexagonal arch
      • Communication
        • REST vs messaging
        • gRPC
        • WebSocket
      • Load balancers
      • Storage limits
      • Event storming
    • Authentication
    • Deployment strategy
  • Databases
    • Classification
    • DB migration tools
    • PostreSQL
    • Decision guidance
    • Index
      • Hash indexes
      • SSTable, LSM-Trees
      • B-Tree
      • Engines, internals
    • Performance
  • System design
    • Interview preparation
      • Plan
        • Instagram
        • Tinder
        • Digital wallet
        • Dropbox
        • Live video streaming
        • Uber
        • Whatsup
        • Tiktok
        • Twitter
        • Proximity service
    • Algorithms
    • Acronyms
  • 🟢Programming languages
    • Java
      • Features
        • Field hiding
        • HashCode() and Equals()
        • Reference types
        • Pass by value
        • Atomic variables
      • Types
      • IO / NIO
        • Java NIO
          • Buffer
          • Channel
        • Java IO: Streams
          • Input streams
            • BufferedInputStream
            • DataInputStream
            • ObjectInputStream
            • FilterInputStream
            • ByteArrayInputStream
        • Java IO: Pipes
        • Java IO: Byte & Char Arrays
        • Java IO: Input Parsing
          • PushbackReader
          • StreamTokenizer
          • LineNumberReader
          • PushbackInputStream
        • System.in, System.out, System.error
        • Java IO: Files
          • FileReader
          • FileWriter
          • FileOutputStream
          • FileInputStream
      • Multithreading
        • Thread liveness
        • False sharing
        • Actor model
        • Singleton
        • Future, CompletableFuture
        • Semaphore
      • Coursera: parallel programming
      • Coursera: concurrent programming
      • Serialization
      • JVM internals
      • Features track
        • Java 8
      • Distributed programming
      • Network
      • Patterns
        • Command
      • Garbage Collectors
        • GC Types
        • How GC works
        • Tools for GC
    • Kotlin
      • Scope functions
      • Inline value classes
      • Coroutines
      • Effective Kotlin
    • Javascript
      • Javascript vs Java
      • TypeScript
    • SQL
      • select for update
    • Python
      • __init.py__
  • OS components
    • Network
      • TCP/IP model
        • IP address in action
      • OSI model
  • 🟢Specifications
    • JAX-RS
    • REST
      • Multi part
  • 🟢Protocols
    • HTTP
    • OAuth 2.0
    • LDAP
    • SAML
  • 🟢Testing
    • Selenium anatomy
    • Testcafe
  • 🟢Tools
    • JDBC
      • Connection pool
    • Gradle
    • vim
    • git
    • IntelliJ Idea
    • Elastic search
    • Docker
    • Terraform
    • CDK
    • Argo CD
      • app-of-app setup
    • OpenTelemetry
    • Prometheus
    • Kafka
      • Consumer lag
  • 🟢CI
    • CircleCi
  • 🟢Platforms
    • AWS
      • VPC
      • EC2
      • RDS
      • S3
      • IAM
      • CloudWatch
      • CloudTrail
      • ELB
      • SNS
      • Route 53
      • CloudFront
      • Athena
      • EKS
    • Kubernetes
      • Networking
      • RBAC
      • Architecture
      • Pod
        • Resources
      • How to try
      • Kubectl
      • Service
      • Tooling
        • ArgoCD
        • Helm
        • Istio
    • GraalVM
    • Node.js
    • Camunda
      • Service tasks
      • Transactions
      • Performance
      • How it executes
  • 🟢Frameworks
    • Hibernate
      • JPA vs Spring Data
    • Micronaut
    • Spring
      • Security
      • JDBC, JPA, Hibernate
      • Transactions
      • Servlet containers, clients
  • 🟢Awesome
    • Нейробиология
    • Backend
      • System design
    • DevOps
    • Data
    • AI
    • Frontend
    • Mobile
    • Testing
    • Mac
    • Books & courses
      • Path: Java Concurrency
    • Algorithms
      • Competitive programming
    • Processes
    • Finance
    • Electronics
  • 🟢Electronics
    • Arduino
    • IoT
  • Artificial intelligence
    • Artificial Intelligence (AI)
  • 🚀Performance
    • BE
  • 📘Computer science
    • Data structures
      • Array
      • String
      • LinkedList
      • Tree
    • Algorithms
      • HowTo algorithms for interview
  • 🕸️Web dev (Frontend)
    • Trends
    • Web (to change)
  • 📈Data science
    • Time series
Powered by GitBook
On this page
  • Формализация задачи
  • Границы системы
  • Потоки данных и компоненты системы
  • Systems to learn

Was this helpful?

  1. System design
  2. Interview preparation

Plan

PreviousInterview preparationNextInstagram

Last updated 1 year ago

Was this helpful?

Формализация задачи

функциональные требования (что пользователь хочет от системы в виде сценариев, jobs to be done)

нефункциональные требования (главные архитектурные характеристики: sizing, rps)

определить важность и интересность требований, которую разбирать на собесе

Границы системы

выбрать правильный способ интеграции системы: files, DB, API, messaging.

if (API) REST?, RPC?, GraphQL, AsyncAPI

выбрать сети и протоколы (TCP, UDP)

Балансировщики нагрузки (nginx, HAproxy)

обрабатываемые сценарии

NFR questions / aspects:
- DAU / MAU
- кол-во пользователей через 5-10 лет
- кол-во операций пользователем в день
- RPS, сетевой трафик, кол-во соединений
- CPU
- HDD / SSD (only 85% of disk space is available, 3-5% disks are destroyed over the year, do not forget about replication)
- $$$

~ 100_000 sec in a day (86400 accurately)
read 1MB sequentially from network ~ 10ms
read 1MB sequentially from disk ~ 30ms
Google SRE book with calcualtions (recommended to have a look)

TODO
- websocket vs long polling

Потоки данных и компоненты системы

happy path. Read / write path

corner cases (когда части системы отваливаются). Уточнить на собесе что именно т до какой глубины здесь прорабатывать

проговорить логи, мониторинг, миграцию данных

TODO:

  • stateless / stateful нагрузки (как разделять?)

  • how to store documents in document oriented dbs

  • K/V, document oriented, column oriented, graph

    • по конкретным базам проработать

      • понять гарантии. Какой диапазон нагрузок они потянут. Дрифты часов

  • twelve factor app

  • как масштабировать stateless/stateful компоненты на чтение, на запись (с использованием оркестраторов, горизонтальное, вертикальное)

Важно:

  • задавать правильные вопросы

  • не комититься на задачи, которые не нужно решать

  • помнить о времени

  • не начинать проектировать сразу

  • делиться своими размышлениями на собесе

  • проявлять самостоятельность и проактивность в проектировании

  • реагировать на наводящие вопросы и уточнения

  • в конце спросить и почему вы именно эту задачу спрашиваете?

  1. instagram

  2. netflix

  3. facebook

repeat relations in DB ( 1 to many, etc)

DDD

Entity-Relationship diagram

what is failure domains

partitioning vs sharding

Systems to learn

for 10 euro here there are many of below systems designed

tik tok

twitter (Twitter timeline and search)

url shortener

uber

доставка еды

whatsup

tinder

Pastebin.com

web crawler

Mint.com

data structures for a social network

In details

key-value store for a search engine

Amazon's sales ranking by category feature

Dropbox

(good example )

Great youtube channel ;

✅
✅
✅
✅
✅
❓
✅
✅
✅
⭐
✅
✅
✅
✅
LINK
Feed, followers
Better about feed
✅
LINK
Timelines at Scale
Operations at Twitter: Scaling Beyond 100 Million Users
✅
LINK
✅
Example
Scaling Push Messaging for Millions of Devices
LINK
LINK
LINK
Scaling Memcache at Facebook
Scaling Facebook Live Videos to a Billion Users
Feed, followers
Better about feed
LINK
Facebook’s Distributed Data Store for the Social Graph
LINK
LINK
Introducing Non-Abstract Large System Design
✅
Capacity planning and hardware selection for DataStax Enterprise implementations
Пройти беларуса
YouTube Scalability
✅
Using logs to build a solid data infrastructure
✅
LINK
Back of the envelope calculations
LINK
A lot of links are taken from here
Crushing Tech Education
Jordan has no life