Bug 1383551 - [RFE] router endpoint 200 response for health check rather than 503
Summary: [RFE] router endpoint 200 response for health check rather than 503
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Ben Bennett
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-11 01:52 UTC by Takayoshi Kimura
Modified: 2022-08-04 22:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-23 13:04:32 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Takayoshi Kimura 2016-10-11 01:52:43 UTC
Description of problem:

By default if we send a simple HTTP request to the router endpoint it returns "503 Service Unavailable" response.

It would be nice if it returns 200 response as most frontend load balancer sends simple HTTP request to the endpoints and expects 200 response.

Version-Release number of selected component (if applicable):

3.3

How reproducible:

Always

Steps to Reproduce:
1. curl $ROUTER_IP
2.
3.

Actual results:

503 Service Unavailable

Expected results:

200 OK

Additional info:

Comment 1 Takayoshi Kimura 2016-10-11 02:03:48 UTC
I think it would be nicer if we added a configuration flag to switch 503/200 responses for the endpoint health check request.

Comment 2 Ben Bennett 2017-06-23 13:04:32 UTC
I'm sorry, I don't understand the use-case here.  What are you trying to determine the health of?  I see two choices:

1) A route: in which case you don't want to return 200 if the route is down since if a real request comes in, would you want to return our error page?

2) The router: in which case you can access the router stats page (as the router health checks do in the pod definition)

If you can give a good justification for the behavior we can certainly reconsider the request.

Comment 3 Takayoshi Kimura 2017-06-26 00:37:12 UTC
The use case is that external load balancers need to know the router endpoint 80/443 port health. Workarounds would be exposing 1936 port or deploy an app for health check.


Note You need to log in before you can comment on or make changes to this bug.