In this case the limit was entirely arbitrary.
The programmers were told to pick a limit and they liked 256. There are issues with having a large number of people in a group, but it wasn’t a hardware limit for this particular case.
But it’s still not oddly specific, they picked a nice round number
As a software engineer: actually there is no need for a number of people as a power of 2 unless you need exactly 1 byte to store such information which sounds ridiculous for the size of Whatsapp
Or some binary search tree with an artificial height lol.
It’d make sense at protocol level. Otherwise, yeah, even bit-size database columns end up being stored as a word unless the engine compacts it.
I remember thinking something similar when I was a kid modding Starcraft. Max levels/ranks in researching was 256 and I always wondered why such a weirdly specific number.
Since you start counting from zero, the byte limit should be 255 = 2^8 - 1.
If you create a table and number the first row with “0”, you’ll need 256 rows to reach row index “255”
The count is 0 through 255, which equals 256 total.
I guess it’s you and 255 others?
There are only two hard problems in computer science:
- naming things,
- cache invalidation,
- off-by-one errors.
I’m afraid you’ve fell victim to the problem 2.
I see what you did there.
I’m typing this on a 64 bit device. Why anyone would limit something to an 8 bit number in 2025 is really odd.
I get what you’re saying but I don’t like this line of thinking. In the tech industry there is far too much bloat that we just accept due to cheap memory and storage.
There’s much better algorithmic and datatype optimizations to be made than to design your app around saving 3 bytes that most runtimes probably represent as a long long anyways
True but more generally things like Electron apps, not precompiling classes in interpreted languages’ Docker images, looping through millions of records without plucking only the data you need, etc seem to be widespread and shrugged off.
While writing code you can get in the habit of doing things efficiently and long-term the cost savings pile up. Obviously caring about only this one specific case will hardly accomplish much on its own.
It’s for their servers. I guess it might have to do with cache optimization reasons. For performance reasons, they want to ensure they can fit as much as possible in the cache. One extra byte can throw the memory alignment off, which cause wasted space in cache.
Just my guess. There might be other reasons.
A single username will use up more memory than an 8-bit limitation to the number of users will save.
Whatsapp has 2 billion users.
The difference is 16 billion bits compared to 128 billion bits, or about 16 GB and that is just for the number.
When working with big sizes, memory optimization is key.
How about the processor optimization as your 8 bit number needs to be packed and unpacked every time you want to use it?
I you read the responses here, there’s enough ambiguity about the choice of 256 users to maybe put a damper on the reflext to gatekeep computer science from a journalist.
On a device with many gigabytes of RAM and probably terabytes of storage.
I guess when you have billions of users, and presumably tens or hundreds of billions of instances of a thing living in your sever every bit adds up? I don’t even know where to even start doing the napkin math for something like that.
100 billion messages per day and over half of them in groups apparently. It’s a lot, but 3 bytes per message is still not a lot of data. I’d guess they pack the metadata as tight as possible.
That’s the thing, right? What’s “a lot of data” at these scales? Since they keep all these messages indefinitely (and users keep up to two copies of each, too) that’s 100 gigs of data per byte that they save per day. 40 Terabytes per year. Plus 40 more among their collective users and another 40 presumably stashed in some Google Drive somewhere.
It’s a lot for me, and it’ll cost you what? A couple grand to store at home? That’s a drop in the ocean of a company like Meta with petabytes upon petabytes of garbage stored all over the place… but then again, if I was making a thing and I could shave 40TB a year of storage I… probably would?
I don’t know, the scope of modern, monopolistic online services is mind-boggling. I’m in the space where I’m savvy enough to understand how massive this nonsense is but also not working on it directly enough to be desensitized about the numbers. It’s like trying to figure out how many people live on the planet, your brain can parse that it can’t parse what you’re trying to do and the dissonance makes you all wobbly.
evenly specific
Since people are binary like the great Orange says, they have to use a power of 2?
Because 257’s a crowd
deleted by creator
So, I get that 256 is a base 2 number. But we’re not running 8-bit servers or whatever here (and yes, I understand that’s not what 8-bit generally refers to). Is there some kind of technical limitation I’m not thinking of where 257 would be any more difficult to implement, or really is it just that 256 has a special place in someone’s heart because it’s a base 2 number?
Maybe each user has a user id in a group, and that group user id is stored as 8bit int? Idk
The issue isn’t storing each individual ID, it’s all of the networking operations that are done and total things that are stored/cached per user in each chat. All of those things are handled and stored as efficiently as possible. Sure they could set it to any number, but 256 is a nice round one when considering everything that is happening and the use cases involved. They have user research data and probably see that 128 is too close to a group size that happens with some regularity, but group sizes very rarely get close to 256, and 512 is right out.
when writing somewhat low-level code, you always make assumptions about things. in this case, they chose to manage 256 entries in some array; the bound used to be lower.
but implicitly there’s a tradeoff, probably memory / CPU utilisation in the server.
it’s always about the tradeoff between what the users want, what is easier for you to maintain, what your infrastructure can provide, etc.
Because 256 is exactly one byte. If you want to add a 257th member, you need a whole second byte just for that one person. That’s a waste of memory, unless you want to go to the 64k barrier of users per chat.
If each user is assigned a number as to where they’re placed in the group, I guess. But what happens when people are added and removed? If #145 leaves a full group, does #146 and beyond get decremented to make room for the new #256? (or #255 if zero-indexed). It just doesn’t seem like something you’d actually see in code not designed by a first semester CS student.
Also, more importantly, memory is cheap AF now 🤷♂️
Memory and network stop being cheap AF when you multiply it by a billion users. And Whatsapp is a mobile app that’s expected to work on the crappiest of networks and connections.
It is also used to transmit data including video. I don’t think an additional byte is noticeable on that kind of scale
While I completely agree with the sentiment, snorting too much “memory is cheap AF” could lead to terminal cases of Electron.
Except that they’re almost certainly just using
int, which is almost certainly at least 32 bits.256 is chosen because the people writing the code are programmers. And just like regular people like multiples of 10, programmers like powers of 2. They feel like nice round numbers.
Well, no. They are not certainly using
int, they might be using a more efficient data type.This might be for legacy reasons or it might be intentional because it might actually matter a lot. If I make up an example,
chat_participant_idis definitely stored with each message and probably also in some index, so you can search the messages. Multiply this over all chats on WhatsApp, even the ones with only two people in, and the difference betweenu8andu16might matter a lot.But I understand how a TypeScript or Java dev could think that the difference between 1 and 4 bytes is negligible.
They are not certainly using int
Probably why I said “almost certainly”. And I stand by that. We’re not talking about
chat_participant_id, we’re talking aboutGROUP_CHAT_LIMIT, probably a constant somewhere. And we’re talking about a value that would require a 9-bit unsigned int to store it, at a minimum (and therefore at least a 16-bit integer in sizes that actually exist for types). Unless it’s 8-bit and interprets a 0 as 256, which is highly unorthodox and would require bespoke coding basically all over instead of a basicnum <= GROUP_CHAT_LIMIT.Orrrr they have a u8 chat_participant_id of some kind and a binary data format for message passing. The GROUP_CHAT_LIMIT const may have a bigger data type, but they may very well be trying to conserve 3 bytes per message. Ids can easily start at 0.
150 gigs of bandwidth saved per day doesn’t seem like a whole lot at their scale, but if they archive all the metadata, that’s over 50 terabytes a year saved on storage - multiplied by how many copies they have of their data. Still not a lot tbh, but if they also conserve data in every other place they can, they could be saving petabytes per year in storage.
Still weird because then they’d have to reuse ids when people leave, otherwise you could join and leave 255 times to disable a group lol
And we’re talking about a value that would require a 9-bit unsigned int to store it, at a minimum (and therefore at least a 16-bit integer in sizes that actually exist for types). Unless it’s 8-bit and interprets a 0 as 256, which is highly unorthodox and would require bespoke coding basically all over instead of a basic
num <= GROUP_CHAT_LIMIT.I think you’re just very confused friend, or misunderstanding how binary counting works, because why in the 9 hells would they be using 9 bits (512 possible values) to store 8 bits (256 possible members) of data?
I think you’re confusing indexing (0-255) with counting (0-256), and mistakenly including a negation state (counting 0, which would be a null state for the variable) in your conception of the process. Because yes, index 255 is in fact count 256 and 0 would actually be 1. Index = count -1
I’m imagining something like this:
def add_member(group, user): if (len(group.members) <= GROUP_CHAT_LIMIT): ...If
GROUP_CHAT_LIMITis 8 bits, this does not work.So add a +1 like you would for any index to count comparison?
I guess I’m failing to see how this doesn’t work as long as you properly handle the comparison logic. Maybe you can explain how this doesn’t work…
But I understand how a TypeScript or Java dev could think that the difference between 1 and 4 bytes is negligible.
Shots fired.
Fair point, but still better than wasting a nuclear power plant worth of electricity to solve math homework with an LLM
All these tough guys think you can’t bit shift in Java, never worked on a project with more than two people. Many such cases.
For high volume wire formats using
uint8instead ofuint32can make a huge difference when considering the big picture. Not everyone is working on bootcamp level software.It’s not that they “like it”. It’s ultimately a hardware limitation. Of course we can have 64 bit integers, or however many bits. It’s an appealing optimization.
It’ll have to do with packet headers, 8 bits is a lot for an instant message packet header.
There’s often a lot of fun cheats you can use - bitwise operators, etc - if your numbers are small powers of two.
Also it’s easier to organize memory, if you’re doing funky memory management tricks, if the memory you’re allocating fits nicely into the blocks available to you which are always in powers of two.
They’re not necessarily great reasons if you’re using a language with sufficient abstraction, but it’s still easier in most instances to use powers of two anyways if you’re getting into the guts of things.
Like memory in bits maybe, so 64 128 256 512 1024 2028
Numbers guy here, I can confirm 256 is an evenly specific number, and not an oddly specific number.
User name checks out
Oh you are the numbers guy ? Name every number
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
What about -1 ?

