Most active commenters

    ←back to thread

    Why AO3 Was Down

    (www.reddit.com)
    151 points danso | 14 comments | | HN request time: 0.838s | source | bottom
    1. notorandit ◴[] No.44470235[source]
    > typical database column

    Typical for 70s and 80s.

    Honestly, designing a 21st century database is a different thing if compared to back then.

    You can use 128 bit integers, provided that you really want to use integers. And maybe you put a timestamp along.

    replies(6): >>44470283 #>>44470544 #>>44470799 #>>44470940 #>>44471428 #>>44471545 #
    2. j16sdiz ◴[] No.44470283[source]
    let's use 128bit integer and handle them like floats in php!

    and maybe put a 32bit timestamp along and pretend it can somehow store more than a 32bit integer can.

    3. jarofgreen ◴[] No.44470544[source]
    or use UUID/GUIDS, many databases (eg PostgreSQL) and frameworks (eg Django) support them.
    replies(1): >>44470593 #
    4. dwedge ◴[] No.44470593[source]
    Using uuids can cause lots of problems with indexing, fragmentation, row size and index size
    5. throwawaysoxjje ◴[] No.44470799[source]
    Nah I made the same mistake back in 2009 for a system that was storing behavior events during malware analysis.

    You don’t often expect to have two billion of something until you do.

    replies(1): >>44470939 #
    6. 9dev ◴[] No.44470939[source]
    It's not like those two billion things just materialise in your database, right? Someone must have watched that graph climb, and climb, and climb, approaching the limit.
    replies(1): >>44470996 #
    7. shakna ◴[] No.44470940[source]
    Salesforce is a rather popular platform.

    Its defaults are also either a 18-character ID, or a 32bit integer. So, unless you take the effort to actually fight Apex, you're gonna hit this problem sooner or later.

    replies(1): >>44473040 #
    8. detaro ◴[] No.44470996{3}[source]
    If they have that graph and remember the limit they choose 15 years ago... It's not something you think about constantly running a mostly stable code-wise site.
    9. Sharlin ◴[] No.44471428[source]
    One of the first things I internalized about databases was "just always use BIGSERIAL for primary keys". There are very few good reasons not to.
    replies(2): >>44471889 #>>44472688 #
    10. rsynnott ◴[] No.44471545[source]
    The website appears to date from 2008. This was a _very_ common latent bug at that point, particularly because Rails would basically force you to implement it. I assume this got fixed at some point, but for a long time all ActiveRecord models had an autoincrementing ID, which had to be a signed 32 bit int. There were scary monkey-patching workarounds if you wanted something more sensible.

    EDIT: And, yes, it is apparently Rails! https://fanlore.org/wiki/Archive_of_Our_Own#Timeline

    11. ◴[] No.44471889[source]
    12. looperhacks ◴[] No.44472688[source]
    Maybe don't: https://wiki.postgresql.org/wiki/Don't_Do_This#Don.27t_use_s...
    13. quickthrowman ◴[] No.44473040[source]
    Doesn’t an 18-character alphanumeric ID give you 18^36 combinations? 1.54 x 10^45 seems like enough combinations.
    replies(1): >>44474228 #
    14. shakna ◴[] No.44474228{3}[source]
    That's the point of the "or". You probably don't know which you're getting. It's what makes that particular design decision bite you more often.