CDN vs own apache servers

apache-2.2cdn

i know that CDN is just for static contents. but then i still have to spread out by apache servers to all corners of the world right? so when i have done it, why dont i just set up some dedicated apache servers in place only serving static content just like CDN?

are there real benefits from still using CDN compared to that scenario?

Best Answer

A CDN is used for any content that is going to be accessed a multitude of times in a lot of various locations. YouTube for example, uses a CDN.

The main advantage of a CDN is that you have a local Point of Presence for the majority of your internet users. If you notice that you're getting a lot of traffic from North America and England and Brazil, there's no way that all of them are getting an optimum experience, because if your servers are located in New Zealand, then they're all going to access at different speeds.

By putting your servers in the countries where you get the majority of your traffic from, and then directing the user to their closest server, you're eliminating a lot of potential bottlenecks.

Simply having "some dedicated servers only serving static content" does not alleviate this issue, as all your servers are going to be in the same place. If you're going to spread your servers out around the world, then your two scenarios are the same.

All that said, I would never bother to build my own CDN unless I was someone the size of YouTube or Facebook. There are a few providers out there who already have a massive, robust network that you can use. See the following ServerFault questions for more information: