Hello,
I am experiencing Upstream request timeouts. Trying to solve that issue by deploying service router as describe here:
opened 11:01AM - 23 Aug 19 UTC
type/enhancement
theme/connect
theme/envoy/xds
#### Feature Description
Provide a way to configure upstream listener to config… ure timeout.
#### Use Case(s)
https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#route-routeaction
The envoy default value is 15s second which is too high or too low depends on the use case.
But i get this error
Message: writing config entry to consul: Unexpected response code: 500 (discovery chain “account-service” uses a protocol “tcp” that does not permit advanced routing or splitting behavior)
Reason: ConsulAgentError
here is my configuration
apiVersion: consul.hashicorp.com/v1alpha1
kind: ServiceRouter
metadata:
name: account-service
spec:
routes:
- match:
http: {}
destination:
requestTimeout: 120s
numRetries: 3
retryOnConnectFailure: true
Any idea what i am doing wrong?
I fixed the issue on servicerouter by setting protocol in proxydefaults but i still get upstream connection timeouts
opened 06:08PM - 29 Oct 21 UTC
type/enhancement
theme/service-metadata
theme/operator-usability
Currently if you've set the global default protocol in proxy-defaults and then y… ou create a service-defaults config, you can't leave `Protocol` unset because it will default to `tcp` and that will override the proxy-defaults. Ideally if you leave it unset then Consul uses the global default.
For example, create the following three files:
```hcl
# proxy-defaults.hcl
Kind = "proxy-defaults"
Name = "global"
Config {
protocol = "http"
}
```
```hcl
# service-router.hcl
Kind = "service-router"
Name = "foo"
Routes = [
{
Match {}
Destination {
RequestTimeout = "1s"
}
}
]
```
```hcl
# service-defaults.hcl
Kind = "service-defaults"
Name = "foo"
UpstreamConfig {
Defaults {
PassiveHealthCheck {
MaxFailures = 1
}
}
}
```
Set the proxy defaults:
```
consul config write proxy-defaults.hcl
```
Now set the router for foo so foo now requires HTTP:
```
consul config write service-router.hcl
```
Now try and set your service-defaults for foo. The `UpstreamConfig` doesn't matter, it's just there as an example use-case. Note that `Protocol` is empty.
```
consul config write service-defaults.hcl
Error writing config entry service-defaults/foo: Unexpected response code: 500 (discovery chain "foo" uses a protocol "tcp" that does not permit advanced routing or splitting behavior)
```
It's also confusing because it's not clear why you're getting that error because in fact the discovery chain does not yet use protocol tcp since it's defaulting to http.
To fix, you must set `Protocol`:
```hcl
Kind = "service-defaults"
Name = "foo"
Protocol = "http"
UpstreamConfig {
Defaults {
PassiveHealthCheck {
MaxFailures = 1
}
}
}
```