You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Georg Henzler (JIRA)" <ji...@apache.org> on 2016/08/01 07:09:20 UTC

[jira] [Updated] (SLING-5874) Health Check Executor unnecessarily wastes 50ms

     [ https://issues.apache.org/jira/browse/SLING-5874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Georg Henzler updated SLING-5874:
---------------------------------
    Assignee: Bertrand Delacretaz  (was: Georg Henzler)

> Health Check Executor unnecessarily wastes 50ms 
> ------------------------------------------------
>
>                 Key: SLING-5874
>                 URL: https://issues.apache.org/jira/browse/SLING-5874
>             Project: Sling
>          Issue Type: Improvement
>          Components: Health Check
>            Reporter: Georg Henzler
>            Assignee: Bertrand Delacretaz
>
> Currently the HC executor boldly waits for 50ms util it checks again if all relevant futures have finished within the given timeout:
> https://github.com/apache/sling/blob/eecc7e401a0894984a5eaa8992dedfcb5a18e0e5/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/executor/HealthCheckExecutorImpl.java#L365
> This has the following disadvantages:
> * The HC executor never returns a request under 50ms (even if the actual check only takes 1ms like a "all OSGi bundle started" check does)
> * Setting timeout values (e.g. via the HC servlet) lower than 50ms does not work (effectively the timeout is increased to 50ms then)
> For most cases the current behaviour is not really a problem, but for using the HC for a load balancer when response time should be optimised as much as possible, the HC servlet should be able to return in only slightly more time than the longest check requires (so if a request checks for started bundles only it should return in ~3ms instead of the current ~53ms).
> To fix this the sleep shall be replaced with a Object.wait()/Object.notifyAll() setup.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)