Skip to content

Persisting entity information #609

Answered by markphelps
renegat4 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @renegat4, great question!

You're correct that Flipt doesn't store any info about entityID or which variant an entity matches in the database. This is for two main reasons:

  1. I want it to be fast since evaluation is the most common use case and depends on traffic to your app/site, so I don't want Flipt to be the bottleneck
  2. Keeping track of entityIDs would likely result in a large amount of data being stored since they are basically infinite as they can be any value

So instead, Flipt uses a technique where it hashes the entityID with the flagKey using this function which uses the stdlib hash/crc32.ChecksumIEEE function to create the hash.

It then creates a slice of 'buckets' along with…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@sashayakovtseva
Comment options

@markphelps
Comment options

@markphelps
Comment options

Answer selected by markphelps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants