Arslan Ahmad

220 posts

Arslan Ahmad banner
Arslan Ahmad

Arslan Ahmad

@arslan_ah

Empowering Engineers to Ace Coding and System Design Interviews | Creator of 'Grokking' Course Series | Founder Design Gurus

Seattle, WA Katılım Nisan 2009
319 Takip Edilen1.3K Takipçiler
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝗦𝗰𝗮𝗹𝗮𝗯𝗶𝗹𝗶𝘁𝘆 𝗶𝘀 𝘄𝗵𝗲𝗿𝗲 𝗺𝗼𝘀𝘁 𝘀𝘆𝘀𝘁𝗲𝗺 𝗱𝗲𝘀𝗶𝗴𝗻 𝗶𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝘀 𝗮𝗿𝗲 𝘄𝗼𝗻 𝗼𝗿 𝗹𝗼𝘀𝘁. Here are the 𝟭𝟮 𝘀𝗰𝗮𝗹𝗮𝗯𝗶𝗹𝗶𝘁𝘆 𝗰𝗼𝗻𝗰𝗲𝗽𝘁𝘀 every engineer should master. Ref: 👉 designgurus.io/course/grokkin…
Arslan Ahmad tweet media
English
0
0
0
46
Arslan Ahmad
Arslan Ahmad@arslan_ah·
When a message fails to be processed, what do you do? Drop it? Retry forever? Neither. You send it to a dead letter queue. They sit there, out of the main flow, waiting for a human to look at them. Reference: Grokking System Design Interview - designgurus.io/course/grokkin…
Arslan Ahmad tweet media
English
0
1
2
78
Arslan Ahmad
Arslan Ahmad@arslan_ah·
After reviewing 64 system design interview questions across 4 popular courses, I narrowed it down to the 𝟮𝟱 𝗜'𝗱 𝗮𝗰𝘁𝘂𝗮𝗹𝗹𝘆 𝘀𝘁𝘂𝗱𝘆. designgurus.io/blog/system-de…
English
0
3
7
112
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝟏𝟐 𝐌𝐮𝐬𝐭 𝐃𝐨 𝐂𝐚𝐬𝐞 𝐒𝐭𝐮𝐝𝐢𝐞𝐬 𝐟𝐨𝐫 𝐒𝐨𝐟𝐭𝐰𝐚𝐫𝐞 𝐄𝐧𝐠𝐢𝐧𝐞𝐞𝐫𝐬 𝐭𝐨 𝐏𝐫𝐞𝐩𝐚𝐫𝐞 𝐟𝐨𝐫 𝐒𝐲𝐬𝐭𝐞𝐦 𝐃𝐞𝐬𝐢𝐠𝐧 𝐈𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 designgurus.substack.com/t/system-desig… #SystemDesign
Arslan Ahmad tweet media
English
5
1
7
149
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝗕𝗮𝘁𝗰𝗵 𝘃𝘀. 𝗦𝘁𝗿𝗲𝗮𝗺 𝘃𝘀. 𝗟𝗮𝗺𝗯𝗱𝗮: 𝗧𝗵𝗲 𝗗𝗮𝘁𝗮 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲 𝗖𝗵𝗲𝗮𝘁 𝗦𝗵𝗲𝗲𝘁 In system design, we are always fighting a war between Latency (Speed) and Accuracy (Completeness). You want data instantly, but you also want it to be perfect. Usually, you can't have both. Here is how the top 3 patterns solve this trade-off: 𝟭. 𝗕𝗮𝘁𝗰𝗵 𝗣𝗿𝗼𝗰𝗲𝘀𝘀𝗶𝗻𝗴 The "Slow & Steady" approach. How it works: Collects data over time and processes it in big chunks (e.g., every 2 hours). Pros: High accuracy, simple logic, easy to fix errors (just re-run the batch). Cons: High Latency. You are always looking at old data. 𝟮. 𝗦𝘁𝗿𝗲𝗮𝗺 𝗣𝗿𝗼𝗰𝗲𝘀𝘀𝗶𝗻𝗴 The "Need for Speed" approach. How it works: Processes every event the instant it arrives. Pros: Low Latency. Real-time dashboards. Cons: Complexity. Handling late-arriving data and ensuring "exactly-once" processing is hard. 𝟯. 𝗧𝗵𝗲 𝗟𝗮𝗺𝗯𝗱𝗮 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲 The "Best of Both Worlds" approach. How it works: Runs BOTH Batch and Stream in parallel. Batch Layer: Processes all history perfectly. Speed Layer: Processes recent data quickly (approximate). Serving Layer: Merges the two (Total = Batch + Speed). The Trade-off: You have to write your code twice (Two codebases). If you want to simplify Lambda, look into the 𝗞𝗮𝗽𝗽𝗮 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲, which treats everything (even history) as a stream. Read full post: designgurus.substack.com/p/batch-vs-str… #SystemDesign #DataEngineering #BigData #Architecture #TechTips
Arslan Ahmad tweet media
English
1
1
9
129
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝗧𝗵𝗲 𝗲𝗿𝗮 𝗼𝗳 𝗱𝗿𝗮𝘄𝗶𝗻𝗴 𝗮 𝘀𝗶𝗺𝗽𝗹𝗲 𝗟𝗼𝗮𝗱 𝗕𝗮𝗹𝗮𝗻𝗰𝗲𝗿 𝗶𝘀 𝗼𝘃𝗲𝗿. Top-tier companies now expect you to understand failure modes, consistency challenges, and intricate trade-offs. To pass the bar, you need a mental framework for these 𝟯𝟬 𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀. Here is the breakdown: 🔍 𝟭. 𝗗𝗮𝘁𝗮 𝗜𝗻𝘁𝗲𝗴𝗿𝗶𝘁𝘆 • Bloom Filters: Use for probabilistic existence checks (e.g., username availability). • Merkle Trees: Use to efficiently sync large datasets across nodes. 🔄 𝟮. 𝗗𝗶𝘀𝘁𝗿𝗶𝗯𝘂𝘁𝗲𝗱 𝗧𝗿𝗮𝗻𝘀𝗮𝗰𝘁𝗶𝗼𝗻𝘀 • Saga Pattern: Manages long-running processes across microservices using compensating transactions. • CQRS: Separates your read and write models to optimize for complex queries. 🛡️ 𝟯. 𝗥𝗲𝘀𝗶𝗹𝗶𝗲𝗻𝗰𝗲 • Circuit Breaker: Stops requests to a failing service to prevent cascading failure. • Bulkhead Pattern: Isolates thread pools so one slow feature doesn't crash the whole app. 💾 𝟰. 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲 𝗜𝗻𝘁𝗲𝗿𝗻𝗮𝗹𝘀 • LSM Trees: Optimized for high write throughput (e.g., Cassandra). • WAL (Write-Ahead Logging): Ensures data survives a crash by logging before applying. ⚖️ 𝟱. 𝗦𝗰𝗮𝗹𝗶𝗻𝗴 • Consistent Hashing: Minimizes data movement when adding/removing servers. • Power of Two Choices: A load balancing strategy that drastically reduces queue lengths. Mastering these trade-offs is what separates a mid-level engineer from a true system architect. Read full post: designgurus.substack.com/p/crack-the-to… #SystemDesign #SoftwareArchitecture #DistributedSystems #Engineering #TechCareers
Arslan Ahmad tweet media
English
1
1
8
70
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝗧𝗵𝗲 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝗰𝗲 𝗯𝗲𝘁𝘄𝗲𝗲𝗻 𝗟𝟯 𝗮𝗻𝗱 𝗟𝟱 𝗶𝘀 𝗦𝘆𝘀𝘁𝗲𝗺 𝗗𝗲𝘀𝗶𝗴𝗻. When you are a Junior (𝟎-𝟐 𝐘𝐎𝐄), your job is to write clean, working classes. You focus on 𝐒𝐎𝐋𝐈𝐃 𝐏𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞𝐬 and 𝐎𝐛𝐣𝐞𝐜𝐭-𝐎𝐫𝐢𝐞𝐧𝐭𝐞𝐝 𝐃𝐞𝐬𝐢𝐠𝐧. When you become a 𝐒𝐞𝐧𝐢𝐨𝐫 (𝟓+ 𝐘𝐎𝐄), your job changes. You stop designing Classes and start designing 𝐀𝐫𝐜𝐡𝐢𝐭𝐞𝐜𝐭𝐮𝐫𝐞𝐬. You stop worrying about "How to write this function" and start worrying about: 🔹 Scalability (Can we handle 10M users?) 🔹 Availability (What happens if AWS goes down?) 🔹 Microservices (How do we split this Monolith?) Many engineers get stuck at L4 because they keep practicing Junior skills. They get better at coding, but they don't get better at designing. I’ve attached a cheat sheet from 𝐃𝐞𝐬𝐢𝐠𝐧𝐆𝐮𝐫𝐮𝐬.𝐢𝐨 that shows exactly which resources you need to bridge that gap. Save this image. It’s your curriculum for the next 5 years. Ref: 1) Grokking the System Design Interview: designgurus.io/course/grokkin… 2) Grokking the System Design Interview II: designgurus.io/course/grokkin… #Engineering #TechCareers #SystemDesign #Developers #Management
Arslan Ahmad tweet media
English
1
2
8
152
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝗪𝗵𝘆 𝗶𝘀 𝗥𝗲𝗱𝗶𝘀 𝗳𝗮𝘀𝘁𝗲𝗿 𝘁𝗵𝗮𝗻 𝗠𝗲𝗺𝗰𝗮𝗰𝗵𝗲𝗱 𝗶𝗳 𝗶𝘁 𝗼𝗻𝗹𝘆 𝘂𝘀𝗲𝘀 𝟭 𝗖𝗣𝗨 𝗖𝗼𝗿𝗲? This question trips up candidates in System Design interviews constantly. We are taught that 𝐌𝐮𝐥𝐭𝐢𝐭𝐡𝐫𝐞𝐚𝐝𝐢𝐧𝐠 = 𝐒𝐩𝐞𝐞𝐝. Memcached is Multithreaded. It uses every core you give it. Redis is Single-Threaded. It uses one core. So, why does Redis win? Because 𝐓𝐡𝐫𝐞𝐚𝐝𝐬 𝐚𝐫𝐞 𝐞𝐱𝐩𝐞𝐧𝐬𝐢𝐯𝐞. In a multithreaded system, you need Locks to stop two threads from writing to the same data at once. Managing locks takes time. Switching between threads (Context Switching) takes CPU cycles. Redis removes all of that. It uses an Event Loop. It processes commands sequentially, one by one, with zero overhead. It is a Formula 1 car with no passengers. But there is a catch: Because it is single-threaded, One Slow Command blocks the entire server. If you run a heavy query in Redis, you freeze your app for everyone. Understanding why a tool works is more important than knowing how to use it. I wrote a guide comparing the internals of Redis, Memcached, and Hazelcast. 𝐂𝐡𝐞𝐜𝐤 𝐢𝐭 𝐨𝐮𝐭: designgurus.substack.com/p/redis-vs-mem… #Engineering #Coding #Database #DevOps #Performance
English
2
0
9
85
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝗜𝗳 𝘆𝗼𝘂 𝗰𝗮𝗻 𝗱𝗲𝘀𝗶𝗴𝗻 𝗪𝗵𝗮𝘁𝘀𝗔𝗽𝗽, 𝘆𝗼𝘂 𝗰𝗮𝗻 𝗱𝗲𝘀𝗶𝗴𝗻 𝗙𝗮𝗰𝗲𝗯𝗼𝗼𝗸 𝗠𝗲𝘀𝘀𝗲𝗻𝗴𝗲𝗿. System Design isn't about memorizing 100 different architectures. It's about recognizing 𝗣𝗮𝘁𝘁𝗲𝗿𝗻𝘀. I created this 𝟰𝟱-𝗠𝗶𝗻𝘂𝘁𝗲 𝗚𝘂𝗶𝗱𝗲 because I realized most interview questions fall into just a few buckets: 𝟭. 𝗧𝗵𝗲 "𝗥𝗲𝗮𝗹-𝗧𝗶𝗺𝗲" 𝗕𝘂𝗰𝗸𝗲𝘁 Examples: 𝗪𝗵𝗮𝘁𝘀𝗔𝗽𝗽, 𝗦𝗹𝗮𝗰𝗸, 𝗟𝗶𝘃𝗲 𝗩𝗶𝗱𝗲𝗼. Core concepts: WebSockets, Long Polling, UDP vs TCP. 𝟮. 𝗧𝗵𝗲 "𝗛𝗲𝗮𝘃𝘆 𝗥𝗲𝗮𝗱" 𝗕𝘂𝗰𝗸𝗲𝘁 Examples: 𝗦𝗽𝗼𝘁𝗶𝗳𝘆, 𝗡𝗲𝘁𝗳𝗹𝗶𝘅, 𝗬𝗼𝘂𝗧𝘂𝗯𝗲. Core concepts: Caching strategies, CDNs, Data Replication. 𝟯. 𝗧𝗵𝗲 "𝗧𝗿𝗮𝗻𝘀𝗮𝗰𝘁𝗶𝗼𝗻𝗮𝗹" 𝗕𝘂𝗰𝗸𝗲𝘁 Examples: 𝗘-𝗰𝗼𝗺𝗺𝗲𝗿𝗰𝗲 𝗣𝗹𝗮𝘁𝗳𝗼𝗿𝗺, 𝗣𝗮𝘆𝗺𝗲𝗻𝘁 𝗚𝗮𝘁𝗲𝘄𝗮𝘆. Core concepts: ACID compliance, Locking, Consistency over Availability. Stop trying to memorize every feature of Spotify. Start understanding the underlying Building Blocks. We break down exactly how to manage your time across these problems in my latest article. Read it here: designgurus.substack.com/p/how-to-desig… #Engineering #DesignGurus #Coding #Developers #SystemDesign
Arslan Ahmad tweet media
English
0
0
10
124
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝗧𝘄𝗼 𝗶𝘀 𝗼𝗻𝗲. 𝗢𝗻𝗲 𝗶𝘀 𝗻𝗼𝗻𝗲. This is the golden rule of 𝗛𝗶𝗴𝗵 𝗔𝘃𝗮𝗶𝗹𝗮𝗯𝗶𝗹𝗶𝘁𝘆. If you rely on a single database, you don't have a database. You have a ticking time bomb. To build systems that never sleep, you need to master these 5 layers of defense: ✅ 1. Redundancy: Duplicating every critical component. ✅ 2. Replication: Copying data in real-time so nothing is lost. ✅ 3. Load Balancing: Detecting failures and re-routing traffic instantly. ✅ 4. Rate Limiting: Protecting your servers from traffic spikes. ✅ 5. Geo-Distribution: Surviving entire regional outages (like a hurricane). I broke down exactly how these pieces fit together in my latest article. Read it here: designgurus.substack.com/p/the-high-ava… #SystemDesign #Architecture #TechTips #Programming #SoftwareEngineering
Arslan Ahmad tweet media
English
0
1
8
99
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝟭𝟲 𝗔𝗣𝗜 𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀 𝘁𝗵𝗮𝘁 𝘀𝗲𝗽𝗮𝗿𝗮𝘁𝗲 𝗝𝘂𝗻𝗶𝗼𝗿𝘀 𝗳𝗿𝗼𝗺 𝗦𝗲𝗻𝗶𝗼𝗿𝘀. Most engineers just know "GET" and "POST." Senior engineers know Idempotency and Throttling. Here is the 2026 Cheat Sheet for modern APIs. I’ve broken the 16 concepts into 4 mental buckets: 𝟭. 𝗧𝗵𝗲 𝗖𝗼𝗺𝗺𝘂𝗻𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗦𝘁𝘆𝗹𝗲𝘀 (𝗧𝗵𝗲 "𝗛𝗼𝘄") • REST: The classic. Simple HTTP actions (GET, POST, DELETE). • GraphQL: The flexible one. The client asks for exactly what it wants. Great for mobile. • gRPC: The speed demon. Uses binary protobufs for ultra-fast microservice talk. • Webhooks: Don't call us, we'll call you. The server pushes updates automatically. 𝟮. 𝗧𝗵𝗲 𝗧𝗿𝗮𝗳𝗳𝗶𝗰 𝗖𝗼𝗽𝘀 (𝗧𝗵𝗲 "𝗖𝗼𝗻𝘁𝗿𝗼𝗹") • API Gateway: The single front door for all requests. Handles auth, routing, and logging. • Rate Limiting: Stops abuse by blocking users who send too many requests. • Throttling: Slows down heavy users instead of blocking them. A gentler approach. 𝟯. 𝗧𝗵𝗲 "𝗠𝗮𝗸𝗲 𝗶𝘁 𝗦𝗮𝗳𝗲 & 𝗙𝗮𝘀𝘁" 𝗕𝘂𝗰𝗸𝗲𝘁 • Idempotency: Safely retrying a request (like payment) without causing duplicate actions. • Caching Headers: Telling the browser to store data locally so it loads instantly next time. • Timeouts: Preventing a slow database from hanging your entire system forever. • Pagination: Breaking 50,000 results into manageable pages of 20. 𝟰. 𝗧𝗵𝗲 𝗙𝗼𝘂𝗻𝗱𝗮𝘁𝗶𝗼𝗻𝗮𝗹 𝗕𝗮𝘀𝗶𝗰𝘀 • AuthN vs. AuthZ: Authentication is "Who are you?". Authorization is "What are you allowed to do?". • Versioning: Evolving your API (v1 -> v2) without breaking old apps. • JSON: The standard, easy-to-read format for API responses. • HTTP Status Codes: The universal language for success (200) or failure (404, 500). System design is about knowing which tool to use for which problem. I cover all 16 concepts in the full guide. 𝗥𝗲𝗮𝗱 𝗶𝘁 𝗵𝗲𝗿𝗲: designgurus.substack.com/p/16-must-know… ♻️ 𝗥𝗲𝗽𝗼𝘀𝘁 to save a developer from failing an interview. #SystemDesign #SoftwareEngineering #APIDesign #Backend #TechCareers
Arslan Ahmad tweet media
English
0
2
7
158
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝗬𝗼𝘂 𝗵𝗮𝘃𝗲 𝟰𝟱 𝗺𝗶𝗻𝘂𝘁𝗲𝘀 𝘁𝗼 𝗱𝗲𝘀𝗶𝗴𝗻 𝗪𝗵𝗮𝘁𝘀𝗔𝗽𝗽. 𝗚𝗼. Most engineers panic. They start drawing load balancers immediately. Senior engineers pause. They know that 45 minutes isn't enough to build the whole thing, so they stick to a strict script. Whether you are designing 𝗦𝗽𝗼𝘁𝗶𝗳𝘆, 𝗡𝗼𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻𝘀 service, or an 𝗘-𝗰𝗼𝗺𝗺𝗲𝗿𝗰𝗲 𝗔𝗽𝗽, the blueprint is always the same. Here is how you strictly manage your time to pass: ⏱️ 𝗠𝗶𝗻 𝟬-𝟱: 𝗖𝗹𝗮𝗿𝗶𝗳𝘆 𝗥𝗲𝗾𝘂𝗶𝗿𝗲𝗺𝗲𝗻𝘁𝘀 Don't guess. Ask. • "Is this a 1-on-1 chat or group chat?" • "Do we need to store messages forever?" Your goal: Define the MVP. ⏱️ 𝗠𝗶𝗻 𝟱-𝟭𝟬: 𝗧𝗵𝗲 𝗕𝗮𝗰𝗸-𝗼𝗳-𝗘𝗻𝘃𝗲𝗹𝗼𝗽𝗲 𝗠𝗮𝘁𝗵 Show you understand scale. • "50M daily users × 100 messages = 5 Billion messages/day." • "That implies 50TB of storage. We need a Wide-Column Store, not MySQL." ⏱️ 𝗠𝗶𝗻 𝟭𝟬-𝟮𝟬: 𝗛𝗶𝗴𝗵-𝗟𝗲𝘃𝗲𝗹 𝗗𝗲𝘀𝗶𝗴𝗻 (𝗛𝗟𝗗) Draw the "Happy Path." • Client ➝ Load Balancer ➝ API Gateway ➝ Service ➝ Database. Keep it simple. Don't add complexity yet. ⏱️ 𝗠𝗶𝗻 𝟮𝟬-𝟰𝟬: 𝗧𝗵𝗲 𝗗𝗲𝗲𝗽 𝗗𝗶𝘃𝗲 (𝗧𝗵𝗲 "𝗠𝗲𝗮𝘁") Pick the hardest problem and solve it. • For 𝗦𝗽𝗼𝘁𝗶𝗳𝘆: How do we stream audio efficiently? (CDN/Caching). • For 𝗪𝗵𝗮𝘁𝘀𝗔𝗽𝗽: How do we handle real-time connection? (WebSockets). • For 𝗘-𝗰𝗼𝗺𝗺𝗲𝗿𝗰𝗲: How do we prevent overselling inventory? (ACID Transactions). ⏱️ 𝗠𝗶𝗻 𝟰𝟬-𝟰𝟱: 𝗕𝗼𝘁𝘁𝗹𝗲𝗻𝗲𝗰𝗸𝘀 & 𝗧𝗿𝗮𝗱𝗲-𝗼𝗳𝗳𝘀 Critique your own design before the interviewer does. • "This works, but we have a Single Point of Failure here..." I have put together visual guides for the 𝟱 𝗠𝗼𝘀𝘁 𝗖𝗼𝗺𝗺𝗼𝗻 𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄 𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻𝘀 shown below. (designgurus.substack.com/t/system-desig…) Which one do you find the hardest? #SystemDesign #InterviewPrep #SoftwareArchitecture #Engineering #TechCareers
Arslan Ahmad tweet media
English
0
0
4
60
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝐇𝐨𝐰 𝐭𝐨 𝐢𝐦𝐩𝐫𝐨𝐯𝐞 𝐝𝐚𝐭𝐚𝐛𝐚𝐬𝐞 𝐩𝐞𝐫𝐟𝐨𝐫𝐦𝐚𝐧𝐜𝐞? Here are some of the top ways to improve database performance (full post: designgurus.substack.com/p/why-your-app…): 1. Indexing 2. Materialized Views 3. Vertical Scaling 4. Denormalization 5. Database Caching 6. Replication 7. Sharding 8. Partitioning 9. Query Optimization Rewrite and fine-tune queries to execute more efficiently. 📌9 Proven Strategies to Boost Database Performance - designgurus.substack.com/p/why-your-app… 📌 Grokking the System Design Interview - lnkd.in/giwyzfkT
GIF
English
0
2
6
105
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝗪𝗵𝗮𝘁 𝗵𝗮𝗽𝗽𝗲𝗻𝘀 𝘁𝗼 𝗬𝗼𝘂𝗧𝘂𝗯𝗲'𝘀 𝘀𝗲𝗿𝘃𝗲𝗿𝘀 𝘄𝗵𝗲𝗻 𝗠𝗿𝗕𝗲𝗮𝘀𝘁 𝘂𝗽𝗹𝗼𝗮𝗱𝘀 𝗮 𝘃𝗶𝗱𝗲𝗼? It is the ultimate stress test. Within seconds, millions of users request the exact same file: segment_0.m4s. If YouTube handled this like a normal web app, their backend would melt. 10 million requests would hit the origin. The database would lock up. The site would crash. But YouTube doesn't crash. Why? Because of a pattern called 𝗥𝗲𝗾𝘂𝗲𝘀𝘁 𝗖𝗼𝗮𝗹𝗲𝘀𝗰𝗶𝗻𝗴 (or Request Collapsing). Here is how it works at the Edge Layer: 1️⃣ The first user asks for the video. The Edge server sees a "Cache Miss" and calls the backend. 2️⃣ While that fetch is happening, 10,000 more users ask for the same video. 3️⃣ Instead of sending 10,000 calls to the backend, the Edge server puts those users in a Wait Queue. 4️⃣ When the first request returns, the Edge server serves that single payload to all 10,001 users instantly. The backend only saw 1 request. The users saw 10,000 successes. This is just one of the 50 optimizations required to build a system at this scale. I just wrote a 45-minute guide on Designing YouTube. It covers Colossus File System, Custom Silicon (VCUs), and Edge Caching. Check it out here: designgurus.substack.com/p/design-youtu… #Engineering #Tech #SystemDesign #Scaling #BackendDevelopment
Arslan Ahmad tweet media
English
0
0
3
47
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝗦𝗤𝗟 𝗶𝘀 𝗮𝗯𝗼𝘂𝘁 "𝗪𝗵𝗮𝘁" 𝘆𝗼𝘂 𝘀𝘁𝗼𝗿𝗲. 𝗡𝗼𝗦𝗤𝗟 𝗶𝘀 𝗮𝗯𝗼𝘂𝘁 "𝗛𝗼𝘄" 𝘆𝗼𝘂 𝗮𝗰𝗰𝗲𝘀𝘀 𝗶𝘁. If you want to understand modern databases, you need to speak the language. Here are 6 terms from my new guide that every engineer should know: ✅ 𝗞𝗲𝘆 𝗩𝗮𝗹𝘂𝗲 𝗦𝘁𝗼𝗿𝗲: The fastest database. No queries, just lookups. ✅ 𝗚𝗿𝗮𝗽𝗵 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲: Built for relationships (Likes, Follows), not rows. ✅ 𝗧𝗧𝗟 (𝗧𝗶𝗺𝗲 𝗧𝗼 𝗟𝗶𝘃𝗲): Data that self-destructs after a set time. Perfect for caching. ✅ 𝗔𝘁𝗼𝗺𝗶𝗰 𝗢𝗽𝗲𝗿𝗮𝘁𝗶𝗼𝗻𝘀: Updating a counter without race conditions. ✅ 𝗦𝗰𝗵𝗲𝗺𝗮 𝗙𝗿𝗲𝗲: Adding new fields without breaking the old code. ✅ 𝗥𝗲𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻: Keeping copies so the system survives a crash. Don't let the jargon intimidate you. It's just about tradeoffs. Read the full breakdown of all 𝟭𝟲 𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀 here: designgurus.substack.com/p/16-nosql-con… #SystemDesign #Tech #Learning #Programming #CareerGrowth
Arslan Ahmad tweet media
English
0
0
4
54
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝐓𝐡𝐞 𝐡𝐚𝐫𝐝𝐞𝐬𝐭 𝐩𝐚𝐫𝐭 𝐨𝐟 𝐝𝐞𝐬𝐢𝐠𝐧𝐢𝐧𝐠 𝐖𝐡𝐚𝐭𝐬𝐀𝐩𝐩 𝐢𝐬𝐧’𝐭 𝐭𝐡𝐞 𝐦𝐞𝐬𝐬𝐚𝐠𝐞𝐬. If I asked you to design a chat app for 1 Billion users, you’d probably focus on the message delivery. 🔷 50 Billion messages a day. 🔷 1.5 Million writes per second. 🔷 "Use Cassandra and Kafka." Done. 𝐖𝐫𝐨𝐧𝐠. You missed the real monster. The "𝐏𝐫𝐞𝐬𝐞𝐧𝐜𝐞" system (showing who is Online/Offline) generates 𝟑𝟑 𝐌𝐢𝐥𝐥𝐢𝐨𝐧 𝐫𝐞𝐪𝐮𝐞𝐬𝐭𝐬 𝐩𝐞𝐫 𝐬𝐞𝐜𝐨𝐧𝐝. That is ~20x the load of the actual messaging traffic. Why? Because 1 Billion active users send a "heartbeat" every 30 seconds just to say, "I'm still here." If you try to write those updates to a standard database, your system will melt. 𝐇𝐞𝐫𝐞 𝐢𝐬 𝐭𝐡𝐞 𝐒𝐞𝐧𝐢𝐨𝐫 𝐄𝐧𝐠𝐢𝐧𝐞𝐞𝐫 𝐬𝐨𝐥𝐮𝐭𝐢𝐨𝐧: 1️⃣ The "Heartbeat" Strategy: Do not touch the hard disk. Use a Redis Cluster sharded by UserID. • User pings server. • Server sets: user:123:status "online" (TTL 45s). • If the ping stops, the key expires. The user is "Offline." 2️⃣ The Protocol Forget REST. You cannot poll for status 33M times a second. Use 𝐖𝐞𝐛𝐒𝐨𝐜𝐤𝐞𝐭𝐬. The server "pushes" status updates only to the specific friends currently looking at the chat screen. 𝐓𝐡𝐞 𝐋𝐞𝐬𝐬𝐨𝐧: In System Design, the feature that seems the smallest (a little green dot) is often the one that breaks the architecture. 𝐖𝐡𝐚𝐭’𝐬 𝐭𝐡𝐞 𝐡𝐢𝐠𝐡𝐞𝐬𝐭 𝐐𝐏𝐒 𝐬𝐲𝐬𝐭𝐞𝐦 𝐲𝐨𝐮’𝐯𝐞 𝐞𝐯𝐞𝐫 𝐰𝐨𝐫𝐤𝐞𝐝 𝐨𝐧? 👉 Read the full post on designing WhatsApp in system design interviews: substack.com/home/post/p-18… #SystemDesign #WhatsApp #Scalability #Engineering #TechInterview
Arslan Ahmad tweet media
English
0
0
3
49
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝟏𝟔 𝐂𝐚𝐜𝐡𝐢𝐧𝐠 𝐑𝐞𝐥𝐚𝐭𝐞𝐝 𝐂𝐨𝐧𝐜𝐞𝐩𝐭𝐬 𝐄𝐯𝐞𝐫𝐲 𝐒𝐨𝐟𝐭𝐰𝐚𝐫𝐞 𝐄𝐧𝐠𝐢𝐧𝐞𝐞𝐫 𝐌𝐮𝐬𝐭 𝐊𝐧𝐨𝐰 Read full post: substack.com/home/post/p-18… Cache Hit. Requested data found immediately Cache Miss. Data not found in cache TTL. Cache entry expiry time Eviction Policy. Method removing older entries LRU. Remove least recently used LFU. Remove least frequently used Write-Through Cache. Write to cache and store Write-Back Cache. Write to store later Write-Around Cache. Bypass cache on writes Distributed Cache. Shared cache across nodes Local Cache. Cache stored in memory Cache Stampede. Many requests rebuilding cache Negative Caching. Save failed lookups Lazy Loading. Load data only when needed Pre-Warming. Fill cache before traffic Cache Invalidation. Remove outdated cached entries Read full post: substack.com/home/post/p-18… #systemdesign #caching #interview
Arslan Ahmad tweet media
English
0
0
5
85
Arslan Ahmad
Arslan Ahmad@arslan_ah·
𝟏𝟔 𝐍𝐨𝐧-𝐅𝐮𝐧𝐜𝐭𝐢𝐨𝐧𝐚𝐥 𝐑𝐞𝐪𝐮𝐢𝐫𝐞𝐦𝐞𝐧𝐭𝐬 𝐑𝐞𝐥𝐚𝐭𝐞𝐝 𝐂𝐨𝐧𝐜𝐞𝐩𝐭𝐬 𝐄𝐯𝐞𝐫𝐲 𝐒𝐨𝐟𝐭𝐰𝐚𝐫𝐞 𝐄𝐧𝐠𝐢𝐧𝐞𝐞𝐫 𝐌𝐮𝐬𝐭 𝐊𝐧𝐨𝐰 Join by Substack to read more: designgurus.substack.com 1. Scalability: System grows with more users. 2. High Availability: System stays up most of the time. 3. Low Latency: Fast response to each request. 4. High Throughput: Handles many requests per second. 5. Reliability: System behaves the same every time. 6. Fault Tolerance: Keeps running even if parts fail. 7. Resilience: Recovers from failures quickly. 8. Consistency: Same data seen by all clients. 9. Data Durability: Data stays safe after writes. 10. Data Integrity: Data stays correct and unchanged. 11. Security: Protects data and access. 12. Privacy: Keeps personal data protected. 13. Observability: Easy to measure and track system health. 14. Modularity: Parts can be changed without risk. 15. Extensibility: Easy to add new features. 16. Backward Compatibility: Old clients keep working after changes. Join by Substack to read more: designgurus.substack.com
Arslan Ahmad tweet media
English
0
1
5
106