Blog

API Rate Limiting: Protect Capacity and Control Usage

Compare request rate, simultaneous work, and usage quotas, then turn a report-export workflow into a practical policy for your application and managed WAF.

API rate limiting controls how frequently a client can request work from an application. For a customer portal, choose limits around the work each function performs: how often requests arrive, how much work can run at once, and how much usage is permitted over time. A quick order lookup and a large report export should not automatically receive the same policy.

An application programming interface (API) is the route through which software requests data or actions. The IT manager approving portal protection needs an operating requirement that the application developer and managed security team can implement together.

Choose the limit that matches the resource

Begin with the expensive functions. An export can occupy database capacity long after its initiating request arrives. A notification request can incur a third-party charge. The OWASP API Security guidance on resource consumption identifies processing, data size, batched operations, and paid integrations as separate things to bound.

Three controls for different kinds of API demand
ControlWhat it measuresDecision it supports
Request rateRequests admitted during a defined interval, including any permitted burst.How quickly may this caller start more work?
ConcurrencyWork currently in progress.How much simultaneous processing may this caller or service occupy?
Usage quotaTotal permitted consumption during a defined period.How much cumulative use or cost will the business allow?

Microsoft's API throttling guidance distinguishes short-term rate controls from longer-term usage quotas. Its application rate-limiter documentation separately describes limiting concurrent requests. These examples describe Microsoft implementations; confirm the controls available in your own deployment.

For background processing, our recommendation is to define concurrency around the active jobs themselves. A request that quickly returns “accepted” can leave a report running after the web request ends. Limiting only simultaneous web requests would leave that later workload outside the counter. Also bound the work inside one request, such as the permitted report range or batch size.

Decide whose allowance is being consumed

A limit needs an identity or grouping: source address, authenticated user, customer organization, integration, or the service as a whole. Microsoft notes that multiple users can share one public Internet Protocol (IP) address. A strict per-address allowance can therefore make colleagues compete for the same budget.

For authenticated exports, a customer-level allowance can express the commercial entitlement, while a user-level control can prevent one employee from consuming it immediately. A service-wide concurrency cap protects the shared workers. The application must derive those identities from verified authentication and authorization; a caller-supplied customer name is not sufficient.

Define where each counter applies. Microsoft's application middleware example keeps counters separately in each running instance. That illustrates why “global” needs clarification: a setting may cover one process rather than every server. Ask the operator whether a limit is enforced across the complete deployment, how resets work, and what happens if the counter service is unavailable.

Give the WAF and application distinct jobs

Network Box USA's managed Web Application Firewall (WAF) service provides request filtering, application policy, rule tuning, and reporting. The WAF+ overview documents granular restrictions by user, path, and web address (URL), operated by a 24/7 security operations center.

That managed work helps apply targeted controls to abusive requests and review their effect on legitimate portal use. Agree which routes, matching conditions, rate controls, and counters the proposed deployment actually supports. The application owner retains responsibility for authorization, background-job limits, and business usage accounting unless specific additional work is agreed.

Place each decision where the necessary information is available. The gateway may identify a request path; the application knows whether an export is already running and which customer is entitled to it. Keep the application's permitted origin routes under review so an alternate address does not bypass the intended gateway policy.

Apply the comparison to a report-export policy

Consider a hypothetical distributor whose customers use a portal to look up orders and export sales history. The IT manager wants ordinary lookups to remain responsive while preventing repeated exports from monopolizing the reporting workers. Assume exports run as background jobs and users belong to authenticated customer organizations.

Apply a separate admission limit to report-export requests. Bound the date range and work accepted per export. Limit active export jobs per customer and across the reporting service, with a bounded waiting queue or an explicit refusal. Apply the agreed period usage allowance to each customer. Keep ordinary order lookups under their own policy.

This proposal assigns export allowances by customer identity rather than treating an internet address as a customer. Separate organizations sharing an address retain separate allowances; colleagues in one organization share its agreed quota. The active-job limit and bounded queue also constrain the backlog that successive accepted requests can create. The team still needs measured workload data to set the actual values; there is no universal safe requests-per-minute number.

Choose those values from representative report sizes, completion times, normal customer demand, and the capacity reserved for other work. Decide what counts toward the quota—accepted jobs, completed jobs, or measured processing—and how failed jobs and cancellations affect it. The business owner approves the entitlement; engineering makes its accounting consistent.

Make reaching a limit a usable outcome

For request throttling, Hypertext Transfer Protocol (HTTP) status 429 Too Many Requests communicates that the caller exceeded a rate limit. RFC 6585 says the response should explain the condition and may include Retry-After to indicate a waiting period. Agree the portal message and client retry behavior so an impatient refresh does not repeatedly resubmit the same work.

Validate the policy in an authorized test environment with synthetic records: ordinary lookups should remain usable while export requests reach their limit; users sharing an address should receive the intended individual or customer treatment; and rejected exports should not create background jobs. Include the actual multi-server arrangement where counters must be shared. Use agreed stop conditions and capacity bounds rather than stressing the live portal to failure.

Start the protection discussion with the expensive operation, its business allowance, and the behavior customers should see when it is reached. Contact our team to review the managed WAF portion alongside your application team's workload controls.