Omnetra Infotech — Custom web & mobile application development agency based in Rajkot, Gujarat, India.
Contact us · View our services · Start a project

Rate Limiting & DDoS Basics for Application Developers

By Security Consultant•September 5, 2026•5 min read

Limit by cost, not uniformly

Login, OTP, and payment endpoints need strict limits (5–10/min per IP + account); read APIs tolerate hundreds. Uniform limits either strangle legitimate use or leave expensive endpoints exposed. Map limits to abuse cost per endpoint.

Algorithm choice

Token bucket for bursty-legitimate traffic (checkouts), fixed window with Redis for simplicity, sliding window for precision on auth endpoints. Store counters in Redis with TTLs — in-memory limits die with horizontal scaling and forget across restarts.

DDoS layers

L3/L4 absorbed by Cloudflare/AWS Shield automatically; L7 (slow POSTs, search abuse, login floods) needs application rules — WAF managed rules plus custom rate rules plus origin shielding. Test with controlled load before sale season, not during.

Abuse signals to alert

Credential-stuffing waves (login failure spikes from rotating IPs), card-testing (small-amount payment bursts), and scraping (sustained high-rate catalogue hits). Each gets a runbook: block, challenge (Turnstile), or throttle — decided in advance, executed in minutes.

Related Articles

Written by Security Consultant

Specialized engineering teams at Omnetra focus on writing high-performance code, ensuring API security, and optimizing layouts for client success.

Discuss a Project