Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.95 KB

nerdgraph-usage-limits.mdx

File metadata and controls

39 lines (26 loc) · 1.95 KB
title tags translate metaDescription freshnessValidatedDate
NerdGraph usage limits
APIs
GraphQL API
NerdGraph
Rate Limit
Concurrency Limit
New Relic NerdGraph limits the number of concurrent connections users make.
2023-08-08

Our NerdGraph API enforces a limit on concurrent requests per user.

Limit details [#limit-enforcement]

NerdGraph enforces a limit of 25 concurrent requests per user.

The rate of requests you make is not limited, only the number of concurrent requests.

Concurrency is tracked and enforced per user, not per user key. Requests made by the same user using multiple user keys will all contribute to that user's total concurrent requests.

We may allow more than 25 concurrent requests per user, based on the state of the system, but only 25 concurrent requests are guaranteed.

If requests are limited, they'll be rejected with HTTP status code 429. As your in-flight requests complete and your total concurrency drops, new requests will automatically begin to succeed again.

Avoid hitting the limit [#avoid-limit]

If you're making concurrent requests to NerdGraph in your code it's important that you limit the total concurrency client-side. For example, if you need to make 100 requests you could:

  • Implement a pooling solution to ensure requests are only made when a concurrent connection is detected as being available.
  • Send the requests in batches of 25 concurrent calls.
  • Replace concurrent code with sequential code and only make a request after the previous request has completed.

For code examples related to implementing some of these recommendations, see NerdGraph Concurrency Tutorial

Be mindful of code run in multiple places at once. Even non-concurrent code will create concurrency if it's being run in multiple places.