routing/cluster changes: move cluster selection to Envoy's routing table#2087
routing/cluster changes: move cluster selection to Envoy's routing table#2087
Conversation
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
| socket_address: { address: *statsd_host, port_value: *statsd_port } | ||
|
|
||
| !ignore protocol_defs: &http1_protocol_options_defs | ||
| !ignore http1_protocol_options_defs: &http1_protocol_options |
There was a problem hiding this comment.
@goaway how come this is in the header but base_protocol_options_defs is in the config_template?
There was a problem hiding this comment.
The header defines defaults. Overrides are injected between the header and the template, so any objects that contain internal values that you want to be overridable must be defined in the template.
| namespace { | ||
|
|
||
| const LowerCaseString ClusterHeader{"x-envoy-mobile-cluster"}; | ||
| const LowerCaseString H2UpstreamHeader{"x-envoy-mobile-upstream-protocol"}; |
There was a problem hiding this comment.
@goaway on Friday we discussed having:
- :scheme dictate if the request is routed to non-tls http1.1
- route specifically to h2 if the hostname is included.
- route everything else to alpn.
Looking at the code that uses x-envoy-mobile-upstream-protocol it seems that we have the gRPC platform bindings force routing to h2. I can preserve that functionality. But do we want to allow for any request to force routing via x-envoy-mobile-upstream-protocol?
There was a problem hiding this comment.
I think I might remove the protocol-based mapping (since it's incomplete anyways) and just leave in the cluster override header and use that for the gRPC case.
| } | ||
|
|
||
| BOOL hasH2Hostnames = self.h2Hostnames.count > 0; | ||
| if (hasH2Hostnames) { |
|
@goaway Alternatively, we could start with a PR that leaves all the |
|
Closed in favor of #2088 |
For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
[Optional Fixes #Issue]
[Optional Deprecated:]