· May 11, 2018

Throttling stored procedure / REST / SOAP calls

Would anyone recommend techniques on how to limit the amount of calls that external groups are making to our resources?

Recently we had an issue where one of our ODBC accounts maxed out the license to one of our DB servers (50 max).

Discussion (4)0
Log in or sign up to continue

The CSP part (REST for sure and maybe SOAP) could be managed by these two tools:

  • Session events - provide callbacks for session start/end and request execution.
  • SetConnectionLimit method can be used to set maximal number of connections per user - I'm not sure if this would work for xDBC but it would for sure work for CSP.

Additionally you cat use ^ZSTART routine to check if user can login.

Connection is not license.  From docs:

  • The Caché licensing system attempts to identify distinct users and to allocate one license unit per user. A user is identified by a license user ID, which can be an IP address, a username, a CSP session ID, or some other identifier depending on how the user connects.
  • Multiple processes started by or for a single user share a license unit up to the maximum number of processes per user. If the number of processes exceeds this maximum, a transition occurs and Caché begins allocating one license unit per process for that user ID. The system assumes that if the number of processes associated with a user ID exceeds the maximum, multiple users are accessing Caché through an intermediary (for example, a firewall system), so additional license units are required. (Processes started by the Job command are counted under the user ID invoking the command.)
  • Even if the number of processes under the user ID drops back under the maximum, Caché continues to allocate one license unit per process for that user ID. Only when all connections by the user ID are closed and there are no more processes under the user ID does license allocation reset to one unit for that user ID.

Maximum number of processes (connections) per user is 12.

Will this affect our own internal tasks?

It shouldn't as that would be one connection and license slot.Still, I'd recommend contacting WRC to clarify the issue completely.