Skip to content
Back to insights
SaaSAPIperformanceMay 23, 20267 min read

API Rate Limiting for Indonesian SaaS

Learn how Indonesian SaaS teams use rate limiting and throttling to protect APIs, control costs, and keep systems reliable.

By APLINDO Engineering

Frequently asked questions

What is the difference between rate limiting and throttling?
Rate limiting sets a maximum number of requests allowed in a time window, while throttling slows or delays traffic when usage is too high.
Where should a SaaS team enforce API limits?
Use layered enforcement: API gateway or edge for coarse limits, then application-level checks for tenant, user, and plan-specific rules.
How do API limits help Indonesian SaaS companies?
They reduce overload, protect shared infrastructure, improve fairness across tenants, and help control cloud and third-party API costs.
What should be returned when a client exceeds the limit?
Return a clear 429 status code, include retry guidance when possible, and make the error message actionable for developers.

Time information: This article was automatically generated on May 23, 2026 at 2:55 PM (Asia/Jakarta, 2026-05-23T07:55:20.249Z).

Why API rate limiting matters for SaaS

For any SaaS platform, APIs are the nervous system of the product. They connect web apps, mobile apps, partner integrations, internal services, and automation jobs. When traffic grows, a single noisy client or buggy integration can create cascading failures. That is why rate limiting and throttling are not optional extras; they are core architecture controls.

In Indonesia, this matters even more because many SaaS products serve customers across different network conditions, usage patterns, and business sizes. A startup in Jakarta may have a few high-volume enterprise tenants, while another customer in Surabaya may send bursts of requests from field teams over variable mobile connections. Without guardrails, the API layer can become unstable fast.

The goal is not to block usage. The goal is to make usage predictable, fair, and safe.

What is the difference between rate limiting and throttling?

People often use the terms interchangeably, but they solve slightly different problems.

Rate limiting sets a hard cap on how many requests a client can make in a defined period. For example, 100 requests per minute per API key. If the client exceeds the limit, the system rejects additional requests.

Throttling is more flexible. Instead of rejecting immediately, the system slows the request flow, queues work, or introduces backpressure. Throttling is often used when the platform can still accept traffic, but not at full speed.

A practical SaaS architecture usually uses both:

  • Rate limiting to protect critical endpoints and prevent abuse
  • Throttling to smooth bursts and keep downstream services healthy

Where should limits be enforced?

The best answer is: at multiple layers.

Edge or gateway layer

This is the first line of defense. API gateways, ingress controllers, or reverse proxies can apply coarse limits before requests reach your application. This protects infrastructure from obvious spikes and reduces wasted compute.

Typical use cases include:

  • Per-IP limits for anonymous traffic
  • Per-API-key limits for external integrations
  • Burst limits for login, OTP, or webhook endpoints

Application layer

Gateway rules are not enough for SaaS products with plans, tenants, and roles. The application should enforce business-aware limits such as:

  • Requests per tenant
  • Requests per user within a tenant
  • Different quotas for free, growth, and enterprise plans
  • Separate limits for read-heavy and write-heavy endpoints

This is especially important in multi-tenant systems, where one customer should not degrade the experience for others.

Downstream service layer

Internal services also need protection. If your billing service, search index, or AI inference endpoint has a lower capacity than the public API, apply service-specific throttles there too. This prevents one overloaded component from taking down the whole stack.

Which algorithms work best?

There is no universal winner, but a few patterns are common.

Token bucket

Token bucket is popular because it allows bursts while maintaining an average rate over time. A client can spend tokens quickly during a short spike, then wait for the bucket to refill. This works well for SaaS APIs where occasional bursts are acceptable.

Leaky bucket

Leaky bucket smooths traffic into a steady flow. It is useful when downstream systems need consistent load and cannot absorb sudden spikes.

Fixed window

Fixed window is simple to implement, but it can create edge effects at window boundaries. A client may send a burst at the end of one window and another at the start of the next.

Sliding window

Sliding window is more accurate and fair, but usually more expensive to compute. It is a good fit when precision matters more than simplicity.

For many teams in Indonesia building SaaS at scale, token bucket is a strong default because it balances performance, fairness, and implementation cost.

How do you design limits for real users?

Good limits should reflect product behavior, not just infrastructure constraints.

