How to determine maximum allowed connection per Cache license unit

Caché

As per the below document Intersystems licensing system works in the following way:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=... 

Each user is identified by some unique ID and assigned a license unit. A single user can make multiple connections upto a maximum number  (say N)  shares a single license unit. Once the number of connection by a single user exceeds the maximum allowed number (N+1) a transaction happens and for each new connection from the user a new license unit is used.

My question is for a particular license, how do I know what is the value of N? Is there a relationship with the maximum allowed connection per user with the "License Unit Authorized" or it is an independent number and how to determine the value.

Thank you,

Susobhan Pandit

 

  • 0
  • 0
  • 654
  • 8
  • 2

Answers

Using  Class %System.License. ...  you may reduce the number of allowed connections by instance

• classmethod SetConnectionLimit(MaxCon As %Integer) as %Integer

$SYSTEM.License.SetConnectionLimit establishes the maximum number of connections permitted per user on this instance. This enables a system administrator to prevent a user from making so many connections to a Cache instance that they consume all available license units. Calling $SYSTEM.License.SetConnectionLimit($SYSTEM.License.MaxConnections()) permits a user to make the maximum connections permitted but prevent transitioning to the license unit per connection state, insuring the user will consume no more than one license unit. A zero argument removes the limit. The failure to obtain a license will be indicated in the normal way. For example, a call to $system.License.Login() will return zero (0) while a failure to log in to a new terminal connection will receive a error. However, these license failures will not be reported in the console log. The method returns the former maximum value. 

The limit applies only to the local instance. If a Cache MultiServer license is shared among several instances it is still possible to exceed $SYSTEM.License.MaxConnections() over all instances. This can be avoided by setting the limit low enough on each instance that the combined connections to all instances will be unlikely to exceed $SYSTEM.License.MaxConnections(). 

$SYSTEM.License.SetConnectionLimit reqires access to the %Admin Manage resource. It is suggested that customers call this API from SYSTEM^%ZSTART.

Similar using  Class %System.License. ...  you may reduce the number of allowed connections by USER
This might  be interesting in SaaS situation.

classmethod SetUserLimit(MaxLU As %Integer) as %Integer

$SYSTEM.License.SetUserLimit establishes the maximum number of license units that this Cache instance will consume. This permits a system manager to prevent a Cache instance from consuming all the license units in a MultiServer key shared among multiple Cache instances. The Method returns the former maximum value. In the absence of a call to $SYSTEM.License.SetUserLimit(max) a Cache instance may consume all available license units. 

Requires access to the %Admin Manage resource.

 

Comments

Hi,

The code below returns the maximum number of connections a user can make while consuming one license unit.

Write ##class(%SYSTEM.License).MaxConnections()

It is a global setting, and, it is not related to the License Unit Authorized value.  That value is how many license units (not connections per unit), you can take out.

sincerely,

Steve

Thank you Steve for the answer.

It will be great to know where this global configuration is stored and is it possible to increase / decrease the value for a Cache setup and if there is any recommendations from Intersystems.

Thank you,

Susobhan

AFAIK we users aren't able to change increase this value. If we could, we might be tempted to set it to a very large value wink

See [@Robert.Cemper]'s answer for how you can decrease it.

John is absolutely right.

You cannot set this value.  In fact, I should have said in my earlier post that the advertised (documented) maximum number of connections per License Unit is and always has been only 12.

The fact it is 25, is somewhat common knowledge and is a sort of grace limit, however I always tell my customers that you should work on the assumption that InterSystems could eventually enforce the advertised number of 12. If this happens it should not come as a shock to anyone.

12 connections from a user interacting with Cache, coming in from the same address, should be ample.

Steve

 

 Pls. don't forget to mark your question as "answered" on Developer Community,
please click the checkmark  alongside the answer you (as author of the question) accept  

Sure would be nice if this forum could support "sticky" topics.

I come here and find a bunch of new posts, but they're mostly comments like these ...

Just a friendly suggestion :D