Skip to content

[Bot detection] Regenerate challenge only if served #4692

Description

@grasshide

What would you like to be added?

Hey, I just activated the bot detection in my setup and saw the cpu spikes from the regeneration of the challenge. I found that #4674 is already addressing this and with the key_rotation_interval I could bring down CPU usage even more.

One more idea though: Skip the per-epoch signing-key rotation and JS re-obfuscation pass if the
current epoch's challenge has never been served to a client.

Why is this needed?

On an instance where the challenge is scoped to a few hosts (e.g. in homelabs), the rotation runs on a fixed schedule regardless of whether any client was ever challenged. On my system, each pass costs a full CPU core for several seconds, which dominates the process's total CPU usage on an otherwise quiet machine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions