Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How do i go about making my own CDN with multiple VPS's?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How do i go about making my own CDN with multiple VPS's?

thammy321thammy321 Member
edited July 2022 in Help

Basically the title. How do i go about making my own CDN by having multiple VPS all over the world?

What should i use? Nginx? Varnish? Something else maybe?

I was thinking to have around 19-20 VPS.

4 in NA + Canada
2 in South America
8 in Europe
4 in Asia + Australia/NZ
1 in Africa

Most of them are on 1gbps, some 10gbps, unlimited BW.

My question is, what kind of CPU and RAM do i need?

I have seen OneClickCDN script which basically turns VPS into a CDN Node, but i have not had much luck with it when it comes to caching etc...

Comments

  • Question is - why?
    For the price of 20 VPS you can have Cloudflare/Bunny/Akamai Pro plan.

    Anyway if it's just for learning, start from here:
    https://shubhamdhiman98.medium.com/how-to-build-your-own-cdn-ff2b8ab7ac4b

    Thanked by 1martheen
  • quanhua92quanhua92 Member
    edited July 2022

    I use Google Cloud DNS to route the user to the nearest server with the geodns feature. Each server is a HAProxy that load balances the traffic to a list of nearby webservers.
    For static files, I don't know why you do not want to use Cloudflare or BunnyCDN

  • I was playing with "nginx as CDN POP" a couple of weeks ago.
    You may try my nginx files.
    Geo routing did through route53.

    Thanked by 1lorian
  • yoursunnyyoursunny Member, IPv6 Advocate

    Pay $666 consulting fee to @imgmoney and he'll teach you.
    His CDN is stronger than Akamai, Fastly, Cloudflare, and ChinaCache combined.

  • I do accept 666 push-ups. Payment processor @yoursunny

    Thanked by 1yoursunny
  • imgmoneyimgmoney Member
    edited July 2022

    OPS trying to create CDN for video streaming services and with VPS it is not possible to have a stable one.

    Instead of VPS he should go with Dedicated Servers with huge ram to store the cache on RAM.

    And he can use cloudns.net for geo balancing and use nginx to cache the content.

    The more easy will be BunnyCDN or CloudFlare

    To Be Honest, for Video he can just do round robins via DNS and cache content in few dedicated servers.

    Thanked by 1thammy321
  • @imgmoney said:
    OPS trying to create CDN for video streaming services and with VPS it is not possible to have a stable one.

    Instead of VPS he should go with Dedicated Servers with huge ram to store the cache on RAM.

    And he can use cloudns.net for geo balancing and use nginx to cache the content.

    The more easy will be BunnyCDN or CloudFlare

    Exactly, i forgot to mention that this will be used to serve mostly .mp4 files up to 50mb in size.

    Obviously for static files i will just setup Cloudflare.

    I'm in talks with Bunny right now, their pricing seems to be reasonable and they seem to get recommended by a lot of people on here.

  • yoursunnyyoursunny Member, IPv6 Advocate

    @thammy321 said:
    this will be used to serve mostly .mp4 files up to 50mb in size.

    Deploy the same software as https://pushups.ndn.today and you can use the global push-ups delivery network for free.
    My network along with peering partners has more than 40 Gbps available capacity and can deliver video (push-ups or otherwise) to hundreds of viewers at the same time.
    The software is available at https://github.com/yoursunny/NDNts-video-server

  • ralfralf Member
    edited July 2022

    @imgmoney said:
    I do accept 666 push-ups. Payment processor @yoursunny

    @yoursunny also never grumbles when someone does a chargeback.

    Thanked by 1yoursunny
  • speedypagespeedypage Member, Patron Provider
    edited July 2022

    If the content will be replicated across all servers from the get-go and you can ensure you can copy the video files to all nodes, Bunny is currently releasing DNS that supports both latency + geo location routing and it also has HTTP monitoring to take a server that may be offline out of the mix. This could then effectively work as a CDN with permanent-caching by just using a basic web server to serve the files.

    If the content needs to be available on all servers even if it's only currently on 1, perhaps Bunny's Edge Storage would be an option as it'll be georeplicated and available from all even if it hadn't yet replicated to the other nodes.

    I can understand why a user may not wish to just use a CDN alone, as if it doesn't have a high cache HIT rate - traffic will be slower due to it constantly going back to the origin. The two above setups would work around this issue.

Sign In or Register to comment.