[ 
https://issues.apache.org/jira/browse/FELIX-6097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17060971#comment-17060971
 ] 

Bertrand Delacretaz commented on FELIX-6097:
--------------------------------------------

Shouldn't the "Avoid 404" option default to true?

To me, getting a 503 as soon as HTTP requests work is the natural behavior, 
getting a 404 first and later a 503 is an unfortunate side effect of the HTTP 
whiteboard.

> 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
>            Priority: Major
>             Fix For: healthcheck.core 2.0.4
>
>
> 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
(v8.3.4#803005)

Reply via email to