You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In AWS API can be deployed as an auto-scaling group behind a load-balancer. The LB runs a regular health-check on the registered instances, which it's just a PING on port 80 (if configured correctly).
However, API can also be deployed as a target group, for example when the LB acts as a listener, terminating HTTPS requests and routing them to a Target Group.
An AWS Target Group has its own health checks, however they consist of HTTP or HTTPS requests only (a path can be customised, but no more than this, i.e. no configurable headers). API always expects an authentication token in the request headers, therefore it returns a 401, and the health checks from the Target Group fail, marking the API instances as unhealthy.
We need a way to configure API so that, in the above deployment scenario, it returns a 200 HTTP status code on a specific request used to monitor its health.
Possibly this could be the Status endpoint?
It currently expects an authentication token - maybe an additional configuration option could be added to allow un-authenticated requests.
I am not sure whether this would expose sensitive information.
Alternatively, we can add a "Hello World" endpoint which does not require authentication.
API: 1.16.3
The text was updated successfully, but these errors were encountered:
I think I'll allow requests at the root which will return a "Welcome to DADI API" page, as CDN also does. Web has a friendly first page as well, for first time users - perhaps we could do a similar one for API, with a little detail and information on where to go for help.
In AWS API can be deployed as an auto-scaling group behind a load-balancer. The LB runs a regular health-check on the registered instances, which it's just a PING on port 80 (if configured correctly).
However, API can also be deployed as a target group, for example when the LB acts as a listener, terminating HTTPS requests and routing them to a Target Group.
An AWS Target Group has its own health checks, however they consist of HTTP or HTTPS requests only (a path can be customised, but no more than this, i.e. no configurable headers). API always expects an authentication token in the request headers, therefore it returns a 401, and the health checks from the Target Group fail, marking the API instances as unhealthy.
We need a way to configure API so that, in the above deployment scenario, it returns a 200 HTTP status code on a specific request used to monitor its health.
Possibly this could be the Status endpoint?
It currently expects an authentication token - maybe an additional configuration option could be added to allow un-authenticated requests.
I am not sure whether this would expose sensitive information.
Alternatively, we can add a "Hello World" endpoint which does not require authentication.
API: 1.16.3
The text was updated successfully, but these errors were encountered: