user1187968
user1187968

Reputation: 8006

AWS Neptune (db.r5.large) can't handle more than 250 requests per second

So I have a Neptune (db.r5.large) on AWS, If I make more than 250 requests/second. I will get the error HTTP 429: Too Many Requests.

What should I do here? I was expecting db.r5.large instance type should able handle this kind of work load, and I don't have budget to move up another instance type.

enter image description here

Upvotes: 0

Views: 862

Answers (1)

Kelvin Lawrence
Kelvin Lawrence

Reputation: 14371

I'm adding an answer based on the comments above and some additional points.

  1. The instance type in use is one of the smaller ones and has four worker threads. That means, at most, four queries can be running at one time.
  2. If IAM authentication is enabled, each query has to be verified before being executed. The Too many requests exception is likely being thrown because IAM is enabled. You can test this by temporarily turning IAM authentication off and re-running your tests.
  3. In general, if there are more queries inbound than can be allocated to an available worker thread, they will be queued up, to a maximum of 8192.
  4. If the query queue fills up you will see a Throttling exception.

The likely reason for the Too many requests exception in your case is that you are using one of the smallest instance types and sending more work than can be handled by that instance type with IAM authentication enabled,

Upvotes: 1

Related Questions