LeetDezine
Deep Dives
Initializing search
    • Home
    • Start Here
    • Concepts
    • Back of Envelope
    • Foundation
    • Ascent
    • Expedition
    • Summit
    • Battleground
    • Home
    • Start Here
    • Concepts
    • Back of Envelope
    • Foundation
    • Ascent
      • Notification System
      • Pastebin
        • System Requirements
        • Deep Dives
          • Short Code Generation
          • Database
          • Caching
          • Peak Traffic
          • Fault Isolation
          • Async S3 Upload
          • Expiry Cleanup Job
          • Updated Architecture
        • Observability
    • Expedition
    • Summit
    • Battleground
    1. Home
    2. Ascent
    3. Pastebin
    4. Deep Dives
    DD

    Pastebin · Deep Dives

    Deep Dives

    Eight deep dives — short code generation, database, caching, peak traffic, fault isolation, async S3 upload, expiry cleanup, and final architecture.

    Short Code Generation
    Requirements, generation approaches, Redis counter, and custom alias support.
    Redis CounterCustom AliasCollision
    Open →
    Database
    DB choice, content-addressable storage, ref counting, schema design, write/read/delete flows, and sharding.
    CASRef CountingSchemaSharding
    Open →
    Caching
    Why cache, what to cache, cache sizing, and invalidation strategy.
    RedisCache SizingInvalidation
    Open →
    Peak Traffic
    Hot key problem for viral pastes — detection, mitigation, and local cache approach.
    Hot KeyViral PasteLocal Cache
    Open →
    Fault Isolation
    Service split, DB standby, and circuit breaker to contain failures.
    Service SplitDB StandbyCircuit Breaker
    Open →
    Async S3 Upload
    Why async, failure problem, state machine, retry strategy, and read path behaviour.
    S3State MachineAsyncRetry
    Open →
    Expiry Cleanup Job
    Cleanup flow, distributed workers, watchdog process, and indexing strategy for expired pastes.
    TTLDistributed WorkersWatchdogIndexing
    Open →
    Updated Architecture
    Full system diagram after all deep dives applied — every component justified.
    Final DiagramFull Architecture
    Open →