Georg Henzler created FELIX-6097:
------------------------------------

             Summary: Improve startup behaviour of ServiceUnavailableFilter for 
low start levels
                 Key: FELIX-6097
                 URL: https://issues.apache.org/jira/browse/FELIX-6097
             Project: Felix
          Issue Type: Improvement
          Components: Health Checks
    Affects Versions: healthcheck.core 2.0.2
            Reporter: Georg Henzler
            Assignee: Georg Henzler


After some analysis and after comparing with the sling mechanism at [1], it 
turns out that if a filter is registered to the http whiteboard, it only 
becomes active if there is actually a servlet to answer the request (otherwise 
the filter will never kick in and the request just return 404). 

In a setup that uses a product that registers the http whiteboard at start 
level 5 and the product servlets at start level 20, the current version of 
ServiceUnavailableFilter only kicks in at start level 20 once the product 
servlets become active when it should really already return 503 during startup 
start levels 5-19. Although the 404 response code is usually treated equally by 
machine clients (load balancers, kubernetes probles) it is still not 
semantically correct, hence this shall be improved to use the mechanism of [1].

[1] 
https://github.com/apache/sling-org-apache-sling-starter-startup/blob/f9f9496588e335d7bdee0246abff5fb22051809f/src/main/java/org/apache/sling/starter/startup/impl/HttpStartupSetup.java#L61



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to