top | item 27623647

Ask HN: SQLite for Classified Ads Website?

2 points| danny_sf45 | 4 years ago

I will build a very simple classified ads website where I have:

- around 500-1K ads will be published per day. Login required

- around 10K-20K visitors per day. No login required

- simple search (by category, free text field) and sorting (by date). No login required

- one paginated homepage where ads are displayed by date, and one page to see the details of a specific ad

- no images. It's all text-based

My plan is to use nginx + Go + SQLite + redis. Big assumption I'm making here is that the website is heavy on reads and very lightweight on writes (reasonable assumption since I maintained a similar website some years ago, so I have some experience in this regard). Also, I don't see the website growing in the near future (I have numbers that say that traffic will remain as stated above at least for 1 year).

Do you think SQLite will be enough? Main reason to not use MySQL/Postgres is: maintenance, simplicity but above all I think it will be overkill. Also, I'm planning to heavily cache searches (either on nginx side or redis). So, what do you think?

2 comments

order

onion2k|4 years ago

SQLite is easily fast enough for what you propose, but if you're worried about it design a way to test it. Measure first, then optimize.

Plus, if you build it in a way that enables you to scale up (vertically to a 'better' database or horizontally to more SQLite databases) it won't even matter.