Live data from Hacker News

Database of Databases

dbdb.io

51–60 of 65 posts

Re: Database of Databases

#57
post #34

They're using SQLite which is single threaded and single user by design. So this website will not be able to service that much traffic.

SQLite isn't single threaded - and it can support multiple readers very well. The limitation with SQLite is that it doesn't support concurrent writes well - it needs to take a lock on the entire database to perform a write. Writes are crazy fast (a few ms) so this often isn't a problem - but it does mean you wouldn't want to use it to build a site that has many people writing at once, like Hacker News for example. Fo…

Enabling the write ahead log makes sqlite behaviour much, much better under (write) contention:

> PRAGMA journal_mode=WAL;

Re: Database of Databases

#59
post #12
post #10

Earlier quoted context omitted.

Should be fine for reads. Sqlite.org is dynamic, pulling from sqlite data for ~20% of the pages, and it does fine with HN piling on. The single threaded would be an issue for writes, but I don't see why they would be doing writes for a page view. See https://www.sqlite.org/whentouse.html

Also, caching layers. Presumably a service uses SQLite to simplify their ops. So long as the caching layer is equally simple to maintain, then SQLite continues to make sense to me

For this kind of content site, I'd convert the Django site to a static site with django-bakery [1] and stick it on Netlify.

I suppose there would be a bunch of rewriting to do searching (lunr.js maybe) and filtering client side.

Buuuuuut, at this point, just turning on caching would be easier.

[1]: https://github.com/datadesk/django-bakery

Re: Database of Databases

#60

They're using SQLite which is single threaded and single user by design. So this website will not be able to service that much traffic.

I've survived a few HN front pages on SQlite + $5 DO droplet. Don't disparage my primary tech stack like this ^_^ The traffic from a HN frontpage is relatively low per second tbh.

[deleted]
Post reply on HN