Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

If you've got a site with decent levels of traffic host libraries yourself rather than use a JS CDN.

Retrieving critical content from a 3rd-party CDN has a number of issues:

- New TCP connection has to be created with added cost of TLS negotiation and it's own slow-start phase

- If you're using HTTP/2 then prioritisation only occurs over a single connection so it can't be prioritised against other content



There are tradeoffs either way. For popular modules it might already be in your browser cache if another app used the module recently. Plus being a CDN it's probably being served by a machine closer to the user. And if your whole site is running of a CDN then you're relying on a 3rd party anyway.

Benchmark for your users.


Based on https://andydavies.me/blog/2018/09/06/safari-caching-and-3rd... it seems highly unlikely that a popular module will be in the cache

- Safari double keys it's cache to prevent 3rd-parties tracking across sites - Usage of common libraries is just too low for their to be a critical mass

A whole site running on a CDN still involves only one connection, will make use of the throughput growing the TCP congestion window grows, and a decent CDN is likely to be more reliable than the origin


I think that HTTP/2 + Push + EMS will eventually become very interesting. Without push, there's a lot of separate connections that will happen for a lot of users on a lot of sites/systems. I think that there will be some break out platforms to come from this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: