SQLite and LiteFS: The Guts of QuickLinker-ZeroRPM ā
Okay, letās talk about why SQLite and LiteFS are the heavy hitters keeping QuickLinker-ZeroRPM alive. Iām chasing 100,000 requests a minute at zero cost, and these two are how Iām making it happenānot just some tech buzzwords, but the real deal. Hereās why theyāre my go-to, how they stack up against the big shots like PostgreSQL and MongoDB, and what LiteFS brings to the party.
SQLite: My Cheap, Tough Sidekick ā
I picked SQLite because I wanted something that wouldnāt cost me a penny but could still take a beating. Hereās why itās clutch:
No Cash, No Problem: SQLiteās a file on my VMāno server, no fees, no bullshit. Running it on Oracleās free tier (4 cores, 24 GB RAM) means Iām not shelling out a dime, and itās still got grit.
Fast as Hell: I tweaked itāWrite-Ahead Logging, sync tricks, memory mappingāand itās pumping 80,000 inserts a second (proof here). For 100,000 RPM (1,666 req/s), Iāve got 1% writes (16.7 new URLs/s) and 99% reads (1,650 redirects/s). Redis snags 99% of those reads, so SQLiteās left with ~33 ops/s. Thatās nothingāitās barely breaking a sweat.
Real Deal Vibes: Bit.lyās at 23,000 RPM with ~230 new URLs a minute (Bitly stats). My targetās bigger, but the patternās the sameālow writes, perfect for SQLite.
PostgreSQL? MongoDB? Postgres was my Phase 1 buddyāsolid, consistent, easy for 100 req/s. But at 100,000 RPM, itās begging for replicas, and thatās cash I donāt have. MongoDBās a read beast, but Redis already owns that, and its 3-node HA setup? $15-30 a month. Hell noāSQLiteās my ride-or-die.
LiteFS: Toughening Up the Game ā
SQLiteās a champ, but itās got one hitchāsingle-node life. If my VM tanks, Iām toast. Thatās where LiteFS swoops ināI stumbled on it late and lost my mind (LiteFS GitHub). Hereās why itās dope:
Free Backup Plan: LiteFS syncs SQLite across nodes using some FUSE filesystem magic. No extra VMsāit piggybacks on the free tierās leftovers. One node flops? Anotherās got my back. Thatās 99.9% uptime, no wallet hit.
Keeps It Chill: Itās not replacing SQLiteāitās just adding a safety net. Writes hit one main node, LiteFS mirrors it live. No headache, just plug and play.
Fits Like a Glove: At 33 ops/s (16.7 writes, 16.5 reads post-caching), replicationās smooth. My 4 cores and 24 GB RAM laugh at that load.
I was sweating SQLiteās limits, but LiteFS makes it bulletproof without costing me a thing.
How They Stack Up ā
PostgreSQL: Killer for Phase 1ātight consistency, simple setup. But 100,000 RPM? Youāre coughing up $10-20 a month for replicas. LiteFS does HA for freeāsorry, Postgres.
MongoDB: Scales reads like a pro, but Redis has that covered. HA needs three nodesā$15-30 a month, and itās too chunky for my VM. SQLite + LiteFS keeps it lean.
Street Cred: Shlink runs SQLite in production and loves it (Shlink docs). Toss in LiteFS, and Iām not just survivingāIām flexing.
What I Figured Out ā
SQLiteās a Beast: Everyone calls it a toy, but tune it right and itās a monsterā80,000 ops/s is wild for a file.
LiteFS Steals the Show: Found it late, but itās gold. Reliability at $0? Shouldāve hyped it from day one.
Cachingās My Ace: Redis handling 99% of reads means SQLite and LiteFS barely work. That 80/20 rule (80% traffic, 20% URLs) is my cheat code.
Why Itās a Lock ā
This duoās got me coveredā100,000 RPM, $0, 99.9% uptime. SQLiteās fast, LiteFS is tough, and Oracleās free tier (4 Gbps = 2.4M RPM headroom) is overkill in the best way. Bit.ly, Shlink, and benchmarks back me up. This isnāt just doableāitās a brag.
Whatās Next? ā
- Phase 1: Where I kick it off.
- Cost Analysis: How I keep it at $0.
- References: The stuff I dug up.
Last Updated: March 11, 2025