3 ms·
Let us say that you work for or own a website with 1m unique visitors per month. Let us assume your average JS library size that can be cached and outsourced to
by 734129837261 6y ago
Let us say that you work for or own a website with 1m unique visitors per month. Let us assume your average JS library size that can be cached and outsourced totals 400 kilobytes (that's on the low end).
1 million * 400 kilobytes = 400 gigabytes
For AWS the entry level tier per gigabyte is $0.15/GB.
That is a whopping $60 USD per MONTH that you can save by running your scripts on a CDN.
So, yeah.
- sergeykish 6y agoAnd someone is paying that...
- eeZah7Ux 6y agoThe users are paying for it with their privacy. CDN providers are not charities: they sell traffic metadata.
- sergeykish 6y agothat's what I meant, million data points costs $60
- heartbeats 6y agoWhy are you serving 400kb of JavaScript? Why are you paying $0.15/GB? These numbers are certainly not on the low end.
- quickthrower2 6y agoI assume that it's "for the sake of argument" https://www.ldoceonline.com/dictionary/for-the-sake-of-argument https://www.ldoceonline.com/dictionary/for-the-sake-of-argum... Also it's a bit like a proof. By assuming worse numbers, and arriving at $60, your better numbers will only prove the point even more.
- heartbeats 6y agoBy arriving worse numbers, you arrive at a higher price, so it makes your point weaker if anything. If a site bundles half a meg of JS, it's going to be unpleasant to use, and if you're serving so much JS it's hurting you financially, it's probably time to reconsider what you're doing.
- quickthrower2 6y agoNo it makes the point stronger, the point being "it's cheap enough to host your own CDN that you don't need to use a free one". And further "it is so so cheap that you can still make these dumb mistakes and it's still worth hosting the files yourself!" It's like saying should I use a dry cleaner? Well it's only $50 to get them to iron my shirts, so it's worth it for my time saved. Then someone says "$50! You are being ripped off, if your "doing it right", you'd get it done for $10", to which I say, well if it's worth me paying $50, then it is worth me paying $10, so my original argument "use a dry cleaner" is made stronger.
- quickthrower2 6y agoI don't think it is done to save money. I reckon it's done because the MVP tutorial they used when they got started used the CDN. Or they are using Wordpress and the theme decided to use it (... I just checked mine as I recently changed the theme, luckily it doesn't do this). It might also be done because people don't care. If it ain't broke don't fix it.