AI Agents Are Flooding Public Services - Build Your Spring Boot Defenses Before They Reach Your API
Description and use
Public services are facing 'agentic flooding' where legitimate users submit high-volume requests generated by AI, overwhelming processing teams. The article proposes using Bucket4j to limit submissions per authenticated user, but notes this does not address qualitative flooding (e.g., massive single requests).
Problem
Public services and APIs are experiencing 'agentic flooding' where legitimate, authenticated users submit high-volume, high-complexity requests generated by AI agents, overwhelming processing teams without triggering traditional bot detection.
Outcome
The implementation of per-identity rate limiting with burst allowances effectively caps the number of submissions from a single authenticated user, preventing quantitative flooding. However, it does not address qualitative flooding (e.g., massive single requests), requiring additional defenses.
Workflow
- Identify submission endpoints that accept free-form text through open channels.
- Implement per-identity rate limiting using Bucket4j to handle quantitative flooding.
- Configure a bucket with a burst allowance (e.g., 5 submissions) and a refill rate (e.g., 5 per hour).
- Apply the rate limiter at the submission endpoint, not globally.
- Return a 429 status with a Retry-After header for legitimate users who hit the limit.
- Implement additional defenses for qualitative flooding (e.g., content analysis, size limits).
Evidence
In 87 percent of cases, the flooding came from LLMs generating large amounts of sophisticated text, submitted by humans who navigated the rest of the process manually.
A user submitting one four-thousand-page document per hour is perfectly rate-limit-compliant.
- Record date: 2026-09-05T15:14:30.946Z