Prefab Cloud Safety/Durability Levels

Prefab rate limiters currently come in two levels.

Each limit definition that you create can be created at any durability level.

L4_BEST_EFFORT [Default]

  • provided
  • coordinated limit definitions edit limit definitions in our UI
  • Small likelihood of lost limit tracking in failure scenarios
  • Cheaper than level-5


  • provided
  • All reads and writes hit the backing store which replicates data across three facilities in an AWS Region to provide fault tolerance in the event of a server failure or Availability Zone outage.
  • 3 year Persistent
client =
ratelimit_client = client.ratelimit_client

# override default safety_level to bombproof
                        safety_level: Prefab::LimitDefinition::SafetyLevel::L5_BOMBPROOF)

# use limit as normal
if ratelimit_client.pass?("grp")
safety level 4

Prefab API will use our internal Redis cache with safety level 4.

safety level 5

Prefab API skips Redis cache and uses DynamoDB directly in Strongly Consistent mode with safety level 5.