HTTP JSON API failure modes

How does the HTTP JSON API deal with failures on the backing gRPC services? Let’s say after submission of a command the response back from the gRPC service gets lost. Does it timeout the command after some period, does it retry? Also, does it pass through the failure reason from the gRPC service back to the client?

2 Likes

The JSON API uses the synchonous command service. Any failure in there will be turned into a response with a 500 status code and the description of the error in the body. There is no retry mechanism afaict. gRPC requests always have a deadline so it will point out at some point but the default deadline is quite high and I believe the HTTP JSON API does not let you customize it at the moment.

The above applies to the synchronous endpoints for command submission, requests that the HTTP JSON API makes itself to the gRPC API, e.g., to the packaging service to get the DARs are retried I believe.

2 Likes