points by dang 3 years ago

8 hours of downtime, but not data loss, since there was no data to lose during the downtime.

Last post before we went down (2022-07-08 12:46:04 UTC): https://news.ycombinator.com/item?id=32026565

First post once we were back up (2022-07-08 20:30:55 UTC): https://news.ycombinator.com/item?id=32026571 (hey, that's this thread! how'd you do that, tpmx?)

So, 7h 45m of downtime. What we don't know is how many posts (or votes, etc.) happened after our last backup, and were therefore lost. The latest vote we have was at 2022-07-08 12:46:05 UTC, which is about the same as the last post.

There can't be many lost posts or votes, though, because I checked HN Search (https://hn.algolia.com/) just before we brought HN back up, and their most recent comment and story were behind ours. That means our last backup on the ill-fated server was taken after the last API update (HN Search relies on our API), and the API gets updated every 30 seconds.

I'm not saying that's a rock-solid argument, but it suggests that 30 seconds is an upper bound on how much data we lost.

sillysaurusx 3 years ago

Curiosity got the better of me. Why was there a 6 ID gap between the last post and first post? The answer seems to be that admins were making posts, which is neat. (There was also one lonely Flexport job ad.)

Is your backup system tied to your API? Algolia is a third party service, and streaming the latest HN data to Algolia seems pretty similar to streaming it to a backup system.

  • dang 3 years ago

    I posted a bunch of test things and then deleted them.

    • scott_s 3 years ago

      I love this answer so much.

      • sillysaurusx 3 years ago

        I really wanted to ask “How did you post things if the server was down?” but perhaps some things are better left as mysteries.

        • O__________O 3 years ago

          You could see them via HN’s API before they were deleted, nothing interesting; API was back up before the www.

          • dang 3 years ago

            Good observation. Posting something and then seeing it show up in the API was one of the things we were testing. It exercises a lot of the code.

        • dang 3 years ago

          The server was up for us before it was up for everybody else.

  • swyx 3 years ago

    i got that Flexport ad too.. haha kinda alarming if they are the only YC company still hiring

    • dang 3 years ago

      Btw, job ads get queued long in advance and then the software picks the next one when it's time for a job ad. After 8 hours of being down, the software thought it was time for a job ad.