13 ms·
I think this also shows how inefficient modern website hosting is. The fact that this person was able to get a raspberry pi to host the #1 website on HN powered
by widdakay 5y ago
I think this also shows how inefficient modern website hosting is. The fact that this person was able to get a raspberry pi to host the #1 website on HN powered by a small 50 watt solar panel is very cool (meaning maybe 10w average power budget), but also shouldn't be as uncommon as it is today. To put this in perspective, a modern server uses 50-100 watts idle doing nothing, and many more under load. To handle the top of HN, the developer probably would use load balancing and other tech, multiplying the power usage accordingly.
Edit: fixing typos.
- foxfluff 5y agoI recall someone saying that being on HN front page resulted in a peak load of a few requests per second. I.e. absolutely nothing if you're just serving static content.
- tentacleuno 5y agoHey @dang, you wouldn't happen to know anything about how Hacker News is hosted, would you? Reading this has piqued my curiosity. If time / your position permits, of course.
- smoldesu 5y agoIIRC it's just stored on someone's Dell Inspiron that they've got laying around in an office. Might be outdated info, but it's really nothing special if memory serves.
- justsaying9 5y agoYeah, and apparently the load is such a problem for them, their web server will permanently autoban your IP if you load too many articles at once, say 10-15 that you were planning to save and read offline. Then if you email to ask 'Wtf', tiny violins will play as they explain they are too broke and impoverished to afford bandwidth enough to not do this, while helpfully suggesting you go to a different internet connection to fill out a form to unblock yourself. Must be tough times at YCombinator, spending all those billions on junk Web Bubble 2.0 companies and none left to spare for HN bandwidth, or say a proper index so you can look up old articles.
- detaro 5y agoFrom what I remember from previous posts by dang: It's living on a single dedicated server with some hosting company (I think you can look up the IP to figure out which) - at least a while ago the code also was single-core, not sure if that is still the case. (in the past it used cloudflare for caching, but hasn't in a few years)
- saltminer 5y agoIt's M5 Hosting
- bsagdiyev 5y agoLast I read it was hosted out of M5 Networks in San Diego. I used to like fairly close to their data center and had considered hosting there at some point, so when I read that Hacker News hosted there it stuck with me.
- brightball 5y agoFwiw, the top of HN isn’t all that stress. It mostly comes down to disk I/O and efficiency of the language. 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.
- unclebucknasty 5y agoNot to be contrary, but if your site is largely static and you're fronting it with Cloudfare, then you're essentially saying Cloudfare can handle load. Not much revelation there, right?
- divbzero 5y agoThat’s a fair point for GP’s Heroku + Cloudflare deployment. The OP solar site is a better example of efficient static hosting as it is run on a lightweight server [1] and not fronted with Cloudflare. The reading at the bottom of the website indicates 2.70 W power usage at the moment and over two weeks uptime. [1]: https://solar.lowtechmagazine.com/about.html#hardware https://solar.lowtechmagazine.com/about.html#hardware
- tazjin 5y agoCloudflare really doesn't make much of a difference for HN. The last front page traffic I saw (~a week ago?) was still at most a handful of QPS. Any nginx instance with default configuration serving static files from any modern computer should be able to handle that (given that your link is big enough). 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.
- aaaaaaaaaaab 5y agoThen why do people talk about the "HN hug of death"?
- 5y ago
- rabuse 5y agoIt's a static page... not everything is a static page in the web world.
- micromacrofoot 5y agoa lot of the web would probably be better off if it were
- giancarlostoro 5y agoI think so, WordPress that isnt cached to a frozen state on the backend is kind of silly in my eyes, the only exception would be comments, but you could hack around that by using Disqus or something, voila.
- IncRnd 5y agoComments are far from the only exception to static page caches! There are often dynamic changes via plugins or functions.php. There are shortcodes and a number of other examples too.
- johannes1234321 5y agoEven comments come quite rarely in most cases, so that the complete page with comments can be cached.
- ComputerGuru 5y agoYou don’t need disqus, you just invalidate the cache and regenerate it for only the next request, serving stale copies until the regen is complete. nginx or varnish can both do that out of the box.
- Cpoll 5y ago> you could hack around that by using Disqus 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.
- ascar 5y agoThe key here is that it's just a very simple website with very low computational requirements.
- zucker42 5y agoAnd yet it provides the same amount of information as other websites 10 or 100 times it's weight.
- denysvitali 5y agohttps://thebestmotherfucking.website/ https://thebestmotherfucking.website/
- agumonkey 5y agoi wonder how much information is really needed on wires today
- giancarlostoro 5y agoIt's mostly static files, if it was a modern SPA with APIs and such, it would probably crash having to fetch the same data for what is quite literally a static site.
- anchpop 5y agoI think I've mentioned this before, but nothing about SPAs require that level of bloat. My personal site (https://chadnauseam.com/ https://chadnauseam.com/) uses React and SPA-type features like preloading internal pages so they load instantly when you click a link, but almost all of it works fine with js disabled. It used to get a perfect score on lighthouse too but it doesn't anymore :(
- Eikon 5y ago> a modern server uses 50-100 watts idle doing nothing 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.
- IncRnd 5y agoIf there are 100 servers but only one is needed to handle the user traffic, then 99% of those servers are considered to be "doing nothing" even if they are powered on and running software. At the end of the day, running that software is meaningless to the business and to customers.
- MobiusHorizons 5y agoI think the point was that "ready and waiting" is valuable to the end customer, even if it only makes a different later when they are doing something. It's kind-of like how firemen are valuable even when they are not getting calls, because they are available for low latency response instead of busy doing something else. The idea that this is just wasted computation is therefore somewhat disingenuous.
- MayeulC 5y agoOh, but it could be improved. Linux can cold boot under 300ms (easier if you control the BIOS and can tune it for speed, like coreboot can), faster if resuming from RAM. That should allow you to perform load-balancing while powering off the extra capacity (using wake-on-lan). 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 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.
- amelius 5y agoWouldn't it be way more efficient to run it on some (virtualized) node in a datacenter that is optimized for it?
- hiptobecubic 5y agoYes but it only matters if you ignore all the constant factors and sunk costs that exist. For example, I already have an rpi and a solar panel. My crappy google home mini wastes more power than this doing absolutely nothing. It's kind of pointless to hyper-optimize efficiency of a little server like this given all the waste around it.
- marricks 5y agoI hate to be that old foggy but, aren’t websites just getting worse and bloated with JS crap? 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.
- culi 5y agoYou're not alone in feeling this way https://handmade.network/manifesto https://handmade.network/manifesto
- Beached 5y agoit's gotten out of hand imo. page load times take longer than when I was browsing the web on dialup in many cases.
- mro_name 5y agoWebsite Obesity crisis going on and on: https://idlewords.com/talks/website_obesity.htm https://idlewords.com/talks/website_obesity.htm Was here on HN several times, sadly still the case.
- hutzlibu 5y ago"I don't care about bloat because it's inefficient. I care about it because it makes the web inaccessible. Keeping the Web simple keeps it awesome. "
- jmondi 5y agoWhat a false equivalence. You are comparing static sites of the past to dynamic sites of today. Apples to oranges.
- DietPi 5y agoIt is not a Raspberry Pi, but an Olimex Olinuxino A20 Lime 2 and a 30W solar panel: https://solar.lowtechmagazine.com/about.html#hardware https://solar.lowtechmagazine.com/about.html#hardware 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 :).
- berkes 5y agoDid the author use a CDN? Because that's kindof cheating: you are just having another (free) service burning the electricity for you. I assumed the solar server serves the sites directly, because of this. Maybe I was wrong.
- goodpoint 5y agoThere is no CDN, thankfully.
- DietPi 5y agoTrue, in this case it is great, somehow mandatory, that it is fully self-contained :). However, dynamic content like the current power consumption and CPU load would still need be served by the origin, or cached at the CDN with short timeouts only. 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 :).
- goodpoint 5y ago> this also shows how inefficient modern website hosting is And this is in a world without distributed, locality-aware caching.
- deleted 5y ago[deleted]
- hdjjhhvvhga 5y agoIt's not all so simple. For one, this A20 is connected to a router which is connected to the grid. The connection used is a 100 Mb fiber which - thanks to small average page size and very little JS - is more than enough. The whole thing is in the owner's home. I have a similar setup, and I wouldn't say "This is a solar-powered website, which means it sometimes goes offline" but "This website is served from someone's home, which means it sometimes goes offline."
- dheera 5y agoI mean, that's because a lot of websites these days are built on bloat on top of bloat. A periodically generated static HTML page is pretty easy to take HN load.
- mro_name 5y agoembracing outages, though reducing them, is revolutionary, I guess. Just not serving everybody all the time.
- driverdan 5y ago> I think this also shows how inefficient modern website hosting is. 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.
- hpen 5y agoYeah not like the requirements have changed at all........
- hinkley 5y agoWe waste so many resources customizing each response to time and observer and it’s just nuts. Most people aren’t going to notice if a calculation is being debounced, amortizing it over hundreds of seconds or requests. Instant gratification is the most expensive thing by far. And debouncing has such a profound effect similar to load shedding for traffic bursts, it really should be front and center in the literature. 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.
- tyingq 5y agoI see a fair amount of stories here where the endpoint appears to be a VPS, sometimes fronted by a CDN. It's hard to say exactly how efficient that is, since configurations vary, but it's likely pretty good. Sure, there's hungry servers under there, but the multi-tenancy spreads that out.
- gandalfian 5y agoThough topical thought, the Uk NHS site is text and blue hyperlinks. Its still collapsing tonight because the prime minister just announced booster jabs available for everyone. (Guess what I'm spending my evening doing). So you can't always win.
- secondcoming 5y agoIt'd be interesting to know what you actually are doing! Thoughts and Prayers, etc
- gandalfian 5y agoOh, actually, just browsing to kill time while watching the open browser window at the side refresh on the NHS booking site hoping it will work long enough to give me a booster jab appointment. It alternates between "you are in a queue ten minutes to go" and "our site is overloaded please try later" for about two hours now. Everyone else between the ages of 18-50 in the UK is basically doing the same thing, hammering the site. Its not quite as life and death exciting as I make it sound....
- DanBC 5y agohttps://twitter.com/AmandaPritchard/status/1470362935448985605?s=20 https://twitter.com/AmandaPritchard/status/14703629354489856... > 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!
- secondcoming 5y agoAh, I thought you were working on the NHS IT systems!
- deleted 5y ago[deleted]