Does using a CDN increase load on the database or Web server? If yes, then why and how?
+2
A:
No, quite the opposite. To quote Wikipedia's http://en.wikipedia.org/wiki/Content_delivery_network (incidentally, the first result from a search for "CDN"):
A client accesses a copy of the data near to the client, as opposed to all clients accessing the same central server, so as to avoid bottleneck near that server.
Piskvor
2010-09-09 09:45:09
What I was concerned was the fact that does it maintain the copies before requests are made or after the requests. If copies are made before the requests, then perhaps it would cause an extra load on the server. If not, then the CDN would perhaps be only helpful after each page has been request once from the node.
Loveleen Kaur
2010-09-13 06:59:48
@Loveleen Kaur: That depends on your CDN and its configuration; the scenario you describe "CDN will be helpful only after the first request" is likely, but that holds for each page *separately*. So, if you have a static resource (e.g. an image or a CSS file) that's requested often and another that's never requested, the oft-requested one will be probably served from the CDN. CDN is useful if you have hundreds and more requests, so the first hit will be insignificant compared to the other hits that will get served from the CDN (and not from your server).
Piskvor
2010-09-13 07:37:55
@Piskvor True, the CDN does reduce HTTP requests by caching the static entities.Thanks for the explanantion!
Loveleen Kaur
2010-09-13 10:01:16
A:
Given the same amount of traffic, it should relieve your web server, but probably has no impact on your database server.
On the other hand, if the higher bandwidth from the CDN makes more people come to your site, maybe it will actually increase the load. But I suppose that is a good thing, then.
Thilo
2010-09-09 10:34:00