Re:Death by a Thousand Microservices
by omegabravo on Tuesday September 12, 2023 @04:39AM
(#37478275)
doing it on your phone only has one person querying it. Scale that to several thousand and it might appear different.
[ Parent
| on HN ]
Re:Death by a Thousand Microservices
by jiggawatts on Tuesday September 12, 2023 @05:41AM
(#37478704)
I've scaled 300M rows to 1M users... in 2005... on boxes with spinning rust in them.
It amazes me that my comment (while flippant) got voted down. It's true.
Your phone can quite literally update a 50M table, say, 10K times per second.
If you think that you need more transactions than that per second (nearly a billion per day), then congratulations: you're Facebook.
Re:Death by a Thousand Microservices
by sethammons on Tuesday September 12, 2023 @06:58AM
(#37479210)
I believe you are downvoted due to the "how cute" part, not the scale part. You could have delivered useful info without a put down
It's not that good usually, e.g. PostgreSQL writes data in pages (8 KB by default), and changing 10K random rows in the 50M rows table can be quite close to the worst case of 1 changed page per changed row, so 8x of your estimate. Also need to multiply x2 to account for WAL writes. Also indexes. It's not hard to hit a throughput limit, especially with HDDs or networked storage. Although local SSDs are crazy fast indeed.
Re:Death by a Thousand Microservices
by jiggawatts on Tuesday September 12, 2023 @07:34AM
(#37479497)
Agreed: 80MB/s for the random 8K page updates. However, transaction logs in modern databases are committed to disk in batches, and each log entry is smaller than a page size. So a nice round number would be 100 MB/s for both.[1]
For comparison, that's about 1 gigabit per second in the era of 200 Gbps networking becoming common. That's a small fraction of SSD write throughput of any modern device, mobile or not. Nobody in their right mind would use HDD storage if scaling was in any way a concern.
[1] Indexes add some overhead to this, obviously, but tend to be smaller than the underlying tables.