API Throughput
ServiceNow imposes two restrictions that limit API throughput. Understanding these restrictions helps you configure both your API client and your ServiceNow instance for optimal performance.
The Two Restrictions
| Restriction | What It Limits | Impact on Squid | Solution |
|---|---|---|---|
| Session synchronization | One request at a time per session | Parallel requests queue up and may be silently dropped | Disable cookies in your API client |
| Semaphore limits | Concurrent API requests per node | Requests rejected with HTTP 429 when limit exceeded | Ensure proper server configuration |
Session Synchronization
ServiceNow processes only one transaction per session at a time, preventing any single user from monopolizing server resources.
How It Affects Squid
When your HTTP client persists cookies, all your requests share the same session. ServiceNow queues these requests and processes them one by one—even if you send them in parallel.
Without cookies (left side): Each request creates a new session. The load balancer distributes requests across all cluster nodes, and they process in parallel.
With cookies (right side): All requests stick to one node and one session. They queue behind each other, and if more than 10 requests queue up, ServiceNow returns HTTP 202—meaning your request was silently dropped.
Why This Matters for Squid
Squid queries routinely take several minutes for large datasets. A single long-running query would block all other requests from your integration if session cookies are enabled. Worse, additional requests may receive HTTP 202 and be silently discarded.
| Scenario | With Cookies | Without Cookies |
|---|---|---|
| Three parallel queries | Execute one at a time (serial) | Execute simultaneously (parallel) |
| One 5-minute query + quick query | Quick query waits 5 minutes | Quick query completes immediately |
| 15 parallel requests | 5+ silently dropped (HTTP 202) | All processed |
The Solution
Disable cookie persistence in your HTTP client. This ensures each request gets its own session and can process independently. See API Client Configuration for code examples in Python, JavaScript, .NET, and other languages.
Creating a new session per request does consume server memory (~20KB per session). However, ServiceNow specifically addressed this for integrations: since Fuji Patch 7, integration sessions have a 5-minute timeout (compared to 30 minutes for UI sessions). This short timeout means sessions from API traffic expire quickly and don't accumulate. With proper timeout configuration, the memory overhead is negligible compared to the performance benefits of parallel processing.
Semaphore Limits
ServiceNow limits how many API requests can run concurrently on each application node. Requests beyond this limit are queued briefly, then rejected with HTTP 429 if the queue fills up.
How It Affects Squid
The REST API semaphore pool (called "API_INT") allows only 4 concurrent requests per node with a queue depth of 50.
When all threads are busy and the queue is full, additional requests are rejected with HTTP 429. A typical ServiceNow cluster with 4 nodes can therefore handle:
- 16 concurrent API requests (4 nodes × 4 threads)
- 200 queued requests (4 nodes × 50 queue depth)
Why This Matters for Squid
Unlike session synchronization (which you solve by disabling cookies), semaphore limits are platform-wide and affect all API consumers. You cannot avoid them—but you can handle them gracefully.
Squid's long-running queries occupy semaphores for extended periods, reducing capacity for other requests. During busy periods, you may encounter HTTP 429 responses.
The Solution
HTTP 429 indicates your ServiceNow instance lacks sufficient capacity for the current load. The solution is proper server configuration—not client-side retry logic, which adds unnecessary complexity to your integration.
Work with your ServiceNow administrator to:
- Increase transaction quota timeouts for Squid API requests
- Configure rate limit rules that accommodate your Squid service accounts
- Monitor semaphore utilization to identify capacity issues before they cause failures
See ServiceNow Configuration for details on these settings.
Quick Reference: HTTP Response Codes
| Code | Cause | Meaning | Your Action |
|---|---|---|---|
| 200 | — | Success | Request processed normally |
| 202 | Session synch | Request NOT processed (session queue full) | Check cookie handling—should not occur without cookies |
| 429 | Semaphores | Request rejected (API capacity exceeded) | Review ServiceNow capacity configuration |
| 503 | System load | Service unavailable | Review ServiceNow platform health |
Next Steps
- API client developers: See API Client Configuration for code examples and implementation patterns
- ServiceNow administrators: See ServiceNow Configuration for platform settings and monitoring guidance