Distributed Page Output Caching & CDN
Overview
Output caching stores a rendered page and spits back the stored HTML instead of
having to generate it again for each request. On the first request, the output is cached,
subsequent requests for the set duration use the cached page instead of generating the
html again. If the page is database intensive, then all subsequent requests should be
much faster as it won’t make any database calls or server intensive processing.
By default, the content will be cached on the webserver memory. The cached version of
the page will be stored as InProc and will be affected by any changes to the IIS process.
For example, the cache will be invalidated when app pool crashes or restart on schedule.
Distributed Page Output Caching
Distributed Page Output Caching is a game-changer, as it moves the cache away from the web server, ensuring that it remains unaffected by server processes through decentralizing the cache store. The cache can be configured to store outside and won’t be affected by
IIS process. Also, in a load balanced environment only the first request from one of the
webserver will need to fetch the page from database. All subsequent request from any
of the webserver will fetch from the centralized cache.
- Decreased CPU and Memory utilization on the web server nodes.
- Cache availability after worker process restart
- Bringing up an additional node does not require warmup, as it can serve
items that are available in distributed cache storage. (“InMemory and
Distributed output cache comparison”) - The cost of spinning up a new node is no longer linear as only the first node
that gets hit with a request for non-cached content does the heavy lifting.
In-memory Cache | Distributed Cache | |
---|---|---|
Startup time (first node) | Web server node processes | Web server node processes (“InMemory and |
| "New web server nodes compile and processes the (“InMemory and Startup time | New nodes get the item Startup time is up to 5 |
CPU utilization | "Each web server node (“InMemory and Distributed output cache | Only the first web server |
Memory consumption | Each web server node consumes memory to stores an output cache | No memory is used to |
Availability | "Output cache items are (“InMemory and | Output cache items remain |
CDN
Images will be stored in Amazon S3 and served through Cloudfront. Cloudfront is built
for high performance and will reduce latency by delivering data through globally
dispersed Point of Presence (PoPs) with automated network mapping and intelligent
routing. This solution is focused on speed and getting data to you quickly from locations all around the world.
Updated 5 months ago