Welcome! Log In Create A New Profile

Advanced

Would it be possible to build a small CDN using nginx and GeoDNS?

Posted by vmunich 
Would it be possible to build a small CDN using nginx and GeoDNS?
November 12, 2013 05:56AM
My situation is this:

I have an image website hosted in the USA. It has Nginx in front of Apache. Apache handles dynamic content and Nginx handles static files. I don't see a reason to put Varnish in the blend, yet.

Although the images load fine in the North America, people in East Europe, Asia and South America are having high latency issues, as well as slow loading times.

My traffic is too high so I can't afford a CDN. My idea was to get a high bandwidth server in each of those locations, install nginx, and have the nginx cache from my USA main server replicated to the other 3 slave servers. GeoIP would identify where the users are coming from, and make them load the images from the nearest nginx server, while Apache in the USA server handles dynamic content.

That's the theory, but I'm not sure how I would make that happen.

To sync the cache among the nginx servers, I could use rsync. I've been reading about MogileFS, I thought maybe I could use this filesystem in all of the nginx servers but I'm not sure how it works yet. In addition, I don't even know if it's possible to replicate nginx cache like that.

I know this setup isn't actually a CDN, but it would work for me. Moreover, most CDNs don't support South America. Even considering that bandwidth in South America is really expensive, I can still save by doing this setup.

I just can't find anywhere in the web how one would build a "CDN" by doing this, nor what I should search for.

Is this even possible?
If yes.. how/where should I start?

Thank you.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 143
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready