4 ms·
I love SQLite and use it whenever I can, but if you’re building the next Reddit, you obviously can’t live with the lack of concurrent writes. HN is fine as the
by oefrha 4y ago
I love SQLite and use it whenever I can, but if you’re building the next Reddit, you obviously can’t live with the lack of concurrent writes. HN is fine as the write volume is really low, just a couple posts per minute, plus maybe ten times as many votes.
- okasaki 4y agoWhat about one sqlite db per subreddit?
- senttoschool 4y agoWhere would you store the user data? Duplicate it across millions of SQLite databases?
- mekster 4y ago> couple posts per minute There are hundreds of posts that people are reading at every moment. I don't think it's that less.
- oefrha 4y agoYou don't have to guess. Just check https://news.ycombinator.com/new https://news.ycombinator.com/new and https://news.ycombinator.com/newcomments https://news.ycombinator.com/newcomments for everything that's posted here. Or take a quantitative approach. HN item IDs are sequential. Using the API: $ curl 'https://hacker-news.firebaseio.com/v0/maxitem.json' 32409711 $ curl -s "https://hacker-news.firebaseio.com/v0/item/32409711.json" | jq .time 1660125598 $ curl -s "https://hacker-news.firebaseio.com/v0/item/$(( 32409711 - 14400 )).json" | jq .time 1660031940 so, 14400 items in ~26 hours, fewer than 10 items per minute on average. At the peak you'll see somewhat more than that.