Conversation
fixes #298
|
@lyft/network-team @rshriram @GregHanson |
|
|
||
| route_config_name | ||
| *(required, string)* The name of the route table. This name will be passed to the | ||
| :ref:`RDS HTTP API <config_http_conn_man_rds_api>` so that different route tables can be used by |
There was a problem hiding this comment.
What does it mean to be used by independent filters?
There was a problem hiding this comment.
I think you meant independent listeners?
include/envoy/router/rds.h
Outdated
|
|
||
| /** | ||
| * @return Router::ConfigPtr a route configuration for use during a single request. The returned | ||
| * config may be different on a subsequent call so a new config should be acquired for |
| "generate_request_id" : {"type" : "boolean"} | ||
| }, | ||
| "required" : ["codec_type", "stat_prefix", "route_config", "filters"], | ||
| "required" : ["codec_type", "stat_prefix", "filters"], |
There was a problem hiding this comment.
I think you should keep route_config. At line 222, it only checks for an object, so empty will pass. And the documentation above makes it seem like it should always be there.
There was a problem hiding this comment.
@ccaraman if that line in the documentation is removed, it aligns well with the rest of the checks in rds_impl.cc. WDYT?
There was a problem hiding this comment.
It's not required anymore. I'm fixing the docs.
rshriram
left a comment
There was a problem hiding this comment.
Some general doc comments.
Also need a note saying that existing connections to older routes will continue to have same retry/timeout semantics as they were specified during connection initiation.
Given that the combination of RDS/CDS and SDS is (almost) effectively a hot reload with new config, do any of the drain timeout semantics apply? Most probably they don't, but it is worth mentioning in doc, as one liner. WDYT?
| ======================= | ||
|
|
||
| The route discovery service (RDS) API is an optional API that Envoy will call to dynamically fetch | ||
| route tables. Each :ref:`HTTP connection manager filter <config_http_conn_man>` can independently |
There was a problem hiding this comment.
s/route tables/HTTP route entries/ for clarity ?
There was a problem hiding this comment.
Or even better: dynamically fetch configurations for virtual hosts and routes within the virtual host.
|
|
||
| route_config_name | ||
| *(required, string)* The name of the route table. This name will be passed to the | ||
| :ref:`RDS HTTP API <config_http_conn_man_rds_api>` so that different route tables can be used by |
There was a problem hiding this comment.
I think you meant independent listeners?
| *(sometimes required, object)* The connection manager configuration must specify one of *rds* or | ||
| *route_config*. If *route_config* is specified, the :ref:`route table <arch_overview_http_routing>` | ||
| for the connection manager is static and is specified in this property. All connection managers must have | ||
| a route table, even if it is empty. |
There was a problem hiding this comment.
I would remove this line. It sounds like if you use rds, you still need a dummy empty route_config block
| "generate_request_id" : {"type" : "boolean"} | ||
| }, | ||
| "required" : ["codec_type", "stat_prefix", "route_config", "filters"], | ||
| "required" : ["codec_type", "stat_prefix", "filters"], |
There was a problem hiding this comment.
@ccaraman if that line in the documentation is removed, it aligns well with the rest of the checks in rds_impl.cc. WDYT?
| log_debug("rds: parsing response"); | ||
| Json::ObjectPtr response_json = Json::Factory::LoadFromString(response.bodyAsString()); | ||
| uint64_t new_hash = response_json->hash(); | ||
| if (new_hash != last_config_hash_ || !initialized_) { |
There was a problem hiding this comment.
I think this warrants a comment somewhere in the docs. Something like The new/old routes will be compared based on their hashes. If they differ, then the newer route will be loaded. So care must be taken by the RDS provider to ensure that the order of routes in a RDS response remains unchanged across API calls.
WDYT ?
Most probably, the same applies to CDS as well?
There was a problem hiding this comment.
I will add some detail in the docs. It's just a performance optimization for the route config to now reload internally, so I don't think it's worth guiding developers to not reorder things.
There was a problem hiding this comment.
Sorry, yeah you are right. It was more for istio, where we are making sure that the config remains as deterministic as possible between every refresh.
|
|
||
| /** | ||
| * Implementation of RouteConfigProvider that returns a static null route config. | ||
| */ |
There was a problem hiding this comment.
s/RouteConfigProvider/NullRouteConfigProvider/ ?
This makes all of the REST API configs consistent. fixes #463
rshriram
left a comment
There was a problem hiding this comment.
Thanks @mattklein123 . LGTM. We will start testing this soon
| "auth_api_cluster": "...", | ||
| "stat_prefix": "...", | ||
| "refresh_interval_ms": "...", | ||
| "refresh_delay_ms": "...", |
There was a problem hiding this comment.
I just realized that CLIENT_SSL_NETWORK_FILTER_SCHEMA doesn't have refresh_delay_ms. Can you please add that?
|
|
||
| .. http:get:: /v1/routes/(string: route_config_name)/(string: service_cluster)/(string: service_node) | ||
|
|
||
| Asks the discovery service to return the route configuration for a particular `route_config_name`, |
There was a problem hiding this comment.
Asks the route dicovery service... People might get confused.
| NiceMock<Upstream::MockClusterManager> cm; | ||
| EXPECT_CALL(cm, get("www2")).WillRepeatedly(Return(nullptr)); | ||
|
|
||
| ConfigImpl(*loader, runtime, cm, false); |
There was a problem hiding this comment.
nit: add a EXPECT_NO_THROW
Support Grpc initial metadata in Wasm.
Signed-off-by: Mike Schore <mike.schore@gmail.com> Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: Mike Schore <mike.schore@gmail.com> Signed-off-by: JP Simard <jp@jpsim.com>
**Commit Message** This removes the unnecessary fields from the expected output of translation test case. **Related Issues/PRs (if applicable)** Contributes to #412 Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
fixes #298
fixes #463