paltvi
Flexera beginner

Borrow Interval

Hello,

I am trying to understand how borrow interval works. I have set the borrow interval to zero, both in FlexNet Operations and license model. However, when I checkout the license it still has a borrow interval of 7 days.

I then looked at cloud license server configuration settings by making an API call to configuration endpoint, and it looks like CLS has a default borrow interval of 7 days. How do I change this value for CLS, updating it via the API has not effect.

Thanks in advance.

 

 

0 Kudos
7 Replies
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Re: Borrow Interval

Hi @paltvi ,

There is a known issue where Revenera will need to globally set the CLS licensing.borrowInterval to 0 in your instance if you want a borrow interval = entitlement expiration when setting the Maximum Borrow Interval to 0 in the license model.   Please submit a support ticket to have this configured.

Thanks,

Jim

0 Kudos
paltvi
Flexera beginner

Re: Borrow Interval

Hi @jberthold ,

If I understand correctly, by default all CLS will have a borrow interval of 7 days. If that need to be changed, it has to be through Revenera. Am I correct?

On a parallel note, why does one need to have a borrow interval in the first place? In my case, the application checks out the license when it starts and checks it in before exiting. Should I worry about setting a borrow interval for the license and renewing it periodically? I am trying to understand the use case here.

Thanks 

 

 

0 Kudos
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Re: Borrow Interval

Hi @paltvi ,

If you specify a maximum borrow interval in the license model, that value will be used by the server when providing licenses to served clients.   If you do not specify a value in the license model, the default FNO value will be used.  This is configurable and is set via System/Configure/Embedded Devices/License Generation.  In the example below the default borrow interval is 604800 seconds or 7 days.

2021-04-19_9-17-25.png

Served clients check out licenses from a license server.  These licenses are stored locally on the clients and will expire at the end of the borrow interval if they are not refreshed (re-requested from the server) periodically.    In your application it is best practice to periodically re-acquire the licenses locally from trusted storage to make sure that they have not expired.  If the licenses expire locally on the clients they will be automatically reclaimed by the server for use by other clients.

Thanks,

Jim

0 Kudos
paltvi
Flexera beginner

Re: Borrow Interval

Hi @jberthold 

Thanks for the information. 

In my case, I set the default borrow interval in FNO to 0 and the maximum borrow interval for license model to 'Not Used'. And when sending the capability request, I do not set the borrow interval either. The acquired license still has an expiration date of 1 week because the borrow interval for cloud license server is 1 week. And I believe that if licensing.borrowInterval for CLS need to be changed, I need to submit a ticket to Revenera?

Regarding the use case, I understand that the license server will reclaim all the licenses from trusted storage after the borrow interval is expired. When an application is done using the license, how should it release the license; there could be two ways to do that -

1. Calling licensing.LicenseManager.Release which would return the license back to the trusted storage. And after the borrow interval expires, the server would reclaim it back.

2. Sending another capability request to the license server by passing zero/no count for the feature; this would automatically release the license from the trusted storage.

I am using the second approach, which leads me to think that one does not need borrow interval. Is this the correct workflow?

0 Kudos
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Re: Borrow Interval

Hi  @paltvi 

Yes after requesting the change, the expiration date of features returned by the CLS will be equal to the expiration date on the entitlement when the Maximum Borrow Interval is set to "0" in the license model.

  1. If you release a license back to trusted storage, it is then available locally for acquisition granted the license has not expired.  When the license expires it will be reclaimed by the server.
  2. Returning a license back to server is a valid option.  This removes the license from trusted storage on the client and makes it immediately available for other clients.  Note that the purpose of the borrow interval is to make floating licensing tolerant.  Let's say a client checks out a license and then the application crashes, or the system has a hardware failure, or it goes offline for an extended period of time?  In these cases the system cannot return the license back to the server and you have to take other actions.  With a reasonable borrow interval you only need to wait a period of time and the server will automatically get the licenses back.

Thanks,

Jim

   

 

 

0 Kudos
paltvi
Flexera beginner

Re: Borrow Interval

Hi @jberthold 

Thank you for all the information. Based on your comments, I feel that we should be using borrow interval for unforeseen scenarios. 

As per the documentation, if the renew interval is set to zero the client can renew the licenses at any interval they want to. What is the best practice - should we set the renew interval in the license model and let the licensing code do the renewals based on that value? Or should the renew interval be left to the licensing code to decide?

Another question to add, renew intervals can be set at multiple places - in the license model/during entitlement or the FNO. Which interval value takes effect?

Thanks

0 Kudos
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Re: Borrow Interval

Hi @paltvi ,

The renew interval provides the recommended time the client should wait between license renewal attempts with the server.  It is specified as a percentage of the borrow interval.  For example, the default borrow interval is 1 week and the default renew interval is 15 .  This results in a renewal of 15% of 1 week, or ~1 day.  This renewal interval is calculated and returned to the client in the capability response from the server.  Note it us up to you to read this value and renew the licenses with the server, it does not happen automatically.  

Borrow/Renew intervals specified in the license model take precedence.   If set to "Not Used", FNO default values set in System/Configure/Embedded Devices/License Generation will be used.

Thx,

Jim

 

0 Kudos