Hacker News new | ask | show | jobs
by jpc0 465 days ago
I don't know if I entirely buy the argument here. CSS/JS/Images should be at the very least cached by your reverse proxy if not on a CDN(I'm a strong believer you should never be serving Images/Videos from your own VPS, even if you don't like Cloudflare there are many CDN providers).

So at most it is the actual dynamic content being served, ie API calls.

Now whether next.js bad deployment experience on your own hardware is to blame for the complexity of doing that easily is up for debate.

As much as I dislike the accidental complexity of React and it's "frameworks"(react-router/next), I can deploy a good looking site with good accessibility very quickly using it and evey JS bootcamp dev won't be completely lost if they happened to need to work on the project.

Sometimes the technically best decision is decided by non-technical factors.

2 comments

I've done a lot of site optimization on high traffic sites, and in many situations you should serve resources from the same server to reduce latency and the overhead of additional connections. This does of course depend on a few things like where servers are located in relation to users and what the capacity of the setup is, but you definitely should not always use a CDN. It was true many years ago, but not today.
I am also surprised and suspect he's not using any reverse proxy.. so is node doing tls, etc?