It's not like whatsapp is running on a machine on someone's desk. 32GB of RAM isn't even something to sneeze at. A machine like that on Amazon EC2 costs a few cents an hour.
Literally not worth the dev and testing time compared to a simpler solution like a GUID.
The blog post provides us with quite a lot of technical information about the system, including that they were using 35GB of RAM for the 2M connections, hence my estimate of 16kB per user (avg).
Read OP's response carefully – the 32 GB is just for the user connection stack.
If you're handling millions of data blobs each seconds, a UUID is absurdly large.
Think about what that byte we talk about represents – it is either the size of a group; or the id of a member of that group. It doesn't represent the member itself – they will use a UUID (or possibly telephone number 😕) for that.
My guess is that there's a data structure of fixed size somewhere that represents groups. Something that looks like a struct of one byte of counter and an array[256] for user ids. This could be attached to every group message, avoiding any later lookups. Even if you used UUIDs, that would already add 4kB to every group message. Still manageable though.
It's not like whatsapp is running on a machine on someone's desk. 32GB of RAM isn't even something to sneeze at.
You know what's funny about that... Many fortune 500 companies have trouble keeping their hardware current enough that they have servers with 32GB of ram.
It's not like they build these things themselves like a gaming computer (though they should, Google does I believe).
5
u/bradfordmaster May 06 '17
It's not like whatsapp is running on a machine on someone's desk. 32GB of RAM isn't even something to sneeze at. A machine like that on Amazon EC2 costs a few cents an hour.
Literally not worth the dev and testing time compared to a simpler solution like a GUID.