Here is a patch for the lifeguard tree that adds the following feature:
The ability to control the minimum number of minutes into a billable
hour an instance will be kept alive by the pool manager.
This is useful in situations where you have a service that has work
requests being fed into it at a rate slower than RampDownDelay.
Once the service instance passes minimumLifetimeInMinutes, any period
of idle time exceeding RampDownDelay will cause the pool manager to
terminate the instance. If the instance was running for 62 minutes (2
billable hours) when the RampDownDelay was exceeded then it will be
killed. But if a new work request is added to the work queue
immediately thereafter (or, within the same billable hour, say at
minute 75) then a new instance will be launched, in effect causing you
to pay for the same time twice.
The patch aims to minimize the occurrence of this problem.
The patch adds a new property on PoolManager called
"minMinutesPerBillableHour". Instances will be kept alive for at least
"minMinutesPerBillableHour" minutes into each consumed billable hour.
It can be set to an integer between 0 and 59 inclusive. But it is most
economically effective when set to at least 50.
.. Shlomo