4 ms·
> Why the move? Our primary server died around 11pm last night (PST), so we switched to our secondary server, but then our secondary server died around 6am, an
by dang 4y ago
> Why the move?
Our primary server died around 11pm last night (PST), so we switched to our secondary server, but then our secondary server died around 6am, and we didn't have a third.
The plan was always "in the unlikely event that both servers die at the same time, be able to spin HN up on AWS." We knew it would take us several hours to do that, but it seemed an ok tradeoff given how unlikely the both-servers-die-at-the-same-time scenario seemed at the time. (It doesn't seem so unlikely now. In fact it seems to have a probability of 1.)
Given what we knew when we made that plan, I'm pretty pleased with how things have turned out so far (fingers crossed—no jinx—definitely not gloating). We had done dry runs of this and made good-enough notes. It sucks to have been down for 8 hours, but it could have been worse, and without good backups (thank you sctb!) it would have been catastrophic.
Having someone as good as mthurman do most of the work is also a really good idea.
- omegalulw 4y agoDo you have a postmortem on why both servers died so fast?
- dang 4y agoIt was an SSD that failed in each case, and in a similar way (e.g. both were in RAID arrays but neither could be rebuilt from the array - but I am over my skis in reporting this, as I barely know what that means). The disks were in two physically separate servers that were not connected to each other. I believe, however, that they were of similar make and model. So the leading hypothesis seems to be that perhaps the SSDs were from the same manufacturing batch and shared some defect. In other words, our servers were inbred! Which makes me want to link to the song 'Second Cousin' by Flamin' Groovies. The HN hindsight consensus, to judge by the replies to https://news.ycombinator.com/item?id=32026606 https://news.ycombinator.com/item?id=32026606, is that this happens all the time, is not surprising at all, and is actually quite to be expected. Live and learn!
- whitepoplar 4y agoDo you happen to know the make and model of SSD?
- wolfgang42 4y agoJust posted to the linked thread: kabdib> Let me narrow my guess: They hit 4 years, 206 days and 16 hours . . . or 40,000 hours. And that they were sold by HP or Dell, and manufactured by SanDisk. mikiem> These were made by SanDisk (SanDisk Optimus Lightning II) and the number of hours is between 39,984 and 40,032...
- dang 4y agohttps://news.ycombinator.com/item?id=32028511 https://news.ycombinator.com/item?id=32028511
- hoofhearted 4y agoI believe a more plausible scenario could be that each drive failed during the RAID rebuild and restriping process. This is a known issue in NAS systems, and Freenas always recommended running two raid arrays with 3 disks in each array for mission critical equipment. By doing so, you can lose a disk in each array and keep on trucking without any glitches. Then if you happen to kill another disk during restriping, it would failover to the second mirrored array. You could hotswap any failed disks in this setup without any downtime. The likelihood of losing 3 drives together in a server would be highly unlikely. https://www.45drives.com/community/articles/RAID-and-RAIDZ/ https://www.45drives.com/community/articles/RAID-and-RAIDZ/
- aaaaaaaaata 4y agoUnless it was due to end of life, or power surge related failure. Then more than one failing simultaneously isn't so inconceivable.
- pmoriarty 4y agoIdeally, there should be redundancy in servers, too.. With different hardware, on different sides of the planet, on different service providers.
- alberth 4y agoSpeaking for everyone, really appreciate you dang. Question: so will HN be migrating back to M5 (or another hosting provider).
- dang 4y agoWe've only had 5 minutes to talk about it so far, but unless something changes, I don't see why we wouldn't go back to M5.
- booi 4y agoWell having a double server failure would definitely make me think about going back to the same solution..
- hdjjhhvvhga 4y agoI'd say the opposite: having experienced this, they would make sure to significantly reduce the probability of it happening again. In the past, I had a similar problem because of using hardware from the same batch. In retrospect, it's silly to be surprised they died at the same time.
- nemothekid 4y ago>The plan was always "in the unlikely event that both servers die at the same time, be able to spin HN up on AWS. >We had done dry runs of this in the past, Incredible. Actual disaster recovery.
- rstupek 4y agoIf I can ask what is an sctb?
- quink 4y agoScott Bell, user sctb.
- deleted 4y ago[deleted]
- wolfgang42 4y agoScott Bell is a former[1] HN moderator: https://news.ycombinator.com/user?id=sctb https://news.ycombinator.com/user?id=sctb [1]: https://news.ycombinator.com/item?id=25055115 https://news.ycombinator.com/item?id=25055115
- mwcampbell 4y agoIf any of you have time to answer this, I'm curious about how you do backups. Are you using frequent rsyncs (or something functionally equivalent like BorgBackup), ZFS snapshots, or something custom? It looks like you must have had frequent backups, since when HN finally came back, it was quite close to the state that I remember it being in when it went down.
- dang 4y agoCustom, I guess (edit: that was an overstatement—let's say partly custom). We upload a snapshot every 24 hours to S3 and incremental updates every few kb (I think). We use rsync for log files.
- adityapatadia 4y agoI am surprised the forum rich of tech people is not yet containerised. A simple helm chart would make deployment to AWS (or any other kubernetes) a 5 min job.
- kijin 4y agoI'd assume it takes more than 5 minutes to bring up a complete copy of the HN database on a different platform. Deploying source code is trivial these days. Large databases, not so much, unless you're already using something like RDS.
- KronisLV 4y ago> I'd assume it takes more than 5 minutes to bring up a complete copy of the HN database on a different platform. Hmm, that actually makes me wonder about how big it would actually be. The nature of HN (not really storing a lot of images/videos like Reddit, for example) would probably lend itself well to being pretty economical in regards to the space used. Assuming a link of 1 Gbps, ideally you'd be able to transfer close to 125 MB/s. So that'd mean that in 5 minutes you could transfer around 37'500 MB of data to another place, though you have to account for overhead. With compression in place, you might just be able to make this figure a lot better, though that depends on how you do things. In practice the link speeds will vary (a lot) based on what hardware/hosting you're using, where and how you store any backups and what you use for transferring them elsewhere, if you can do that stuff incrementally then it's even better (scheduled backups of full data, incremental updates afterwards). Regardless, in an ideal world where you have a lot of information, this would boil down to a mathematical equation, letting you plot how long bringing over all of the data would take for any given DB size (for your current infrastructure/setup). For many systems out there, 5 minutes would indeed be possible - but that becomes less likely the more data you store, or the more complicated components you introduce (e.g. separate storage for binary data, multiple services, message queues with persistence etc.). That said, in regards to the whole container argument: I think that there are definitely benefits to be had from containerization, as long as you pick a suitable orchestrator (Kubernetes if you know it well from working in a lab setting or with supervision under someone else in a prod setting, or something simpler like Nomad/Swarm that you can prototype things quickly with).
- O__________O 4y agoThanks mthurman!! _____ Related: Appears “mthurman” is Mark Thurman, a software engineer at Y Combinator since 2016; HN profile has no obvious clues. https://www.linkedin.com/in/markethurman https://www.linkedin.com/in/markethurman https://news.ycombinator.com/user?id=mthurman https://news.ycombinator.com/user?id=mthurman
- O__________O 4y agoThanks sctb!! (sctb is Scott, former HN mod) https://news.ycombinator.com/item?id=25055115 https://news.ycombinator.com/item?id=25055115 https://news.ycombinator.com/user?id=sctb https://news.ycombinator.com/user?id=sctb
- smn1234 4y agorecovery with very little data loss, well done