XD-DENG commented on issue #4309: [AIRFLOW-3504] Extend/refine the 
functionality of "/health" endpoint
URL: 
https://github.com/apache/incubator-airflow/pull/4309#issuecomment-449681029
 
 
   Hi @ashb @kaxil @feng-tao , merry Christmas!
   
   As suggested & discussed earlier, I have updated this PR:
   
   1. I removed `webserver` component in the response. It's meaningless to have 
it here given the endpoint would never work if the webserver is unhealthy.
   
   2. The response format is standardized. The format will be
   
   ```JSON
     {
       "metadatabase":{
         "status":"healthy"
       },
       "scheduler":{
         "status":"healthy",
         "latest_scheduler_run":"2018-12-26 17:15:11+00:00"
       }
     }
   ```
   
   3. The same as the last commit in this PR: **no authentication will be 
required for accessing the `/health` endpoint.** 
   
   4. Given no authentication would be required for accessing it, we should be 
careful about what we expose via this endpoint. This is why I didn't add 
`open_connections` for `metadatabase` (cc @kaxil ). This should also be the 
principle for this endpoint in the future.
   
   5. For more detailed monitoring, users should use something else, like a 
`/metrics` endpoint. Personally I think it's good to have both `/health` and 
`/metrics` (they are different. `/health` only provides very high-level 
information). For `/metrics`, for sure authentication and Admin privilege 
should be required.
   
   6. Following what @ashb pointed out, documentation is added to share the 
details of this endpoint, including highlighting response code of this 
`/health` endpoint should not be used for health-check purpose.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to