I’m going for the boring but practical answer: x and x . Obviously the second set is doing the heavy lifting.
You should know your limits
nerd
Ha, got eem

As the numbers guy. Do you remember the name of the site that can tell you the what a given number is often associated with?
Wikipedia often has disambiguation pages for numbers that may be helpful in a search like this (https://en.m.wikipedia.org/wiki/71).
WolframAlpha is good for identifying numerical properties of numbers (https://www.wolframalpha.com/input?i=71).
OEIS has a searchable set of sequences (https://oeis.org/search?q=71&language=english&go=Search)
I fear that none of these is what you’re looking for, though. My attempts to find something that sounds like what you want mostly turned up resources on numerology, and at least one article apparently about how the meaning of numbers is radically different between cultures.
No that doesn’t seem to be it. Thanks for trying anyway.
My brain is going to OEIS or angel numbers which are both like total opposites. Number theory or numerology, take your pick.
But is it Numberwang, Mr. Numbers Guy?
Oh yeah well if you’re some sort of numbers guy, answer me this: I think you’re name is super cool, and makes me wonder, is there a largest prime you can make listing digits of pi starting from the beginning. There’s gotta be infinite right?
Pi is suspected to be a normal number (though this has not been proven). If it is normal, it’s likely that integers comprised of the first N digits of pi will be just as likely to be prime as comparable large integers. I suspect but cannot prove that there are infinitely many prime numbers whose digits are the first N digits of pi (with or without the leading 3).
Well, three is prime and pi starts with a three, therefore, even if there’s larger primes, there is one which is the largest. QED.
deleted by creator
Unless there isn’t one that’s the largest because there are infinite primes.
You started at zero and went to infinity. If you start at infinity and go to zero then the first prime you got is the largest. QED.
I can no longer tell if these are bits. 🫠
That’s what she said…
(Yes, this is a bit. 💜)
(Thank you for the kindness of clarity ❤️ I may now be at peace.)
deleted by creator
If it’s engagement bait, it’s working.
I wish we could see what outlet it was for context
The independent
Thanks :)
Enragement bait.
They’re the same picture.
So far at least, I’ve found this much more charming than culture war bait.
Engagement byte
pregagenant
That’s a super old article as well.
They got rightfully roasted in the comments for not knowing even the most basic things about computing.
I remember being puzzled by this and many other numbers that kept cropping up. 32, 64, 128, 256, 1024, 2048… Why do programmers and electronic engineers hate round numbers? The other set of numbers that was mysterious was timber and sheet materials. They cut them to 1220 x 2440mm and thicknesses of 18 and 25mm. Are programmers and the timber merchants part of some diabolical conspiracy?
They just do it to look cool in front of their developer friends.
Pretty much this…
Once upon a time, sure, you might have used an 8 bit char to store an array index and incur a 256 limit for actual reasons…
But nowadays, you do it because 256 is a “cool techy limit”. Developers are almost all dealing with at least 32 bit values, and the actual constraints driving smaller values generally have nothing to do with some power of two limitation.
deleted by creator
Powers of two are the roundest of numbers.
They’re not round, they’re square!
Only every other one…
Slow Clap Well done!
Much later in my career I came to appreciate the beauty of this system and the link with hexadecimal. I had to debug a network transmitted CRC that was endian flipped and in that process learned that in the Galois Field of two, 1+1=0 which feels delightfully nonsensical to a luddite.
















