14.2.7
Concepts

Rate limits

Limits are counted per request IP or per server key. Past a limit you get 429 {"error":"rate limited"}. A normal server stays well under a tenth of every limit.

Limits

EndpointLimitKeyed byNotes
POST /api/v1/servers/claim1 / 5 minIPSpent only when a key is issued. Server checks 10 / min, 3 live keys per IP
POST /api/v1/servers/report12 / minserver keyPlus 120 / min per IP
POST /api/v1/servers/revoke20 / minIP
POST /api/plugin/v1/claim10 / minIP
POST /api/plugin/v1/report12 / minserver keyPlus 120 / min per IP
GET /api/plugin/v1/versionnoneCached 5 min
GET /api/maps/{seed}20 / minIPSeeds not generated yet only. Generated seeds are unlimited
GET /api/jobs/{seed}none
GET /api/seedsnone
GET /api/stats/*20 / minIPCached 60 s. Cache hits are not counted

How counting works

  • Fixed windows. A window starts at the first request for that key, ends after the limit period, and the next request opens a new one.
  • Requests past the limit still count. Resending right after a 429 keeps answering 429 until the window ends.
  • Counters live in memory and reset when the service restarts. Only the self-claim 5-minute interval is also checked against the database.
  • 429 responses carry a Retry-After header in seconds. For the self-claim interval it may state the whole interval (300) when the exact remainder is unknown.

The 5-minute self-claim interval

The interval is spent only when a key is issued. 400, 403, 409 and 503 answers and a failed server check give it back, so a wrong port can be fixed and resent at once. The server check itself is limited to 10 per minute per IP, and the 3 live keys per IP are never taken away.

Normal traffic

One server sends one round_start and one round_end per round. periodic at the 60-second default is one request per minute. The 12 per minute per key limit is ten times that. Do not use a periodic interval under 10 seconds; it can reach the limit.

SLMAPS is the seed-map viewer for SCP: Secret Laboratory. These pages describe the public API of slmaps.com.slmaps.com ·