Can anyone speak to how NetSuite handles concurren...
# suitescript
e
Can anyone speak to how NetSuite handles concurrent requests to a RESTlet? Ex: I have a restlet that receives a POST request and creates a few records in NetSuite based on that request. If 2 External Sources send a POST request at the same time... Do they both get processed? If so, does that happen concurrently? Does one get processed before the other? Does one get rejected?
e
They should process concurrently. I don't believe there's any queuing system for Restlet requests, even to the same Restlet. You won't be able to rely on requests processing in exactly the order they were received; subsequent requests may process faster than earlier ones. As long as subsequent requests are operating on different records, they shouldn't collide; if they operate on the same records, then you have a race condition, and you will likely run into
Record has been changed
errors.
e
Assuming they arent processing on the same records… If request 1 happens and then request 2 happens (1 second later), you’d expect both to process?
e
Yes
Even
1ms
later, I'd expect them both to process
e
Thank you!
1
s
even 0ms later - NS supports concurrency on RESTlets up to an account specific limit.
If you exceed that limit, callers to the restlet will get an appropriate throttling error message
i
Yes they will run concurrently up to your max concurrency allowed on the integration and/or account. It’s the same as the native REST and SOAP web services concurrency.
e
@Israel Gonzalez Is there a place I can see what my max concurrency allowed is?
i
Do you have NetSuite APM installed? If you don't definitely recommend going through it and installing it. If you their is already a concurrency monitor page
☝️ 2