Skip to content

recommended redis maxmemory_policy? #699

Closed

Description

@jjb

I was surprised to find little discussion of this anywhere and no mention in issues or code, so I wonder if I'm using the wrong search terms - I'm wondering what a recommended redis maxmemory_policy is. I'm guessing noeviction is not a good idea.

claude says

The volatile-lru recommendation is logical since Rack Attack uses expiring keys, but it's not formally documented by the project

deepseek says

If you are unsure or don't use TTLs, start with allkeys-lru.

If you confidently set TTLs on all Rack::Attack keys, use volatile-ttl.

Activity

  1. mperham commented on Oct 30, 2025

    @mperham

    rack-attack uses Redis as a persistent cache and should be setting TTLs on all keys so I would agree with volatile-ttl. Any keys without TTLs should be considered a bug.

  2. santib commented on Nov 24, 2025

    @santib
    Collaborator

    Agree with Mike, volatile-ttl seems the best option. I guess the only exception would be if you want to hard fail in case the Redis memory gets filled to prevent an attacker doing this on purpose to bypass Rack::Attack.

  3. locked and limited conversation to collaborators on Nov 24, 2025
  4. converted this issue into a discussion #703 on Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions