I’ve had a couple websites I use daily for work just get flashy new interfaces which causes 1/3 to 1/2 second delays in the interface which used to not exist, previously they just had normal page load delays.
For example, SalesForce Lightning, their UI overhaul. Old UI is mainly just flat HTML with some loading on fields. New UI doesn’t have as many page loads it seems but wherever you navigate to takes far longer to load because of api calls or just baaad JS.
Slow for the user, slow for the server. It's almost like the people who push website technology are the same one selling you servers. Hate it and want to go back.
The problem is too much reliances on frameworks and add on libraries.
Developers will import an entire framework that for the benefit of a single feature. It's mind blowing to look at the amount of js includes for seemingly simple sites.
Stackoverflow answers that direct you to import a library or framework should be banned in most cases.
I will often have to scroll past several answers that say to import a library before finding a simple and functional answer that uses only a few lines of code down near the bottom. Which in my eyes is the real answer. I often wonder if there's a behind the scenes effort on SO to promote certain includes.
The entire ecosystem of some languages / implementations relies on this far too heavily.
We are seeing some of the consequences other than just bloated systems from this style of coding with malicious node packages.
Vanilla CSS is the other end of the spectrum, but the problem is there is apparently nothing between hand-crafted CSS and a full front-end framework. People, like me, who are not good at design will choose the convenience of the latter over going through the tedium of the former, even if we don't really want to.
There is no design in/for the web without html+css, is there?
Edit: by removing 3rd parties from your project you remove a lot of overhead and current and future risk. But be warned: Maybe your company sells exactly that for a good margin and you ruin the business model.
> There is no design in/for the web without html+css, is there?
Only as much as there's no programming without assembly language.
It is really sad that you are forced to do things that you believe you are not capable of doing and refuse to do.
When did I ever say I was not capable of doing it? It's really sad the way you push your mindset on others.
Maybe they are, but that bloat is just some static files that are sent to the user as far as the web server is concerned. They should have no practical impact on the battery life of the server.
There are JS sites that render on the server as well, but that's not the bloat you mean.
Sure, most clients may already be adequately provisioned, but only because so many websites with bloated Javascript have forced their hand...
...and if those static files make 100 API calls as soon as they land?
Of course it's hard to debate whether JS, Java or PHP is most inefficient in that regard.
Was here on HN several times, sadly still the case.
Keeping the Web simple keeps it awesome. "
Websites have become significantly more complex in the last two decades.
The “new” Reddit is also a good example. Even ignoring all the user-hostile functionality changes, the actual experience is still slower and less reliable.
Same for Twitter. Maybe it's intentional to move users into the app, where ads are more likely to be actually seen (e.g. Many web users have ad blockers) and in app purchases are frictionless.
I ended up going back to the official app which I think is nice, but also feel nice about financially supporting an indie developer who does a nice third party client for a (generally) awesome community.
Take for instance news sites or blogs: When I read news article, what I want is mostly (there are some great interactive infographics, but those are tiny minority) text and few images, that are static.
And it's not like that as a consumer I get anything extra. The text and images are still static, for the most part. Except that now its makes 20 separate requests to load it all up. Hell, pages are usually even less dynamic, after comments fell out of favor.
What increased is number of extra stuff, that is mostly focused on selling me stuff, tracking every metrics possible, and trying to figure out somne clickbait I would click next for extra engagement.
But that's not content, content has largely stayed the same.
I believe what's happening is a broader trend in the industry of building engineering playgrounds and doing engineering purely for engineering's sake to benefit one's career - a positive feedback loop where not participating puts developers at a disadvantage as they won't gain over-engineering skills that companies now require (they require them because their developers or managers want them for the same reason).
Browsing with js disabled is fast, pages load quickly, almost no trackers and there are "old" or "text" versions of sites still available... old.reddit, old.twitter or nitter instances...
Heck, even google has one...
To be honest, I just use dillo browser most of the time. Small, speedy and safer then most...
Edit: typo.
Reloading the page is like 20MB as well. Great when you’re tethered to your phone.
CSS animations too , especially the ones that use infinite.
Without context, this statement is misleading at best and downright false at worst. You’re right that splitting up a single request into multiple would incur a small performance penalty, but you also generally gain other advantages like more localized caching and the ability to conditionally skip requests. In the long run, those advantages may actually make your app significantly more efficient. But without discussing details like this, it’s pointless to make wild assumptions about performance.
That said, if you ever actually profile things you will find the overhead per request is actually quite high. There is a clear tendency to request far to little data at a time.
Infinite scrolling could be annoying with animations though, I grant you that.
But yes, web hosting, especially for small/mid traffic websites has become very cheap (in power consumption and in money), especially for static websites where CDNs can be used to serve assets and static content from edge caches. A full x86 server or PC is often total overkill and a little SBC sufficient instead.
It is a dual core CPU btw, to bring the average CPU load into perspective. A very interesting project as a prove of concept, also for others to adopt in countries with unstable electricity supply and/or in relation high electricity costs :).
I assumed the solar server serves the sites directly, because of this. Maybe I was wrong.
Using CDNs was more an idea/suggestion for others who take this project as an inspiration to run their own website even with small hardware, unstable electricity supply and/or expensive/limited bandwidth, where a CDN can further reduce server load and traffic. Also when speaking about efficiency of the Internet in general, using small SBCs where sufficient, a CDN usually serves assets/content much more effective, given a network where a particular edge server is usually closer to the visitor than the origin server, and hardware that is specifically designed and run for that purpose and can be assumed to be highly loaded (less wasted power consumption). So as long as one trusts a CDN, or the content is not of any security or privacy concerns, it is usually a reasonable choice to make use of it :).
I'm really tired of hearing this. "Serverless because otherwise server doing nothing", "very small virtual machine because otherwise server doing nothing".
The server is not doing "nothing" it's waiting for incoming requests. It's like if you told "this cashier is doing nothing because there is no customers in the store".
When a server is loaded at capacity minus some margin, latencies are going up, which may not always be acceptable. Also, not every web workload scales linearly nor is cacheable and traffic patterns may not be that predictable and some requests may generate higher loads.
Managing capacity is way more involved that just "this server is doing nothing".
Also, many of these technologies supposedly reducing "idle time" such as "serverless" are usually incredibly wasteful where handling a single request may start a completely new environment and may pull resources across the globe.
If load becomes too important for the SBC or close to capacity, wake the server, and perform a handover once it's up. You can either hold the packets and use the SBC as a proxy, or change your router's config to point to the newly awakened server (alternatively, just exchange IP or MAC addresses). With a bit of magic to avoid closing existing connections (I believe home ISP routers should keep NAT connections open if a port forward is changed), it would work. Obviously it's even easier with a proper load balancer.
edit: actually even a router might be able to handle low loads
There seems to be surprisingly little interest in this (closest I found was https://github.com/kubernetes/kubernetes/issues/89271 ).
So yeah, it's still wasted power and computation in my opinion. "Ready and waiting" should not take 100W per server, but be closer to 0.1W (WoL), or lower if managing state from a central node. I guess it's not worth optimizing for most people, and big cloud probably does something similar already.
In a way, it's a bit like big.LITTLE with additional latency: small, power-efficient vs big, fast, inefficient for small loads.
Anyway, it would be waste even if you couldn't save it at all. "Waste" is simply a name for things we consume but don't actually use. All industries use that term.
When I was young I worked on a project that was so inefficient that I was professionally embarrassed to have my name associated with it. So I moved heaven and earth to fix it. Gave myself an RSI before I learned to better automate some transformations.
Today I’m also working on another, lesser embarrassment, but I’m not working weekends and holidays on it anymore. I’m not a hero surrounded by villains, I’m an observant person drowning in a sea of apathetic faces.
The amount of hardware we have per user request should have gotten someone fired. Most of the people responsible are gone, but one is still here complecting anything that isn’t nailed down, and few others know enough to realize that the reason they don’t feel confident in the code is because someone intentionally made it that way, and you should not be looking up to those people. They are literally making you dumber.
I’ve been at the top of HN for extended hours a couple of times on just a Heroku hobby dyno with no caching at all, but I had Cloudflare out front absorbing all the traffic that would have come from serving static assets.
Not much revelation there, right?
Now if you reach the top of a large subreddit, or have a viral tweet with a link to you, that's a different order of magnitude. HN is just not that large.
The traffic is usually about 40k uniques over 24 hours. For reference, my uncached site is running on Elixir which is often better without caching.
I can’t see any good reason not to use it.
>...but I had Cloudflare out front absorbing all the traffic that would have come from serving static assets.
I interpreted that to mean Cloudflare contributed significantly load-wise, then you indicated that your site wasn't largely static or cacheable (I think?).
Anyway, in addition to curiosity, we're also considering Cloudflare to offload from more costly AWS instances. So, just trying to suss out whether Cloudflare was or wasn't instrumental for you per your comments. Still not 100% sure, but thanks for the discussion.
I suspect it's the opposite. Hosting a static site like this on a service designed for it is going to use less power than using dedicated hardware. Single server can host hundred to thousands of static sites. The power use per site is going to be much lower.
But that's not actually solving the problem, it's just offloading it. Not to mention that you're selling your community to yet another tracking company, and jacking up user page load time.
depends on what you want, the low end is incoming comments as emails and putting them semi-manually into an iframe on the unchanged static article page. Doing it myself at https://blog.mro.name/2019/05/wp-to-hugo-making-of/ and sacrificed commenter speed.
Others may easily be more sophisticated than above brutalist solution. But still: comments in iframes align well with static sites IMO.
Edit: even better may be to phase in comments from HN or the fediverse or whatever you care about into an iframe. Be it copied or inline and re-styled.
Today that’s cloudflare but in the past it was varnish.
Otherwise it is very dynamic. Different users have access to different content so we generally can’t cache full pages at the edge for authenticated users.
not yet, but I think of a delayed shell script (cron 15min?). JS (clientside) may be not of much use.
Or use a feedback webform via https://github.com/mro/form2xhtml - doesn't have to be email then.
Or monitor IMAP folders for accepted comments and cron them to the webserver a la https://codeberg.org/mro/flohmarkt.monte-ts.de/src/branch/ma... and online.sh
One could even generate a dedicated HTML page for the comments, and include it in an iframe, although inlining them is probably more performant.
Just not serving everybody all the time.
And this is in a world without distributed, locality-aware caching.
Thoughts and Prayers, etc
> Over 110,000 people booked their COVID-19 booster vaccine before 9am this morning.
I don't know if this is a huge amount of traffic, or just an unexpectedly large bump.
Good luck getting a booking!