Nat TaylorBlog, Product Management & Tinkering

Contemplating an EXT4 Filesystem for a User Profile Store

Published on . Updated on

Can you build a disk backed user profile store, if you make the following assumptions:

  1. Retrieval is exclusively by key
  2. Profiles are relatively large (10kb-20kb)
  3. It needs to scale horizontally
  4. It needs to be fast
  5. Relatively few profiles are hot

I think the answer might be yes, because file systems like ext4:

  1. Can hold many of files (4B on ext4)
  2. Can access files quickly on SSDs (25µs)
  3. Can accomplish TTL with mtime
  4. Can keep “hot” profiles fast mmap()

So, I wonder if this has a few advantages over a database, like:

  1. No overhead of a database
  2. Simple replication
  3. 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.

Popular Posts

Post Navigation