trickster
trickster copied to clipboard
better handling on failed upstream partial requests
when the delta proxy cache determines which ranges to request from the origin, if those ranges are separated by any amount of time, the origin will make multiple parallel requests to get the separate ranges. If one of those requests fails, the result to the client can be unpredictable based on which request finished first and what its response was, and the order that the were reconstituted. we should identify the proper way to handle these cases and implement the best practice. At a minimum, I would like to report back to the end client via a response header if a part of the content failed.
@jranson
For example, if getMatrixFromPrometheus
returns err, what you wanna said, it does r.Writer.Header().Set(“foo”, originParams.Encode())
, don’t you?
https://github.com/Comcast/trickster/blob/67cf188025f01e4e516ac032ec43d62760d52ad7/handlers.go#L750-L757
cf. https://golang.org/pkg/net/url/#Values.Encode