Most API gateways force you into a Faustian bargain: pay $50-$150/month for managed edge proxies or manage a fragile Redis cluster just to keep track of request tokens. RateShield CLI flips this by embedding a high-performance storage engine inside a compiled Go binary, handling millions of requests with sub-millisecond overhead.
Zero External Dependencies, Pure Sub-Millisecond Speed
By running as a sidecar or frontend reverse proxy, RateShield inspects incoming TCP/TLS connections before they reach your application worker processes. It computes TLS JA3 fingerprints on the fly, detecting automated HTTP clients and credential stuffing bots even when they spoof user agents or rotate IP addresses.
Python & FastAPI Integration Example
While RateShield sits in front of your stack, pass-through headers like X-RateShield-Fingerprint and X-RateShield-Action give your Python backend instant visibility into connection metrics.
from fastapi import FastAPI, Header, Request
app = FastAPI()
@app.post("/v1/execute")
async def execute_task(
request: Request,
x_rateshield_fingerprint: str = Header(None),
x_rateshield_action: str = Header("allow")
):
if x_rateshield_action == "tarpit":
# Connection was slowed down at proxy layer before reaching app
pass
return {
"status": "processed",
"client_fingerprint": x_rateshield_fingerprint
}Bot Tarpitting and Automated Defenses
Instead of dropping blocked traffic instantly—which alerts attackers that they have hit a boundary—RateShield features built-in tarpitting. Suspicious connections are trickled at byte-per-second speeds, exhausting attacker socket pools while consuming virtually zero CPU cycles on your host.