The main idea is that you use the user ID as the key for the section, and then all the information needed to search the mailbox will be grouped as strings in this section. You can then set up several tables like this, with different data types clustered in a section to support different types of searches. Because Cassandra can access a partition in essentially constant time even with millions of users, the system can scale and remain fast when nodes and users are added.
You can read the source system description here in section 6.1 of Facebook Inbox Search: Facebook Cassandra Paper .
The description uses earlier Cassandra terminology, such as supercommands, etc.
source share