LLDCoding - Master LLD and Concurrency

WhatsAppYouTube
Buy Course

LLDCoding - Master LLD and Concurrency

Design (LLD) distributed search engine - Machine Coding

Subhahu Jain's photo
Subhahu Jain
·Jan 15, 2023·

8 min read

Table of contents

  • Issues in Above Design
  • 1️⃣ Singleton Implementation Is NOT Thread-Safe
    • Current Code
    • Problems
    • Solution
  • 2️⃣ servers List Is Not Thread-Safe (Critical)
    • Current
    • Concurrent Failure Scenarios
    • Outcomes
    • Expected
    • Solution
  • 3️⃣ RoundRobinStrategy Is NOT Thread-Safe
    • Current
    • Problem
    • Real Production Symptom
    • Solution
  • 4️⃣ Health Is Checked Too Late (Routing Bug)
    • Current
    • Issues
    • Correct Behavior
    • Solution
  • 5️⃣ LeastConnections Strategy Is Logically Broken
    • Code
    • Problems
    • Concurrency Bug
    • Solution
  • 6️⃣ No Session Persistence Implementation
    • Feature Claimed
    • Reality
    • Missing
    • Solution
  • 7️⃣ Observer Pattern for Health Is Incomplete
    • Problem
    • Real Systems
    • Solution
  • 8️⃣ No Fault Tolerance for Load Balancer Itself
    • Single Point of Failure
    • Missing
    • Solution
  • 9️⃣ Decorator & Proxy Patterns Are Claimed but Not Applied
    • Claimed
    • Reality
    • Solution
  • 🔟 No Backpressure or Overload Protection
    • Missing
    • Failure Mode
    • Solution
  • 1️⃣1️⃣ No Metrics = Blind System
    • Missing Metrics
    • Solution
  • 1️⃣2️⃣ Request Object Is Undefined (Design Gap)
    • Current
    • Missing
    • Solution
JavaScriptPythonGeneral ProgrammingProgramming BlogsAWS

©2026 LLDCoding - Master LLD and Concurrency

Publish with Hashnode

Powered by Hashnode - Home for tech writers and readers