Hacker News new | ask | show | jobs
by mooneater 3493 days ago
7754 tps over 1 hour is 28M. They may have 1B users in the db but they only tested activity on at most 28M.
1 comments

True, but running at 7754 tps over an hour with a database of 28M users is easier than with a database of 1B users.
It is much easier to test with a small # of active users and a large (mostly unused) database, than with a large # of active users. To me the title implies 1B active users ("billion user load test").
They are two different problems.

If you have many active users, you're testing for the write load of user tokens and sessions.

If you have many accounts, you're testing for the read load of the account database.

Technically speaking, user id and sessions should be two different database systems, because they have different requirements and they're conflicting.

For the first one, the problem is to have lots of write and enough performances. Plus having the storage if you keep tokens forever (typical for auditing).

For the second one, the problem is to be able to store all the accounts, plus read performances (which can always be hacked by adding layers of caching).

Funfact: if each account is only email + password (64 + 64 char), 1 billion accounts consume 128 GB, just for storing the ASCII characters. A lot more in practise with metadata, empty space and other fields.

They say that they only had 1 maria DB on a single EBS P-IOPS volume. That's kinda weird that a 1 billion users database could fit in that -and zero errors, really?-. Maybe they just had a single integer field (1,2,3,4) to define the user and the password :D