Fairvisor vs. Nginx limit_req

The Situation

Nginx limit_req and limit_conn are solid primitives for simple traffic protection.

But modern AI and multi-tenant APIs need richer dimensions: tenant-aware limits, budget controls, staged enforcement, and analytics.

Comparison

CapabilityFairvisorNginx limit_req / limit_conn
AlgorithmToken bucket + cost-based + token-basedLeaky bucket (limit_req), connection count (limit_conn)
Limit keysJWT claims, headers, path, User-Agent, IP, combinations$binary_remote_addr and limited variables
Per-tenant isolationYes (any JWT claim)No (IP-focused unless custom scripting)
Cost-based budgetsYesNo
AI featuresLoop detection, token counting, circuit breakerNo
Staged actionsWarn -> throttle -> rejectReject or delay
Shadow modeYesNo
Dynamic configPolicy hot-reload, SaaS managementRequires reload
AnalyticsDashboard, per-tenant breakdown, exportBasic status + log parsing
Kill-switchYes, propagated in < 10sManual config change + reload

When to Use Fairvisor

  • You need business-context-aware limits (tenant, plan, endpoint).
  • You need AI-specific enforcement and budget controls.
  • You want management UI and operational analytics.

When to Use Nginx limit_req

  • Simple IP-based limiting is enough.
  • You have a small set of endpoints and static rules.
  • You do not need tenant analytics or staged policy workflows.

Use Them Together

  • Fairvisor runs on OpenResty/Nginx runtime foundations.
  • Migration can be incremental: policy replacement, not full infra replacement.
  • Keep your Nginx stack while upgrading enforcement depth.

Outgrowing basic Nginx rate limiting?

See migration path from limit_req to Fairvisor