3 ms·
Oh hey, I was wondering why the VPS suddenly had over 100 load average, restarted Docker since the containers were struggling, now I know why (should be back no
by KronisLV 2y ago
Oh hey, I was wondering why the VPS suddenly had over 100 load average, restarted Docker since the containers were struggling, now I know why (should be back now for a bit). Won't necessarily fix it, might need to migrate over to something else for the blog, with a proper cache, alongside actually writing better articles in the future.
I don't think the article itself holds up that well, it's just that updates are often a massive pain, one that you have to deal with somehow regardless. Realistically, LTS versions of OS distros and technologies that don't change often will lessen the pain, but not eliminate it entirely.
And even then, you'll still need to deal with breaking changes when you will be forced to upgrade across major releases (e.g. JDK 8 to something newer after EOL) or migrate once a technology dies altogether (e.g. AngularJS).
It's not like people will backport fixes for anything indefinitely either.
- cjalmeida 2y ago>might need to migrate over to something else for the blog, with a proper cache Never Update _Anything_ :)
- KronisLV 2y agoI am very much tempted not to because it works under lower loads, could just put it on a faster server, but how could I pass up the chance to write my own CMS (well, a better one than the previous ones I've done)? That's like a rite of passage. But yes, the irony isn't lost on me, I just had to go for that title.
- stavros 2y agoIf you have to write your own CMS, make it compile to static files. I did that with Django, used Django-distill, and it's hands down the best static site generator I've ever used. My site never needs updates and never goes down under any amount of load.
- hipadev23 2y ago“static files” are nothing more than no-TTL caching strategy with manual eviction.
- stavros 2y agoOK.
- brirec 2y agoYou’re not wrong… but “static files” ultimately are infinitely less complex than any dynamic CMS, and require no effort or brain power to migrate between (even bottom-of-the-barrel) providers
- ksec 2y agoI sort of not understand why we are not using static Files more often now. In the old days we need CMS mostly because generating links and update to certain pages were expensive. Hard Disk were slow and memory were expensive. Now we have SSDs that eliminate 99.9999% of the problem.
- augusto-moura 2y agoIf you are using open source you can always support your own old versions ~joking but not really~ Of course security updates are very hard, but if an old version has some good community you have the option of forking or upstreaming the updates yourself
- type0 2y ago> ~joking but not really~ For some languages and applications it can be trivial to backport the changes then trying to keep up with the new features. If it's tested and stable it will likely be more stable than a new version, I do this for some smaller programs and I'm not even a real programmer but more of a hobbyist
- Joel_Mckay 2y agoAlpine linux was designed for web services, as it includes the bare minimum resources necessary for deployment. https://wiki.alpinelinux.org/wiki/Nginx https://wiki.alpinelinux.org/wiki/Nginx Also, may want to consider a flat html site if you don't have time to maintain a framework/ecosystem. =3
- KronisLV 2y agoAlpine is pretty nice! I did end up opting for Ubuntu LTS (and maybe the odd Debian based image here or there) for most of my containers because it essentially has no surprises and is what I run locally, so I can reuse a few snippets to install certain tools and it also has a pretty long EOL, at the expense of larger images. Oddly enough, I also ended up settling on Apache over Nginx and even something like Caddy (both of which are also really nice) because it's similarly a proven technology that's good enough, especially with something like mod_md https://httpd.apache.org/docs/2.4/mod/mod_md.html https://httpd.apache.org/docs/2.4/mod/mod_md.html and because Nginx in particular had some unpleasant behavior when DNS records weren't available because some containers in the cluster weren't up https://stackoverflow.com/questions/50248522/nginx-will-not-start-with-host-not-found-in-upstream https://stackoverflow.com/questions/50248522/nginx-will-not-... I might go for a static site generator sometime!
- Joel_Mckay 2y agoApache is stable for wrapping mixed services, but needs a few firewall rules to keep it functional (slow loris + mod_qos etc.) =) Ubuntu LTS kernels are actually pretty stable, but containers are still recommended. ;)
- KronisLV 2y agoThat's fair! Honestly, it's kind of cool to see how many different kinds of packages are available for Apache. A bit off topic, but I rather enjoyed the idea behind mod_auth_openidc, which ships an OpenID Connect Relying Party implementation, so some of the auth can be offloaded to Apache in combination with something like Keycloak and things in the protected services can be kept a bit simpler (e.g. just reading the headers provided by the module): https://github.com/OpenIDC/mod_auth_openidc https://github.com/OpenIDC/mod_auth_openidc Now, whether that's a good idea, that's debatable, but there are also plenty of other implementations of Relying Party out there as well: https://openid.net/developers/certified-openid-connect-implementations/ https://openid.net/developers/certified-openid-connect-imple... I am also on the fence about using mod_security with Apache, because I know for a fact that Cloudflare would be a better option for that, but at the same time self-hosting is nice and I don't have anything too precious on those servers that a sub-optimal WAF would cause me that many headaches. I guess it's cool that I can, even down to decent rulesets: https://owasp.org/www-project-modsecurity-core-rule-set/ https://owasp.org/www-project-modsecurity-core-rule-set/ though the OWASP Coraza project also seems nice: https://coraza.io/ https://coraza.io/
- louwrentius 2y agoFor contrast, I recently had a no 1. HN hit and my Pi4 never had a core beyond 20% Yes, it’s a static website. It’s amazing how little performance you actually need to survive a HN avalanche
- ploxiln 2y agoIt's amazing how powerful hardware is in the past decade, and how masterly crafted and efficient some software is (linux, nginx, etc) ... while other software is so profoundly inefficient, that we forget.
- thraxil 2y agoYeah, I've had a few HN frontpages with sites running Django and recently Phoenix with essentially no caching or optimization running on a 256MB fly.io free tier instance with barely a noticable increase in load (just big spikes in the network/traffic graphs).
- SenHeng 2y agoBack in 2018, I helped a startup update their AngularJS wrapped jQuery prototype to 1.6 and tried hard to separate business logic from component code so they could migrate over to vue, react or angular2 after I left. I regularly snowboard with someone still at the company. They’re still on AngularJS. AngularJS never dies. AngularJS is forever.