| ▲ | strbean 5 hours ago | |||||||
Imagine if every tweet had to go through a one-at-a-time queue before being persisted. There's about 6000 tweets per second, so you would have to be able to save them at <0.17ms per tweet or else you would become backlogged. If you are getting backlogged, you have to buffer those incoming tweets somewhere until they can be writted, and eventually that buffer gets full and you start losing tweets. | ||||||||
| ▲ | goobatrooba 4 hours ago | parent | next [-] | |||||||
Maybe that too is a native question, but there's a large scale between single user and 6000 tweets per second - most of our apps will never reach anything approaching even one save a second. So where to draw the line? I do far have gone the sqlite route for my hobby apps as it's so easy to handle and doesn't require setting up two docker containers for a single app. Am I drawing myself in a corner in case my apps ever do become relevant? | ||||||||
| ||||||||
| ▲ | AlotOfReading 3 hours ago | parent | prev | next [-] | |||||||
If we imagine 1 tweet = 1 transaction, that's only 6k tps. 6k tps is completely achievable, dare I say even pedestrian for an optimized database. And most systems are operating far below the scale of Twitter/X. | ||||||||
| ▲ | Scaevolus 3 hours ago | parent | prev | next [-] | |||||||
Sqlite can quite easily do 5000+ insert+commits per second on typical NVMe drives. Speed is rarely the constraint that makes it unsuitable for an application. | ||||||||
| ▲ | sevenzero 5 hours ago | parent | prev [-] | |||||||
While I understand your point and like the explanation, I gotta make the joke that some Tweets should be lost | ||||||||