Hacker News new | past | comments | ask | show | jobs | submit login

Perhaps I can add some context on top of the post. All updates are in transactions unless explicitly opted out. Also remember our case is a little special: we have hundreds of the databases with the same schema, what if #328 fails? The failure/rollback scenario is a bit more complicated when you go past a single database involved.

As for backups: absolutely. We handle this independently though. We do full backups every night as well as T-logs every 15 minutes. If I had to restore every database we had to a very specific point in time or just before a migration command was run: we have T-logs to do that going back 4 days at all times.

I'm sure there are good solutions for single database applications way more fully featured than our approach, they just do little to solve any problems we actually run into.




Why hundreds of databases? One for each stackexchange site?


Two per site - one for main Q&A, one for its meta.


You couldn't do one with some different tables? What was justification for both separate DB's and the Q&D/meta split? Just curious.


If you did different tables, that's even more complicated by making every query dynamic. It also makes backups, etc. far more complicated as well. Multiple databases is simply the simplest solution for multiple things that need a database with the same schema :)


Appreciate the tip.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: