ARCE is structured as a small distributed control plane for API traffic.
client request
|
v
/check-limit or /consume
|
v
request validation
|
v
behavior observation in Redis
|
v
abuse assessment
|
v
adaptive policy selection
|
v
algorithm enforcement via Redis Lua
|
v
metrics + anomaly recording
|
v
decision response
apps/server: process entrypoint and server bootstrapapps/dashboard: static operator-facing dashboard assetssrc/api: HTTP wiring, route handlers, and request validationsrc/core: limiter orchestration, adaptive policy, and abuse detectionsrc/store: Redis-backed persistence and Lua-enforced limiter statesrc/sdk: Node client and Express middleware integrationsrc/utils: identity, hashing, and request/handler helpersconfigs: runtime configuration and shared constants
- Limiter state for token bucket, leaky bucket, and sliding window
- Short-lived behavior counters used for burst and duplication analysis
- Temporary block records
- Aggregated metrics for the dashboard
Limiter enforcement is the concurrency-sensitive path. Each algorithm is evaluated inside a Lua script so a distributed deployment can share Redis safely without race-prone read/modify/write logic in application code.