TecharoHQ / TecharoHQ/anubis

[Feature request] global request-rate threshold to enable challenges only under load

Open
#1,925 2 comments 0 reactions 1 assignee View on GitHub

@Xe is already working on this.

Since Sep 1, 2026.

Dominant language
Go
Stars
22.5k
Forks
726
Avg merge
1d 15h
Merged PRs (30d)
35

Description

Is your feature request related to a problem? Please describe.

Currently Anubis evaluates every request independently — a client is challenged based on its own UA / IP / weight, regardless of how much traffic the site is receiving overall. For sites that mostly care about uptime rather than blocking every crawler, it would be useful to run Anubis in a "passive" mode by default and only start challenging when total request rate crosses a threshold (similar to Cloudflare's "I'm Under Attack" mode, but automatic).

Proposed behaviour

  • Anubis keeps a sliding-window counter of incoming requests (e.g. last 60s), in-process by default, optionally backed by the existing Valkey store for multi-replica setups.
  • The current rate is exposed to CEL as a variable (e.g. global.rps), so operators can write rules like:
  - name: under-attack
    expression: "global.rps > 500"
    action: WEIGH
    weight:
      adjust: 20

to push all non-ALLOW traffic into a CHALLENGE threshold. This keeps the mechanism configurable rather than hardcoded.

  • ALLOW rules (search engines, etc.) are unaffected, so indexing is never impacted.

Related

  • #102 — per-client rate-based challenge reissuance
  • #1313 — distributed botnets where per-IP limits don't help
  • #1225 — conditional (time-based) rule activation
Solution you would like.

1

Describe alternatives you have considered.

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.