view the rest of the comments
Ask Lemmy
A Fediverse community for open-ended, thought provoking questions
Rules: (interactive)
1) Be nice and; have fun
Doxxing, trolling, sealioning, racism, toxicity and dog-whistling are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them
2) All posts must end with a '?'
This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?
3) No spam
Please do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.
4) NSFW is okay, within reason
Just remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com.
NSFW comments should be restricted to posts tagged [NSFW].
5) This is not a support community.
It is not a place for 'how do I?', type questions.
If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.
6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !uspolitics@lemmy.world
7) No Hit-and-Run questions.
Please don't delete your post for no apparent reason. If you plan on deleting a question later, say so in the post, or if you feel that you have a good reason to remove it, message a mod beforehand. It's not fair to the ones who took their time to answer, and it's not in the spirit of the community.
8) No Bots.
Posts or comments from bots, LLM's, AIs, Neural Networks, Transformers, or Marvin the Paranoid Android are not welcome in AskLemmy. Real humans only please.
Reminder: The terms of service apply here too.
Partnered Communities:
Logo design credit goes to: tubbadu
Cloudflare is a content distribution network (CDN). I've worked for a few for a long time.
When you run a website, you're responsible for serving up web responses to every web request. Depending on the level of traffic that your website receives, that can involve paying for a lot of hardware infrastructure, plus a ton of money in hosting and transit costs.
So instead of buying a bunch of server hardware outright or paying long-term leases for cloud-based resources, you can use a CDN. CDNs have tons and tons of servers in data centers all over the world, all designed to hold onto a cached copy of your website data and serve it to customers. Because CDNs operate at a global scale, they get better deals on transit costs, plus traffic can be served from machines closer to where the end-user request is coming from so requests get fulfilled faster and with fewer errors.
There are a bunch of different CDNs out there: Cloudflare, Akamai, Amazon CloudFront, Fastly, plus plenty that specialize regionally (which can be important in network-constrained regions and restrictive countries).
Cloudflare tends to be a popular option due to speed, ease of integration and pricing.
The web acceleration component of the CDN business model isn't in a growth state right now. The web is entirely flooded with machine agents and bots generating traffic that website owners have to pay for, so there's big business in putting up roadblocks to prevent bot traffic (like Cloudflare's annoying 'are you a human?' checks).
It also helps avoid distributed denial of service attacks.
Internet Protocol was designed around the idea that anyone should be able to send traffic to anyone, and that that party doesn't really have control over traffic reaching them until it gets to them, where they can just drop it if they aren't interested in it. That has some benefits.
However, this meant that if someone could round up enough computers with attached bandwidth, they could send traffic to one computer, and flood its network connection. This degrades its ability to talk to the rest of the Internet.
Some people decided to start going out and—often by compromising computers in one way or another—adding them to a "botnet", which they could then use to flood servers on the Internet, making various services, mostly websites, slow or inaccessible. This is known as a distributed denial of service attack (DDoS). Some groups decided to try demanding ransoms from various websites.
If you try to flood a host behind CloudFlare, though, all you flood is CloudFlare, which is very large and has a lot of bandwidth and is going to be very difficult to bring down. You can try to reach the host behind CloudFlare via various methods—in fact, I posted something just the other day that specifically dealt with reaching that host, for a latency measurement—but if you're trying to flood them that way, then CloudFlare is in a good position to detect and block your traffic at their computers. And, I'd expect that CloudFlare will also have a lot of expertise to try to counter very, very large-scale flooding before it even reaches their systems by communicating with major telcos.
I think that what we probably need is potentially for some kind of revision to IP that permits for hosts to have a way to blacklist or whitelist traffic and push those upstream, unless we want to have something like most Internet traffic being routed through CloudFlare or similar to solve the distributed denial of service problem. We...could do that, have the Internet basically be CloudFlare, Inc, but that's not really what the designers of Internet Protocol intended, and I think that there are some good reasons not to go that route.
So basically what I gather from this is CDNs are, once again, something else that would be better for me if I just did it myself. Like most things in the tech world these days, doing it yourself is the cheapest and most freeing option. Assuming you have an old but still capable PC around, that is.
If you're only running a small website with little traffic, yeah absolutely.
But if your traffic grows, your costs increase rapidly to buy hardware to handle it, or you deal with website crashes.
It's also a lot harder to DDoS a website that uses a CDN than one that entirely self hosts.
Oh yeah, absolutely. It's just a small passion project for now. Although I wouldn't mind having to solve the problem of higher traffic haha