redis: prefixed routing#6413
Conversation
Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
|
Yeah let's finish review of #6294 first and wait to get an integration test in before we work on this. |
…uting-take-2 Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
mattklein123
left a comment
There was a problem hiding this comment.
Thanks looks great. Can we please add an integration test for this feature? I don't think it should be that hard now that @msukalski add an integration test that uses multiple upstreams. Thank you!
/wait
DEPRECATED.md
Outdated
| A logged warning is expected for each deprecated item that is in deprecation window. | ||
|
|
||
| ## Version 1.11.0 (Pending) | ||
| * Use of `cluster`, found in [redis-proxy.proto](https://github.com/envoyproxy/envoy/blob/master/api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.proto) is deprecated. Set a `PrefixRoutes.catch_all_cluster` instead. |
There was a problem hiding this comment.
Please merge master, this was moved into deprecated.rst. (You can now ref link also.)
docs/root/intro/version_history.rst
Outdated
| * ratelimit: removed deprecated rate limit configuration from bootstrap. | ||
| * redis: added :ref:`hashtagging <envoy_api_field_config.filter.network.redis_proxy.v2.RedisProxy.ConnPoolSettings.enable_hashtagging>` to guarantee a given key's upstream. | ||
| * redis: added :ref:`latency stats <config_network_filters_redis_proxy_per_command_stats>` for commands. | ||
| * redis: added :ref:`prefix routing <envoy_api_field_config.filter.network.redis_proxy.v2.RedisProxy.prefix_routes>` to enable routing commands based on their key's prefix to different upstream. |
There was a problem hiding this comment.
Please move to this to the 1.11.0 section.
|
|
||
| bool MGETRequest::onChildRedirection(const Common::Redis::RespValue& value, uint32_t index, | ||
| ConnPool::Instance* conn_pool) { | ||
| ConnPool::InstanceSharedPtr conn_pool) { |
There was a problem hiding this comment.
nit: const ConnPool::InstanceSharedPtr&. Same elsewhere in this change.
…uting-take-2 Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
…uting-take-2 Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
mattklein123
left a comment
There was a problem hiding this comment.
Thanks looks great, just a few small things and please check the docs CI build.
/wait
docs/root/intro/version_history.rst
Outdated
| * ratelimit: removed deprecated rate limit configuration from bootstrap. | ||
| * redis: added :ref:`hashtagging <envoy_api_field_config.filter.network.redis_proxy.v2.RedisProxy.ConnPoolSettings.enable_hashtagging>` to guarantee a given key's upstream. | ||
| * redis: added :ref:`latency stats <config_network_filters_redis_proxy_per_command_stats>` for commands. | ||
| * redis: added :ref:`prefix routing <envoy_api_field_config.filter.network.redis_proxy.v2.RedisProxy.prefix_routes>` to enable routing commands based on their key's prefix to different upstream. |
|
|
||
| bool FragmentedRequest::onChildRedirection(const Common::Redis::RespValue& value, uint32_t index, | ||
| ConnPool::Instance* conn_pool) { | ||
| const ConnPool::InstanceSharedPtr conn_pool) { |
There was a problem hiding this comment.
nit: const ConnPool::InstanceSharedPtr& same elsewhere where applicable.
| EXPECT_TRUE(fake_upstream_connection_2->close()); | ||
| } | ||
|
|
||
| // This test sends a simple |
Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
Second take on #5658. During one of the iterations in the original PR, I actually forgot to short circuit when a route matches. I've updated the tests in 41d9b4d to confirm that they actually short circuit correctly.
I'm opening the PR, but @FAYiEKcbD0XFqF2QK2E4viAHg8rMm2VbjYKdjTg wanted to work on an integration test, I would wait for that integration test before merging this PR again.
Description: Add redis prefix routing.
Risk Level: Medium
Testing: Updated unit tests.
Docs Changes: N/A, revert of #5658.
Release Notes: N/A, revert of #5658.