Chapter 04 · Cloudflare Deploy
Subchapter 4.34
references/argo-smart-routing/gotchas.mdMarkdown4 KBView on GitHub
Smart Shield Note: Argo Smart Routing evolving into Smart Shield. Best practices below remain applicable; monitor Cloudflare changelog for Smart Shield updates.
Problem: API returns error “Argo Smart Routing is unavailable for this zone”
Cause: Zone not eligible or billing not set up
Solution:
Problem: API call succeeds but status remains unchanged, or editable: false in GET response
Cause: Insufficient permissions or zone restrictions
Solution:
Zone:Argo Smart Routing:Edit permissioneditable: true in GET response before attempting PATCHeditable: false, check:
Problem: GET request returns "editable": false, preventing enable/disable
Cause: Zone-level restrictions from billing, plan, or permissions
Solution Pattern:
const status = await client.argo.smartRouting.get({ zone_id: zoneId });
if (!status.editable) {
// Don't attempt to modify - will fail
console.error('Cannot modify Argo settings:');
console.error('- Check billing is configured');
console.error('- Verify zone has Enterprise+ plan');
console.error('- Confirm API token has Edit permission');
throw new Error('Argo is not editable for this zone');
}
// Safe to proceed with enable/disable
await client.argo.smartRouting.edit({ zone_id: zoneId, value: 'on' });Problem: 429 Too Many Requests error from API
Cause: Exceeded API rate limits (typically 1200 requests per 5 minutes)
Solution:
import { RateLimitError } from 'cloudflare';
try {
await client.argo.smartRouting.edit({ zone_id: zoneId, value: 'on' });
} catch (error) {
if (error instanceof RateLimitError) {
const retryAfter = error.response?.headers.get('retry-after');
console.log(`Rate limited. Retry after ${retryAfter} seconds`);
// Implement exponential backoff
await new Promise(resolve => setTimeout(resolve, (retryAfter || 60) * 1000));
// Retry request
}
}| Resource/Limit | Value | Notes |
|---|---|---|
| Min requests for analytics | 500 in 48h | For detailed metrics via GraphQL |
| Zones supported | Enterprise+ | Check zone plan in dashboard |
| Billing requirement | Must be configured | Before enabling; verify payment method |
| API rate limit | 1200 req / 5 min | Per API token across all endpoints |
| Spectrum apps | No hard limit | Each app can enable Argo independently |
| Traffic counting | Proxied only | Only orange-clouded DNS records count |
| DDoS/WAF exemption | Yes | Mitigated traffic excluded from billing |
| Analytics latency | 1-5 minutes | Real-time metrics not available |