Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Step1: Adding the first PID for user will create a bloom filter for this user in the cached map (let call it bloom_filter_1)
    • Any new PIDs will be added to this cache within producer.id.quota.window.size.seconds 
  • Step2: A new bloom filter will be created along side the old one for the user once we exceed producer.id.quota.window.size.seconds (let's call it bloom_filter_2).
    • All new PIDs from this point will be added to the new filter. 
    • Both bloom filters will be used to check if we came across the same PID before or not. 
  • Step3: The old bloom filter (bloom_filter_1) will be disposed once we reach 1.5 x producer.id.quota.window.size.seconds. Leaving only bloom_filter_2
    • From this point the cache will be only using bloom_filter_2 until the next producer.id.quota.window.size.seconds start
  • Step4: Repeat steps 2, and 3 on bloom_filter_2 once we reach next producer.id.quota.window.size.seconds

Users User entry in the cached map will be entirely removed from the caching layer if it doesn't have any active bloom filters attached to it anymore. 

...