DEV Community

Cover image for How I Setup My Own Personal CDN using Cloudflare and S3

How I Setup My Own Personal CDN using Cloudflare and S3

JavaScript Joel on October 13, 2020

What is a CDN? According to Cloudflare a CDN is: A content delivery network (CDN) refers to a geographically distributed group of ...
Collapse
 
matteojoliveau profile image
Matteo Joliveau

I would definitely re-title this article. "How I setup my own personal CDN" sounds like you're building your own network of servers to cache and serve content, while instead you're configuring a commercially available CDN.

May I suggest something along the lines of "How I sped up my website with a CDN"? I think it would better reflect the content of your otherwise very interesting article

Collapse
 
harishkotra profile image
Harish Kotra (he/him)

Agree. Came here expecting a DIY CDN setup but not cloudflare and static S3.

Collapse
 
joelnet profile image
JavaScript Joel

Title adjusted to add clarity as recommended 👍

Collapse
 
matteojoliveau profile image
Matteo Joliveau

Thank you very much, Joel!

Thread Thread
 
joelnet profile image
JavaScript Joel

Everyone was right. Totally agree about the title! Cheers 👍🍻

Collapse
 
ishan_kanade profile image
Ishan kanade

The title is a bit misleading, it sounds like you setup a DIY CDN on your own without using a hosted service like Cloudflare.

Collapse
 
joelnet profile image
JavaScript Joel

Title adjusted to add clarity as recommended 👍

Collapse
 
musicin3d profile image
musicin3d • Edited

👎 So you DIDN'T create your own personal CDN. You used a shared CDN, one of the most popular ones at that.

Collapse
 
joelnet profile image
JavaScript Joel

Title adjusted to add clarity as recommended 👍

Collapse
 
onyxcode profile image
Dan

Gonna have to agree with the other comments here and say that this title is a bit too much clickbait

Collapse
 
joelnet profile image
JavaScript Joel

Title adjusted to add clarity as recommended 👍

Collapse
 
jhg03a profile image
Jonathan G

Agree on the misleading title. If you are however interested in building your own CDN, I recommend investigating trafficcontrol.apache.org/. I use it daily to build CDN from scratch.

Collapse
 
jesseflb_11 profile image
jesseflb

While click baits are somewhat normalized, this article title is a pretty good example of notorious click baiting and an absolute waste of time.

Collapse
 
joelnet profile image
JavaScript Joel

Title adjusted to add clarity as recommended 👍

Collapse
 
robcodes profile image
RobCodes

Just curious. Why cloudfare over aws cloudfront? With AWS Cloudfront you could assign a role, and then you would not have to make your S3 bucket private.

Collapse
 
joelnet profile image
JavaScript Joel

There are many options to do this. AWS Cloudfront is also a good solution. Same as the S3 back-end. It could have been any static host.

Collapse
 
robcodes profile image
RobCodes

What I mean is that Cloudfront is configured to pull from S3. So, what benefits did you have by using a different service provider such as Cloudfare? Was it cheaper? Easier to configure? Did you find it faster. or was this one of those "becasue I can" type of things?

Thread Thread
 
joelnet profile image
JavaScript Joel

For me, this piece with Cloudflare was easier than Cloudfront because there was no setup. All I had to do was change my DNS. If I used Cloudfront, I'd have to add that service and configure it. Cloudfront is also a good option, I just didn't need it for my specific use case.

Collapse
 
shahadishraq profile image
Shahad Ishraq

You are basically serving from one single region. This is not geographically distributed. So a user from Europe gets the content from all the way across the Atlantic.

Collapse
 
joelnet profile image
JavaScript Joel

Because I am using Cloudflare, the requests are proxied through their CDN so it is also geographically distributed!