Start with these questions:

  • What is the normal request pattern for each endpoint?
  • Which endpoints are expensive to run?
  • Which actions are user-facing and time-sensitive?
  • Which actions can be queued or delayed?
  • Which tenants generate bursty but legitimate traffic?

Then define separate policies for each class of traffic. For example:

  • Authentication endpoints: strict limits, because abuse risk is high
  • Public read endpoints: moderate limits with burst tolerance
  • Export jobs: lower request rate but higher concurrency control
  • Webhooks: retry-aware limits with idempotency support

If your SaaS serves enterprises in Jakarta or across Indonesia, coordinate limits with customer success and implementation teams. Enterprise clients often have legitimate batch jobs, integrations, or office-hour peaks that should be planned for, not treated as abuse.

How do you communicate limits to clients?

A rate limit is only useful if clients can understand it.

Return clear HTTP status codes and headers when possible. The common response for over-limit traffic is 429 Too Many Requests. Include retry-after guidance if the client should wait before trying again.

Also make the error message actionable. Good client-facing messages should explain:

  • Which limit was hit
  • When the client can retry
  • Whether the limit is per minute, per hour, or per day
  • How to request a higher quota

For partner APIs and enterprise SaaS, documentation matters as much as enforcement. A well-documented limit policy reduces support tickets and integration friction.

What are the common mistakes?

Treating all traffic the same

A login endpoint and a reporting endpoint should not share the same policy. Different workloads need different controls.

Limiting only by IP

IP-based rules are useful, but they are not enough for authenticated SaaS. Shared networks, mobile carriers, and NAT can make IP-based blocking unfair.

Forgetting retries and idempotency

If clients retry aggressively after a 429 response, they can make the problem worse. Design APIs with idempotency keys and clear retry guidance.

Not monitoring tenant behavior

In multi-tenant SaaS, one customer can look normal at the request level but still consume disproportionate CPU, database, or third-party API resources. Track usage by tenant, endpoint, and cost center.

Making limits too rigid

Overly strict policies create support burden and frustrate legitimate users. Build room for bursts, exceptions, and plan-based scaling.

Key takeaways

  • Rate limiting protects APIs by capping request volume; throttling slows traffic to preserve system health.
  • The best SaaS designs enforce limits at the gateway, application, and downstream service layers.
  • Token bucket is a strong default for burst-friendly SaaS workloads.
  • Limits should be tenant-aware, endpoint-specific, and aligned with real usage patterns.
  • Clear 429 responses and documentation make limits easier for clients to adopt.

A practical approach for Indonesian SaaS teams

If you are building SaaS in Indonesia, start simple and evolve with usage. A Jakarta-based startup does not need a complex distributed quota system on day one. But it does need a clear policy, observable metrics, and a plan for growth.

A sensible roadmap looks like this:

  1. Protect the most sensitive endpoints first.
  2. Add gateway-level limits for obvious abuse and spikes.
  3. Introduce tenant-aware quotas in the application.
  4. Measure request patterns, latency, and downstream saturation.
  5. Adjust policies as you onboard larger customers or expand internationally.

If your platform includes AI features, billing workflows, or WhatsApp-driven engagement, the same principles apply. For example, a product like BlastifyX or RTPintar would need careful control of message bursts and third-party API usage. A self-hosted product like SealRoute or a compliance platform like Patuh.ai may need different limits for document processing, verification, or audit-related workflows.

The broader architectural lesson is simple: limits are part of the user experience. Done well, they keep your SaaS fast, fair, and resilient.

FAQ

Is rate limiting only for public APIs?

No. Internal APIs also need limits to prevent one service or job from overwhelming shared infrastructure.

Should free and paid plans have different limits?

Usually yes. Plan-based quotas are a common and practical way to align product value with infrastructure cost.

Can throttling replace rate limiting?

Not entirely. Throttling helps smooth load, but rate limiting is still needed to stop abuse and enforce hard boundaries.

How often should limits be reviewed?

Review them regularly, especially after major product launches, enterprise onboarding, or traffic growth. Monitoring should drive adjustments.

Do API limits guarantee uptime?

No. They reduce risk, but reliability still depends on capacity planning, observability, retries, and overall system design.

Ready to ship something real?

Book a 30-minute call. We'll review your roadmap, recommend the smallest useful next step, and tell you honestly whether we're the right partner.