By Harish Mahamure · 3 min read
Scaling DesignTemplate: multilayer caching and responsive navigation
How Cloudflare CDN, Redis, rendering choices, and frontend optimizations supported 4–5M typical daily requests and peaks of 10M at DesignTemplate.
At DesignTemplate / DooGraphics, I worked across product engineering and infrastructure as Co-Founder and CTO. The platform handled 4–5 million requests on a typical day, with peaks of 10 million. Those totals include CDN traffic and backend API calls; they are not a claim that every request reached the application or database.
Caching and frontend work served a shared goal: support traffic growth while keeping navigation responsive. The observed result included an approximately 90% reduction in query volume. This is an engineering account of that work, rather than a controlled performance benchmark.
Keep the request path distinct from the cache layers
The delivery path involved Cloudflare CDN, App Gateway, NGINX, and the application, with Redis fallback caching for high-QPS backend routes.
Cloudflare and Redis provided the caching capabilities described here. App Gateway and NGINX were also in the request path; listing them does not mean each layer maintained a separate response cache.
That distinction matters when reasoning about scale. A high edge-request count can coexist with much less origin activity. To understand a bottleneck, separate CDN requests, backend calls, cache hits and misses, and downstream queries.
Freshness was part of the design
The caching strategy included TTLs, invalidation when content changed, versioned assets, and handling cache misses.
TTLs bound how long an entry can remain in a cache. Update invalidation addresses the case where content changes before that TTL expires. Versioned assets let a deployment reference a new resource URL rather than depend on every browser immediately discarding an older file.
These mechanisms solve different problems. A long asset lifetime can suit immutable, versioned content, while a user-specific API response needs a different cacheability decision.
For any similar architecture, I would review cache keys for authorization boundaries, query parameters, and content variants before pursuing hit rate. This is a design consideration for readers, not a claim of an additional mechanism deployed at DesignTemplate.
Rendering and navigation needed their own work
Reducing backend work does not automatically make the browser responsive. The frontend work included:
- Server-side rendering, static site generation, and incremental static regeneration.
- WebP image optimization and static CDN delivery.
- Code splitting and bundle reduction.
- Pagination to bound the amount of content loaded at once.
Navigation became smoother through this combination of changes. I am keeping that result qualitative here, without attaching an unverified page-load, Core Web Vitals, or bundle-size improvement.
The rendering choices also create freshness decisions. A statically generated page, a revalidated page, and an API response may have different update paths. When reviewing such a system, I would ask which layer can still serve an old representation after an update.
Cache misses deserve explicit attention
A cache makes the common path cheaper, but the miss path still determines whether the system can recover when content is uncached. Cache-miss handling was part of the implementation; this account does not attribute a specific stampede-prevention algorithm without further detail.
For someone implementing a comparable system, useful failure cases include an unavailable Redis instance, invalidation failures, a cold cache after deployment, and a popular entry expiring while traffic is high. The right mitigation depends on whether stale content is acceptable and how much origin capacity exists.
What I would measure in a comparable rollout
To assess a similar architecture, record requests at each boundary, hit and miss rates, downstream query volume, response latency percentiles, and infrastructure spend. In the browser, inspect transferred JavaScript, image bytes, and user-facing performance metrics.
Use comparable traffic windows when evaluating a reduction. A percentage alone cannot explain changes in traffic mix or cacheability. The strongest engineering explanation connects the observed outcome to the request path and its failure behavior.
The practical lesson from DesignTemplate is that scale involved both sides of the application: reducing repeated work in the delivery path and reducing unnecessary work in the browser.
More about my engineering experience · How I structure AI-assisted changes