DEV Community

Cover image for System Design
aakhtar3
aakhtar3

Posted on • Edited on

1

System Design

A high level break down of key components when doing a system design problem.

Requirements

Get requirements and estimations to scope your system design.

Functional

Identity what you are trying to build.

Features System
1 on 1 chat Mobile/Web
News feed Notifications

Non Functional

Identify how your system will behave.

User Experience System
Full end to end encryption High Availability
See new post fast Reliability

Architecture

High Availability

  • High Availability
  • Failover

Reliability

  • Reliability
  • RPO/RTO

Key Performance Indicators

Performance

  • Observability
  • Metrics

Estimations

Value Number Byte
Hundred - B
Thousand K KB
Million M MB
Billion B GB
Trillion T TB
Quadrillion Q PB
Quintillion Qu EB
Sextillion S ZB
Septillion Se YB

Estimate the scope of your users and data points.

Users (DAU) File Type (File Bytes) Storage (Retention Time)
100 B Message/day 1 KB (avg) 10 years
10 B Post/day 10 KB (max) 10% new data per year

Calculations

Using your estimations do some back of envelope.

QPS Max QPS Storage-Bytes Retention Bytes In/E Gress Bytes
DAU / ~100K 2 * QPS DAU * FileBytes StorageBytes * Retention Time (QPS * FileBytes) / 8 Bit

QPS

QPS

  • Queries Per Second
  • Daily Active Users
  • Time = Round up (86,400 seconds in day)

Max QPS

Max QPS

  • Double Queries Per Second
  • Calculate (Read % : Write %) Ratio
    • 1 Read : 10 Write
    • Read % = 1 * Queries Per Second
    • Write % = 10 * Queries Per Second

Storage Bytes

Storage Bytes

  • Storage Bytes
  • Daily Active Users
  • File Bytes

Retention Bytes

Retention Bytes

  • Retention Bytes
  • Storage Bytes
  • Retention Time
    • 365 days in year

In E Gress Bytes

In/E-Gress Bytes

  • In-gress
  • E-gress
  • 1 Byte / 8 Bits
  • Queries Per Second
  • File Bytes

Network

Wide Area Network

Wide Area Network

  • Clients
    • Mobile
    • Browser
    • CLI
  • DNS
    • DNSSec (Signed Registries)
    • DNS over HTTPS (Privacy)
  • CDN
  • APN

Payload

Payload

  • API
  • Request Lines
  • Authentication/Authorization
  • Protocols

Public Gateway

Public Gateway

  • Firewall
  • Rate Limiter
  • Authentication/Authorization
  • Reverse Proxy
  • Forward Proxy

Virtual Private Cloud

Virtual Private Cloud

  • Access Control List
  • Security Group
  • Route Table
  • Classless Inter-Domain Routing
  • Gateway
    • Internet
    • Network Adress Translation
    • VPC Peering

Application

Load Balancer

Load Balancer

  • Layer 3/4/7 OSI
  • Strategy
  • Use cases

Service Discovery

Service Discovery

  • Auto Scale
    • DevOps
  • Protocols
  • Zeekeeper/etcd

Consensus

Consensus

  • Raft Consensus
  • Replicated State Machine

Compute

Compute

  • Session(less)
  • State(full)/(less)
  • Server(less)

Message Queue

Message Queue

  • Producer
  • Consumer

Cache

Cache

  • Eviction Strategy

Database

SQL

SQL

  • Relational Data
  • Transactions

NoSQL

NoSQL

  • Key Value
  • Document
  • Wide Column
  • Graph
  • TimeSeries
  • Spatial

CAP PACELC

CAP

  • CAP
    • Consistency
    • Availability
    • Partition
  • PACELC
    • Partition == true
      • IF
    • Availability
      • or
    • Consistency
      • ELSE
    • Latency
      • or
    • Consistency

Partition

Partition

  • Consistent Hashing
  • Range Partition
  • Vertical Partition

Index

Index

  • B Tree
  • Skip List
  • Hash
  • Inverted

ACID

Atomicity

Atomicity

  • Transactions
  • Rollbacks

Consistency

SQL Consistency

SQL Consistency

  • Schema
  • Constraint
  • Fan Trap
NoSQL Consistency

NoSQL Consistency

  • Eventual Consistency
  • Sequential Consistency
  • Strong Consistency

Strong Eventual Consistency

  • Strong Eventual Consistency
  • Quorum Replication
  • (Dotted) Vector Clocks
  • Chain Replication

Isolation

Isolation

  • Race Conditions
  • Lock
  • Concurrency

Durability

Durability

  • High Watermark
  • Checkpoint
  • Write Ahead Log

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay