[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"content:legacy:page:\u002Finterviews\u002Fsystem-design":3,"content:legacy:navigation":209,"content:legacy:surround:\u002Finterviews\u002Fsystem-design":537},{"id":4,"title":5,"body":6,"description":196,"extension":197,"icon":198,"meta":199,"modifiedAt":200,"navigation":201,"path":202,"publishedAt":203,"seo":204,"sitemap":205,"stem":206,"updatedAt":207,"__hash__":208},"interviews\u002Finterviews\u002Fsystem-design.md","System Design",{"type":7,"value":8,"toc":194},"minimark",[9,32,50,68,86,104,122,140,158,176],[10,11,12,23],"collapsible",{},[13,14,16],"template",{"v-slot:title":15},"",[17,18,19],"ol",{},[20,21,22],"li",{},"How should you begin a system design interview?",[13,24,25,29],{"v-slot:content":15},[26,27,28],"p",{},"Clarify users, core use cases, scale, latency and availability goals, data retention, consistency needs, security constraints, and what is explicitly out of scope. Estimate the dominant reads, writes, storage, and bandwidth.",[26,30,31],{},"Then propose a simple end-to-end design and deepen the areas that carry the most risk instead of drawing many components without a requirement.",[10,33,34,42],{},[13,35,36],{"v-slot:title":15},[17,37,39],{"start":38},2,[20,40,41],{},"How do vertical and horizontal scaling differ?",[13,43,44,47],{"v-slot:content":15},[26,45,46],{},"Vertical scaling gives one machine more CPU, memory, or storage and is operationally simple but has a ceiling and larger failure domain. Horizontal scaling adds instances and requires routing, statelessness or partitioned state, coordination, and distributed observability.",[26,48,49],{},"Most systems combine both and scale only where measurements justify the added complexity.",[10,51,52,60],{},[13,53,54],{"v-slot:title":15},[17,55,57],{"start":56},3,[20,58,59],{},"What makes caching hard?",[13,61,62,65],{"v-slot:content":15},[26,63,64],{},"The difficult parts are invalidation, freshness, stampedes, hot keys, eviction, and behavior when the cache fails. Choose cache-aside, write-through, or another pattern from ownership and consistency requirements.",[26,66,67],{},"Use bounded TTLs, protect misses with request coalescing or jitter, and ensure the source of truth can tolerate cache loss.",[10,69,70,78],{},[13,71,72],{"v-slot:title":15},[17,73,75],{"start":74},4,[20,76,77],{},"When should work be placed on a message queue?",[13,79,80,83],{"v-slot:content":15},[26,81,82],{},"Queues decouple producers from consumers, absorb bursts, and support asynchronous work such as email, media processing, or integrations. They add eventual completion, duplicate delivery, ordering limits, and operational state.",[26,84,85],{},"Consumers should be idempotent, retries bounded, poison messages isolated, and queue age monitored as a first-class service signal.",[10,87,88,96],{},[13,89,90],{"v-slot:title":15},[17,91,93],{"start":92},5,[20,94,95],{},"What does “exactly once” mean in practice?",[13,97,98,101],{"v-slot:content":15},[26,99,100],{},"Networks can lose acknowledgements and cause redelivery, so transport-level exactly-once claims do not automatically make a business effect happen once. Design for at-least-once delivery with idempotent effects, deduplication keys, unique constraints, or transactional coordination.",[26,102,103],{},"Define the scope carefully: message processing, database commit, and an external side effect are different boundaries.",[10,105,106,114],{},[13,107,108],{"v-slot:title":15},[17,109,111],{"start":110},6,[20,112,113],{},"Strong consistency versus eventual consistency: how do you choose?",[13,115,116,119],{"v-slot:content":15},[26,117,118],{},"Strong consistency simplifies invariants and fresh reads but may require coordination that raises latency or reduces availability during partitions. Eventual consistency improves decoupling and availability but exposes temporary divergence.",[26,120,121],{},"Decide per operation: balances and uniqueness may require stronger guarantees, while feeds, counters, or analytics may tolerate staleness with clear UX.",[10,123,124,132],{},[13,125,126],{"v-slot:title":15},[17,127,129],{"start":128},7,[20,130,131],{},"What is a single point of failure?",[13,133,134,137],{"v-slot:content":15},[26,135,136],{},"It is a component whose loss makes the service unavailable or incorrect. Redundancy alone is insufficient if replicas share power, region, configuration, credentials, or a control plane.",[26,138,139],{},"Map dependencies, use health-aware failover, test recovery, and compare recovery time and recovery point objectives with business requirements.",[10,141,142,150],{},[13,143,144],{"v-slot:title":15},[17,145,147],{"start":146},8,[20,148,149],{},"How would you design rate limiting?",[13,151,152,155],{"v-slot:content":15},[26,153,154],{},"Choose the identity and scope—user, API key, IP, tenant, or operation—then define burst and sustained limits. Token bucket supports bursts; sliding-window approaches approximate a rolling limit.",[26,156,157],{},"In distributed deployments, central stores improve consistency but add latency and dependency risk. Return clear limit headers and distinguish abuse protection from capacity control.",[10,159,160,168],{},[13,161,162],{"v-slot:title":15},[17,163,165],{"start":164},9,[20,166,167],{},"What data should capacity estimates include?",[13,169,170,173],{"v-slot:content":15},[26,171,172],{},"Estimate peak rather than average requests, read\u002Fwrite ratio, payload size, storage growth, retention, replication, cache hit rate, fan-out, and background traffic. State assumptions and use ranges when inputs are uncertain.",[26,174,175],{},"The goal is to identify likely bottlenecks and an order of magnitude, not to pretend an early estimate is exact.",[10,177,178,186],{},[13,179,180],{"v-slot:title":15},[17,181,183],{"start":182},10,[20,184,185],{},"How do you design observability for a distributed request?",[13,187,188,191],{"v-slot:content":15},[26,189,190],{},"Propagate a trace or correlation ID, emit service-level latency\u002Ferror\u002Ftraffic\u002Fsaturation metrics, record structured logs with safe context, and trace important cross-service paths.",[26,192,193],{},"Define service-level indicators and alerts around user impact. Dashboards without ownership or actionable thresholds do not provide reliable operations.",{"title":15,"searchDepth":38,"depth":38,"links":195},[],"System design interview questions about scale, caching, messaging, consistency, reliability, and capacity planning.","md","lucide:network",{},null,true,"\u002Finterviews\u002Fsystem-design","2026-09-21",{"title":5,"description":196},{"loc":202,"lastmod":203},"interviews\u002Fsystem-design","2026-09-21T22:49:35+07:00","Wm0IIF5rnUDu6GTkZkS1avhp2Q_hYlXIUfPlsI4WVNs",[210,361,469,484],{"title":211,"icon":212,"path":213,"stem":214,"children":215,"page":226},"Posts","fluent-color:data-bar-vertical-ascending-24","\u002Fposts","posts",[216,227,245,271,281,295,305,315,325,351],{"title":217,"icon":218,"redirect":219,"path":220,"stem":221,"children":222,"page":226},"Database","material-icon-theme:database","\u002Fposts\u002Fdatabase\u002Freplication-strategy","\u002Fposts\u002Fdatabase","posts\u002Fdatabase",[223],{"title":224,"path":219,"stem":225,"icon":200},"Database Replication strategy in large systems","posts\u002Fdatabase\u002Freplication-strategy",false,{"title":228,"icon":229,"redirect":230,"path":231,"stem":232,"children":233,"page":226},"Docker","vscode-icons:file-type-docker2","\u002Fposts\u002Fdocker\u002Fdocker-commands","\u002Fposts\u002Fdocker","posts\u002Fdocker",[234,237,241],{"title":235,"path":230,"stem":236,"icon":200},"Docker commands essentials","posts\u002Fdocker\u002Fdocker-commands",{"title":238,"path":239,"stem":240,"icon":200},"Some useful Dockerfile templates","\u002Fposts\u002Fdocker\u002Fdockerfile-templates","posts\u002Fdocker\u002Fdockerfile-templates",{"title":242,"path":243,"stem":244,"icon":200},"Setup Docker environment on Windows","\u002Fposts\u002Fdocker\u002Fsetup-docker-on-window","posts\u002Fdocker\u002Fsetup-docker-on-window",{"title":246,"icon":247,"redirect":248,"path":249,"stem":250,"children":251,"page":226},"Git & GitHub","material-icon-theme:git","\u002Fposts\u002Fgit\u002Fbrightly-decorate-graph","\u002Fposts\u002Fgit","posts\u002Fgit",[252,255,259,263,267],{"title":253,"path":248,"stem":254,"icon":200},"Brightly decorate your GitHub Graph","posts\u002Fgit\u002Fbrightly-decorate-graph",{"title":256,"path":257,"stem":258,"icon":200},"Download a specific folder on GitHub repository","\u002Fposts\u002Fgit\u002Fdownload-specific-folder","posts\u002Fgit\u002Fdownload-specific-folder",{"title":260,"path":261,"stem":262,"icon":200},"Syncing Git Tags across to other repositories","\u002Fposts\u002Fgit\u002Fsyncing-tags-across-repositories","posts\u002Fgit\u002Fsyncing-tags-across-repositories",{"title":264,"path":265,"stem":266,"icon":200},"Unlocking GitHub Achievement badges","\u002Fposts\u002Fgit\u002Funlocking-achievement-badges","posts\u002Fgit\u002Funlocking-achievement-badges",{"title":268,"path":269,"stem":270,"icon":200},"Essential Git commands every developer should master","\u002Fposts\u002Fgit\u002Fuseful-commands-like-pro","posts\u002Fgit\u002Fuseful-commands-like-pro",{"title":272,"icon":273,"redirect":274,"path":275,"stem":276,"children":277,"page":226},"Golang","material-icon-theme:go","\u002Fposts\u002Fgolang\u002Foptimizing-performance-with-pgo","\u002Fposts\u002Fgolang","posts\u002Fgolang",[278],{"title":279,"path":274,"stem":280,"icon":200},"Optimizing Performance in Go Applications with PGO","posts\u002Fgolang\u002Foptimizing-performance-with-pgo",{"title":282,"icon":283,"redirect":284,"path":285,"stem":286,"children":287,"page":226},"JavaScript","vscode-icons:file-type-js","\u002Fposts\u002Fjavascript\u002F9-lines-of-tips","\u002Fposts\u002Fjavascript","posts\u002Fjavascript",[288,291],{"title":289,"path":284,"stem":290,"icon":200},"9 lines of JavaScript replace 50 lines of code","posts\u002Fjavascript\u002F9-lines-of-tips",{"title":292,"path":293,"stem":294,"icon":200},"Javascript Promises - Specific functions and use cases","\u002Fposts\u002Fjavascript\u002Fpromises-cheatsheet","posts\u002Fjavascript\u002Fpromises-cheatsheet",{"title":296,"icon":297,"redirect":298,"path":299,"stem":300,"children":301,"page":226},"Node","material-icon-theme:nodejs-alt","\u002Fposts\u002Fnodejs\u002Fevent-loop","\u002Fposts\u002Fnodejs","posts\u002Fnodejs",[302],{"title":303,"path":298,"stem":304,"icon":200},"Secret about Event Loop flow in Nodejs","posts\u002Fnodejs\u002Fevent-loop",{"title":306,"icon":307,"redirect":308,"path":309,"stem":310,"children":311,"page":226},"Nuxt","vscode-icons:file-type-nuxt","\u002Fposts\u002Fnuxt\u002Fenable-pwa-in-nuxt","\u002Fposts\u002Fnuxt","posts\u002Fnuxt",[312],{"title":313,"path":308,"stem":314,"icon":200},"Enable PWA and Service Worker in Nuxt","posts\u002Fnuxt\u002Fenable-pwa-in-nuxt",{"title":316,"icon":317,"redirect":318,"path":319,"stem":320,"children":321,"page":226},"Performance","emojione:rocket","\u002Fposts\u002Fperformance\u002Fbackground-image-injection-problem","\u002Fposts\u002Fperformance","posts\u002Fperformance",[322],{"title":323,"path":318,"stem":324,"icon":200},"Background-Image injection problem in UX","posts\u002Fperformance\u002Fbackground-image-injection-problem",{"title":326,"icon":327,"redirect":328,"path":329,"stem":330,"children":331,"page":226},"Tutorial","fluent-color:book-open-lightbulb-24","\u002Fposts\u002Ftutorial\u002Fclassification-and-functionality-of-the-servers","\u002Fposts\u002Ftutorial","posts\u002Ftutorial",[332,335,339,343,347],{"title":333,"path":328,"stem":334,"icon":200},"Classification and functionality of the servers","posts\u002Ftutorial\u002Fclassification-and-functionality-of-the-servers",{"title":336,"path":337,"stem":338,"icon":200},"What is the difference between localhost and 127.0.0.1?","\u002Fposts\u002Ftutorial\u002Fdifferent-between-localhost-and-127-0-0-1","posts\u002Ftutorial\u002Fdifferent-between-localhost-and-127-0-0-1",{"title":340,"path":341,"stem":342,"icon":200},"8 essential network protocols every programmer should know","\u002Fposts\u002Ftutorial\u002Fessential-network-protocols","posts\u002Ftutorial\u002Fessential-network-protocols",{"title":344,"path":345,"stem":346,"icon":200},"Pre rels in header link tag - SEO technique enhancement","\u002Fposts\u002Ftutorial\u002Fpre-rels-in-header-link-tag","posts\u002Ftutorial\u002Fpre-rels-in-header-link-tag",{"title":348,"path":349,"stem":350,"icon":200},"Better code with SOLID principles","\u002Fposts\u002Ftutorial\u002Fwhat-is-solid","posts\u002Ftutorial\u002Fwhat-is-solid",{"title":352,"icon":353,"redirect":354,"path":355,"stem":356,"children":357,"page":226},"UI\u002FUX","devicon:figma","\u002Fposts\u002Fuiux\u002Fcommon-button-mistake","\u002Fposts\u002Fuiux","posts\u002Fuiux",[358],{"title":359,"path":354,"stem":360,"icon":200},"Common Button Mistake in UI\u002FUX","posts\u002Fuiux\u002Fcommon-button-mistake",{"title":362,"icon":363,"path":364,"stem":365,"children":366,"page":226},"Cheatsheets","fluent-color:paw-16","\u002Fcheatsheets","cheatsheets",[367,372,377,380,385,388,393,397,402,407,412,417,422,427,431,435,440,445,449,454,459,464],{"title":368,"path":369,"stem":370,"icon":371},"Bash","\u002Fcheatsheets\u002Fbash","cheatsheets\u002Fbash","material-icon-theme:powershell",{"title":373,"path":374,"stem":375,"icon":376},"CSS","\u002Fcheatsheets\u002Fcss","cheatsheets\u002Fcss","vscode-icons:file-type-css2",{"title":228,"path":378,"stem":379,"icon":229},"\u002Fcheatsheets\u002Fdocker","cheatsheets\u002Fdocker",{"title":381,"path":382,"stem":383,"icon":384},"Git","\u002Fcheatsheets\u002Fgit","cheatsheets\u002Fgit","devicon:git",{"title":272,"path":386,"stem":387,"icon":273},"\u002Fcheatsheets\u002Fgo","cheatsheets\u002Fgo",{"title":389,"path":390,"stem":391,"icon":392},"HTML","\u002Fcheatsheets\u002Fhtml","cheatsheets\u002Fhtml","material-icon-theme:html",{"title":282,"path":394,"stem":395,"icon":396},"\u002Fcheatsheets\u002Fjavascript","cheatsheets\u002Fjavascript","material-icon-theme:javascript",{"title":398,"path":399,"stem":400,"icon":401},"Latex","\u002Fcheatsheets\u002Flatex","cheatsheets\u002Flatex","material-icon-theme:latexmk",{"title":403,"path":404,"stem":405,"icon":406},"Linux","\u002Fcheatsheets\u002Flinux","cheatsheets\u002Flinux","devicon:linux",{"title":408,"path":409,"stem":410,"icon":411},"Markdown","\u002Fcheatsheets\u002Fmarkdown","cheatsheets\u002Fmarkdown","material-icon-theme:markdown",{"title":413,"path":414,"stem":415,"icon":416},"Mongo","\u002Fcheatsheets\u002Fmongo","cheatsheets\u002Fmongo","devicon:mongodb",{"title":418,"path":419,"stem":420,"icon":421},"Nest","\u002Fcheatsheets\u002Fnest","cheatsheets\u002Fnest","material-icon-theme:nest",{"title":423,"path":424,"stem":425,"icon":426},"Next","\u002Fcheatsheets\u002Fnext","cheatsheets\u002Fnext","logos:nextjs-icon",{"title":296,"path":428,"stem":429,"icon":430},"\u002Fcheatsheets\u002Fnode","cheatsheets\u002Fnode","material-icon-theme:nodejs",{"title":306,"path":432,"stem":433,"icon":434},"\u002Fcheatsheets\u002Fnuxt","cheatsheets\u002Fnuxt","material-icon-theme:nuxt",{"title":436,"path":437,"stem":438,"icon":439},"React","\u002Fcheatsheets\u002Freact","cheatsheets\u002Freact","material-icon-theme:react",{"title":441,"path":442,"stem":443,"icon":444},"Redis","\u002Fcheatsheets\u002Fredis","cheatsheets\u002Fredis","vscode-icons:folder-type-redis-opened",{"title":446,"path":447,"stem":448,"icon":218},"SQL","\u002Fcheatsheets\u002Fsql","cheatsheets\u002Fsql",{"title":450,"path":451,"stem":452,"icon":453},"Typescript","\u002Fcheatsheets\u002Ftypescript","cheatsheets\u002Ftypescript","material-icon-theme:typescript",{"title":455,"path":456,"stem":457,"icon":458},"Vercel","\u002Fcheatsheets\u002Fvercel","cheatsheets\u002Fvercel","vscode-icons:file-type-light-vercel",{"title":460,"path":461,"stem":462,"icon":463},"Vue","\u002Fcheatsheets\u002Fvue","cheatsheets\u002Fvue","material-icon-theme:vue",{"title":465,"path":466,"stem":467,"icon":468},"Windows","\u002Fcheatsheets\u002Fwindow","cheatsheets\u002Fwindow","material-icon-theme:folder-windows",{"title":470,"icon":471,"path":472,"stem":473,"children":474,"page":226},"Prompts","fluent-color:bot-sparkle-24","\u002Fprompts","prompts",[475],{"title":476,"path":477,"stem":478,"children":479,"page":226},"Image Generation","\u002Fprompts\u002Fimage-generation","prompts\u002Fimage-generation",[480],{"title":481,"path":482,"stem":483,"icon":471},"Futuristic Cloud Workspace","\u002Fprompts\u002Fimage-generation\u002Ffuturistic-cloud-workspace","prompts\u002Fimage-generation\u002Ffuturistic-cloud-workspace",{"title":485,"icon":486,"path":487,"stem":488,"children":489,"page":226},"Interviews","lucide:messages-square","\u002Finterviews","interviews",[490,494,499,502,506,511,516,521,522,527,532],{"title":491,"path":492,"stem":493,"icon":486},"Behavioral Engineering","\u002Finterviews\u002Fbehavioral-engineering","interviews\u002Fbehavioral-engineering",{"title":495,"path":496,"stem":497,"icon":498},"DevOps and Cloud","\u002Finterviews\u002Fdevops-cloud","interviews\u002Fdevops-cloud","logos:docker-icon",{"title":389,"path":500,"stem":501,"icon":392},"\u002Finterviews\u002Fhtml","interviews\u002Fhtml",{"title":282,"path":503,"stem":504,"icon":505},"\u002Finterviews\u002Fjavascript","interviews\u002Fjavascript","logos:javascript",{"title":507,"path":508,"stem":509,"icon":510},"Node.js and API Design","\u002Finterviews\u002Fnodejs-api","interviews\u002Fnodejs-api","logos:nodejs-icon",{"title":512,"path":513,"stem":514,"icon":515},"Software Testing","\u002Finterviews\u002Fsoftware-testing","interviews\u002Fsoftware-testing","lucide:flask-conical",{"title":517,"path":518,"stem":519,"icon":520},"SQL and Databases","\u002Finterviews\u002Fsql-databases","interviews\u002Fsql-databases","lucide:database",{"title":5,"path":202,"stem":206,"icon":198},{"title":523,"path":524,"stem":525,"icon":526},"TypeScript","\u002Finterviews\u002Ftypescript","interviews\u002Ftypescript","logos:typescript-icon",{"title":528,"path":529,"stem":530,"icon":531},"Vue and Nuxt","\u002Finterviews\u002Fvue-nuxt","interviews\u002Fvue-nuxt","logos:nuxt-icon",{"title":533,"path":534,"stem":535,"icon":536},"Web Security","\u002Finterviews\u002Fweb-security","interviews\u002Fweb-security","lucide:shield-check",[538,539],{"title":517,"path":518,"stem":519,"children":-1},{"title":523,"path":524,"stem":525,"children":-1}]