API Rate Limit Calculator
Calculate API rate limit budgets, burst allowances, and throttling thresholds for effective API traffic management.
Calculate the impact of DNS TTL values on propagation time, resolver cache hit rates, and DNS query volume.
| TTL | Propagation | Auth QPS | Daily Queries | Monthly Cost |
|---|---|---|---|---|
| 30s | 30s | 66.67 | 5,760,288 | $69.12 |
| 1m | 1.0 min | 33.33 | 2,879,712 | $34.56 |
| 2m | 2.0 min | 16.67 | 1,440,288 | $17.28 |
| 5m | 5.0 min | 6.67 | 576,288 | $6.92 |
| 10m | 10.0 min | 3.33 | 287,712 | $3.45 |
| 15m | 15.0 min | 2.22 | 191,808 | $2.30 |
| 30m | 30.0 min | 1.11 | 95,904 | $1.15 |
| 1h | 60.0 min | 0.56 | 48,384 | $0.58 |
| 2h | 120.0 min | 0.28 | 24,192 | $0.29 |
| 4h | 240.0 min | 0.14 | 12,096 | $0.15 |
| 12h | 720.0 min | 0.05 | 4,320 | $0.05 |
| 1d | 1,440.0 min | 0.02 | 1,728 | $0.02 |
| Record | Recommended TTL | Notes |
|---|---|---|
| A / AAAA | 300–3600s | Lower for failover-ready services, higher for stable IPs |
| CNAME | 300–3600s | Match the target record's TTL when possible |
| MX | 3600–14400s | Mail servers change rarely; higher TTL is fine |
| TXT (SPF/DKIM) | 3600–86400s | Seldom changes; lower before planned updates |
| NS | 86400s+ | Delegation changes are rare; keep high |
| SRV | 300–900s | Service discovery benefits from lower TTLs |
DNS TTL (Time to Live) controls how long resolvers cache a DNS response before querying the authoritative server again. Higher TTLs reduce DNS query volume and improve resolution speed from cache. Lower TTLs enable faster propagation of DNS changes but increase query load.
This calculator helps you understand the trade-offs of TTL values for your domains. It estimates cache hit rates, propagation times, and the query volume impact of different TTL settings. This is especially important when planning DNS migrations, failover configurations, or CDN integration.
Before a planned DNS change (migration, failover test), lower the TTL in advance by the current TTL duration. For example, if TTL is 3600 seconds (1 hour), lower it to 300 seconds at least 1 hour before the change. This ensures all cached entries expire before you make the change.
DNS TTL values directly affect how quickly your domain changes take effect and how many queries hit your DNS servers. This calculator helps choose the right TTL for different scenarios.
Propagation Time ≈ TTL (worst case all resolvers have cached entries)
Queries to Authority = resolvers / TTL (per second, per resolver refresh)
Cache Hit Rate ≈ 1 − (resolvers / (resolvers + requests_per_sec × TTL))Result: Propagation: ~5 min, ~1.67 auth queries/sec
At TTL 300 seconds, resolvers cache for 5 minutes. Each of 500 resolvers re-queries every 300 seconds: 500/300 = 1.67 queries/sec to the authoritative server. With 100 rps total, cache hit rate is very high since most requests are answered from resolver cache.
Static infrastructure (mail servers, name servers): TTL 3600–86400 seconds. These rarely change and benefit from aggressive caching. Web applications with potential failover: TTL 60–300 seconds. These need to change quickly during incidents.
The pre-migration TTL dance: (1) Lower TTL to 60–300 seconds, (2) Wait for the old TTL to expire, (3) Make the DNS change, (4) Verify propagation, (5) Raise TTL back to normal. Skipping step 2 means some resolvers still have the old record cached at the high TTL.
Cloud DNS services charge per million queries. At 1,000 resolvers with 60-second TTL, you generate 1,000/60 = 16.7 authoritative queries per second, or ~1.44 million per day. At 3600-second TTL, that drops to 24,000 per day — a 60x reduction.
Last updated:
For most records: 300–600 seconds (5–10 minutes) balances change speed with cache efficiency. For stable records: 3600 seconds (1 hour) or more. For records requiring instant failover: 30–60 seconds (high query cost).
Maximum propagation time equals the previous TTL value. If TTL was 3600 seconds, all resolvers will have updated within 1 hour. In practice, many resolvers update sooner as their cached entries expire at different times.
No. Some resolvers enforce minimum TTLs (e.g., 30 or 60 seconds). ISP resolvers may ignore low TTLs. Client operating systems cache DNS independently. Real-world propagation has a long tail even with low TTLs.
TTL under 60 seconds significantly increases query volume to authoritative servers and can increase latency for initial requests (cache misses). Some cloud DNS providers charge per query, making very low TTLs expensive.
TTL 0 means no caching, but many resolvers treat it as a minimum of 30–60 seconds. It dramatically increases authoritative query load. Use it only for testing or when instant record changes are critical and you can handle the query volume.
During a failover, DNS records change to point to backup infrastructure. The failover takes effect as resolver caches expire. With 300-second TTL, full failover takes up to 5 minutes. Health-check-based DNS (Route 53) can trigger changes faster.
Calculate API rate limit budgets, burst allowances, and throttling thresholds for effective API traffic management.
Calculate file transfer time and effective throughput from bandwidth, latency, and protocol overhead for network planning.
Calculate the infrastructure and compute cost of webhook delivery retries with exponential backoff strategies.