Skip to content

HTTPProxy cannot be aware of timeout of waiting response #288

@silentred

Description

@silentred

In case using httputil.ReverseProxy, the error returned by RoundTrip(), is only recorded by Logger. https://github.com/golang/go/blob/master/src/net/http/httputil/reverseproxy.go#L203 .

Therefore, it seems the HTTPProxy cannot distinguish whether it is a timeout or a normal response, when it tries to gather the metrics. https://github.com/fabiolb/fabio/blob/master/proxy/http_proxy.go#L134

Also, the backend service timeout causes the response have 502 code and without body. And the body cannot be customized right now. The worst is timeout error is not logged with enough context information, for example, which service or which URI gets timeout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions