Earlier quoted context omitted.
I do both. If you are loading a JS lib then check for its existence on the client. If it's not found load the resource from your server. You could also achieve this on the server side.
Or you could simplify the whole thing and just host it yourself. It isn’t worth that level of complication.
Unpkg CDN down causing dependent website outages
11–20 of 39 posts
Re: Unpkg CDN down causing dependent website outages
#12Earlier quoted context omitted.
Or you could simplify the whole thing and just host it yourself. It isn’t worth that level of complication.
In this situation server bandwidth was an issue. Using an available CDN with the fall back was what we decided to do. It's not that complicated, from the client check if the object you expect to exist in the library exists, if not load it from your server.
Re: Unpkg CDN down causing dependent website outages
#13This is one thing I never understood about web development. I would have thought the risks from 3rd party production dependencies would make devs do all in their power to minimize them. But IIUC it's a somewhat common practice. Is there something about the market dynamics that make this a reasonable tradeoff? E.g., the problems are rare and this somehow allows faster time to market? (Asking as a systems programmer, v…
I also miss being able to host random CSS and assets on Tumblr.
Otherwise, it should be on my own CDN. Especially for enterprise sites.
Re: Unpkg CDN down causing dependent website outages
#14This is one thing I never understood about web development. I would have thought the risks from 3rd party production dependencies would make devs do all in their power to minimize them. But IIUC it's a somewhat common practice. Is there something about the market dynamics that make this a reasonable tradeoff? E.g., the problems are rare and this somehow allows faster time to market? (Asking as a systems programmer, v…
I don’t have any data but I really don’t think it actually is that common. I definitely heard it used a lot more in the 2000s jQuery era but not really today. Browsers even have isolated storage these days so the benefits really are infinitesimal.
Re: Unpkg CDN down causing dependent website outages
#15This is one thing I never understood about web development. I would have thought the risks from 3rd party production dependencies would make devs do all in their power to minimize them. But IIUC it's a somewhat common practice. Is there something about the market dynamics that make this a reasonable tradeoff? E.g., the problems are rare and this somehow allows faster time to market? (Asking as a systems programmer, v…
Re: Unpkg CDN down causing dependent website outages
#16Unpkg runs on Fly with Cloudflare as CDN.
Re: Unpkg CDN down causing dependent website outages
#17And you almost certainly don't need one for scaling purposes. I've handled frontpage traffic multiple times without.
What I wish existed (or maybe does) is something like a CDN with ~8 global locations that promises to keep your static site in a warm cache for a small fee, without me having to set up a fly.io app manually. That would let my blog always load fast anywhere on the planet even for the first hit in a region.
Re: Unpkg CDN down causing dependent website outages
#18This is one thing I never understood about web development. I would have thought the risks from 3rd party production dependencies would make devs do all in their power to minimize them. But IIUC it's a somewhat common practice. Is there something about the market dynamics that make this a reasonable tradeoff? E.g., the problems are rare and this somehow allows faster time to market? (Asking as a systems programmer, v…
Yep. Entire teams work on these products. You have a couple of options:
1. Use them
2. Make it internally with less staffing, resulting in an inferior product
Option 2 is viable if you really only need a small subset of features/deep customization, but if you run into the edges the problem space will explode on you. At that point, you either have to throw more resources at it or go 3rd party.
Re: Unpkg CDN down causing dependent website outages
#19This is one thing I never understood about web development. I would have thought the risks from 3rd party production dependencies would make devs do all in their power to minimize them. But IIUC it's a somewhat common practice. Is there something about the market dynamics that make this a reasonable tradeoff? E.g., the problems are rare and this somehow allows faster time to market? (Asking as a systems programmer, v…
It is because the data (web logs containing web pages, timestamps, ip addresses, cookies, etc) can be sold.
Re: Unpkg CDN down causing dependent website outages
#20This is one thing I never understood about web development. I would have thought the risks from 3rd party production dependencies would make devs do all in their power to minimize them. But IIUC it's a somewhat common practice. Is there something about the market dynamics that make this a reasonable tradeoff? E.g., the problems are rare and this somehow allows faster time to market? (Asking as a systems programmer, v…