Contemplating an EXT4 Filesystem for a User Profile Store
Can you build a disk backed user profile store, if you make the following assumptions:
- Retrieval is exclusively by key
- Profiles are relatively large (10kb-20kb)
- It needs to scale horizontally
- It needs to be fast
- Relatively few profiles are hot
I think the answer might be yes, because file systems like ext4:
- Can hold many of files (4B on ext4)
- Can access files quickly on SSDs (25µs)
- Can accomplish TTL with
- Can keep “hot” profiles fast
So, I wonder if this has a few advantages over a database, like:
- No overhead of a database
- Simple replication
- Built-in reliability
The application would then just be a server that accesses the files.
I think replication would be handled by ZooKeeper.
Additionally, I assume using FlatBuffers (or similar binary storage) would improve performance by eliminating the time for serialization and deserialization, as well as network latency. If you do this, you might be able to reduce network traffic by using delta encoding.