4 ms·
Your minimum classic web page architecture is something like this: client -> webserver -> db With the advent of CDNs for caching, someone thought "Hey, if my
by pid-1 4y ago
Your minimum classic web page architecture is something like this:
client -> webserver -> db
With the advent of CDNs for caching, someone thought "Hey, if my page is completely static, I might as well store it entirely on the CDN!".
Some advantages of this architecture:
- you don't need to manage a server / VM, a network nor a db.
- better latency as your page can be closer to clients, as most CDNs are globally distribuited
- does not have dbs as bottlenecks
- trivial to scale for high traffic scenarios
- potentially free for small projects
- static pages tend to be easier to test
Disadvantages:
- you're limited to static pages. anything that needs a login, a session, etc... is a showstopper*
- public endpoints. can`t use most CDNs for pages that only should be accessed from private networks
- potentially expensive for high traffic web pages
* some CDN providers now offer some sort of distributed storage / worker. YMMV.
- whiskey14 4y agoThanks for this. I guess as a backend dev I see static pages as a cute website, rather than a full application, so struggle to see the huge benefit. Unless I'm missing something, and you can cache most of the site as static, leaving a hole where the db content gets injected?
- pid-1 4y agoTotally, that's was the original (and still most common) use case for CDNs.