Hacker News new | ask | show | jobs
by lowercasename 1537 days ago
There's no better stress test than Show HN, and unsurprisingly, that's revealed that Solar Witch has a buffer overrun bug somewhere which I'm investigating! If Solar Witch is currently offline, here's a screenshot of what it might look like: https://ttm.sh/ix3.png
2 comments

I'm actually quite surprised and impressed that I was able to open the site and leave a message while this is on the frontpage!
I've been resetting it every 2 minutes! This is how regular servers work, right?
Having multiple unstable boxes and just cycling them round robin style is a valid solution, depending on the use case
We really did that when we discovered a memory leak that manifested itself over some days, and that we couldn't find the root cause of. We just did a rolling reboot daily when the visitor count was bottoming out.
Not far off, in some cases.
HN may be a good stress test for Arduinos and WordPress, but it's really not that much load. I've recently had my site high on the front page and the page specifically recommended reloading if you didn't see the effect the first time. This is hosted on a ten year old laptop and a home Internet connection. The load average didn't budge.

People hugely overestimate the amount of firepower you need when you "go viral", presumably because more people read HN than post on HN so most will just never have tried, and even fewer people try without some preparation (you don't know for sure that it was unnecessary if nothing went wrong).

If one's pages don't require a lot of (pre)computation and you're not a huge destination on the web, things like load balancers, server clusters, etc. are a waste of time and money. But not using fancy tech is not what people here like to geek out on so...

That's because people are so accustomed to leveraging mountains of free candy that they've forgotten that a web page can be served with less than 1000ms of cpu time. I got a job once when I told a story about a web app I wrote was going viral getting a million visitors a day while I was strolling in the park. The web servers I write only need a single system call (writev) to serve gzip encoded assets so wrk says they can do a million requests per second on one pc. So it's not like it was any kind of big technical achievement even though it was a technical job. My point is that we're drowning in so much software that sometimes being a master class engineer all it takes is not using it.
We're drowning in so much software that sometimes being a master class engineer all it takes is not using it.

Love it. Added to https://github.com/globalcitizen/taoup

I really think we need a major shift in how we handle static content. This stuff should be near zero-cost by now.

Ideally so cheap that your ISP has a CDN and publishers pay nothing to get them to cache it, it's just included in your internet service. For some people things could even be cached temporarily at the building level.

SSDs are very fast and hardware acceleration exists. Why so we need such massive servers in a data center?

A movie is only 90 minutes. A single disk and some ASICs should be able to serve tens of thousands of people, if you could make dedicated hardware without all the stuff that's irrelevant for streams, just a bunch of cores with DMA going straight into crypto and out a bunch of Ethernet ports.

If we can make a tiny 10 gigabit swith with tons of ports in one rack, why can we not add some sticks of ram and do CDNs in hardware?

Do you have the source code published somewhere? I'd be very curious. My current implementation uses mmap and send(), so id love to get it faster than that.
It's called redbean.
Well, granted, no doubt, but my poor little server routinely crashes after a few dozen connections, and exposing it to HN was the first time it experienced that many. Something is clearly amiss!
Sure, I didn't mean to dismiss that it's a good test for custom software on embedded hardware :). More of a general remark that it seems most people's perception is that HN does some good "hugging" and that I think this is a misconception - unless, of course, you run ultra low power. Kudos for doing exactly that!
You're right - this was my impression too! You read a few dramatic posts about being hugged and you get this idea that HN is a behemoth that DDoSes everything it loves. Thanks for the context!
Are you doing SSL on that Solar Arduino? Try using only the ciphersuite RSA-AES128-CBC-SHA256 with a 1024 bit RSA key.
Sure, but - and I say this with considerable respect because it in no way detracts from the impressiveness of the work - that's clearly a bug, and I would hope most production web servers don't fall over quite that easily.
Yeah my personal site is hosted on a very small VPS instance, has gone to the front of HN twice, and never really blinked.