Code Room
System designHardsd-g314
Subject CdnLevel Senior–Staff~45 minCommon in Storage & CDN interviewsIndustries Technology

Question

An e-commerce homepage must be personalized (recommended products, A/B test variant, currency by geo, logged-in greeting) yet 95% of the page is identical across users and you want CDN-level cacheability for performance. Naively varying the full HTML by user makes the cache hit rate near zero. Design an edge-personalization architecture that keeps the bulk of the page cached at the edge while injecting the personalized pieces, and explain how you decide what's cacheable, how you assemble the response, and the consistency/security pitfalls.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.