Back up for floating license server in case of the machine down?

Is there any easy way to have a back up server of floating license server?

LexFloatServer uses the disk to store the data, hence backup is not possible. It does constantly backup data on disk, so when machine is up again, it knows how many licences are currently leased.

Got it. it sounds like tough. Also, even though the server itself is properly backed up, each client somehow has to switch to the backup server, so it would not be so easy…
Probably I will set Grace Period longer to give users enough time to recover the machine.

Grace period is for the server for it’s own validation.

For clients it is the lease time. Client can’t be given grace because when lease time is over server has to release the licences, if client doesn’t send a refresh request.

So in my case, I should set LeaseTime long enough in LexFloat.config?
Doing so, even if Floating Server is done once after Floating Client leased a license, as long as the Floating Server is recovered within leasing period, Floating Client will be kept working properly.
Is my understanding correct?

Since there’s no back up for Floating Server, we need to avoid having down time due to short period (like an hour or 2) of Floating Server down.

Or, Is there any disadvantages to set LeaseTime long?

Like - If I set LeaseTime longer like 2 hours, if the client machine is died (or client app crash) after leasing happens, the license will not be unleased until LeaseTime? Or, in that case, it will be handled by Zombie License handling so it will released within 30 mins or so?

Doing so, even if Floating Server is done once after Floating Client leased a license, as long as the Floating Server is recovered within leasing period, Floating Client will be kept working properly.

Yes.

Longer lease time has disadvantage of zombie license. Zombie licenses are freed only after the lease time of client is over not before that.

Okay… that makes sense logically…

But, then, what is the recommended way to suffice both cases?

  • Since no back up Floating Server, Floating Client should work long enough even after disconnected from Floating Server to give users time to recover Floating Server.
  • In case of machine is died, Zombie license has to be leased as early as possible.

I believe it is common sense.

You can handle the machine crash scenario client side too. Suppose lease length is 15 minutes, machine crashes after 10 mins, so when 15 mins pass by client sends a lease refresh request, since server is down, it invokes the error callback with status:

case LF_E_LICENSE_EXPIRED_INET:
printf("The lease expired due to network connection failure.
");

This should give client the hint that server is down, and you should not invalidate the license. You are responsible for invalidation of license client side in the callback. So you can write your custom logic to wait until server is up and then lease a new license.

  • In case of machine is died, Zombie license has to be leased as early as possible.

Zombie license has to be cleaned only after lease time of client is over irrespective of server crashed or not, because server doesn’t know about the state of client. Connection is always initiated by the client, having duplex communication will increase network load unnecessarily.

Got it. Thanks for detailed answer.

I will set lease time shorter in that case. And, manage “grace period” in floating license client side by ourselves.