Skip to content

redis: prefixed routing#6413

Merged
mattklein123 merged 13 commits intoenvoyproxy:masterfrom
maximebedard:redis-prefixed-key-routing-take-2
Apr 16, 2019
Merged

redis: prefixed routing#6413
mattklein123 merged 13 commits intoenvoyproxy:masterfrom
maximebedard:redis-prefixed-key-routing-take-2

Conversation

@maximebedard
Copy link
Contributor

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.

Maxime Bedard added 3 commits March 27, 2019 17:36
…y#6401)"

This reverts commit bacd89e.

Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
@mattklein123
Copy link
Member

Yeah let's finish review of #6294 first and wait to get an integration test in before we work on this.

@mattklein123 mattklein123 added no stalebot Disables stalebot from closing an issue waiting labels Mar 28, 2019
Maxime Bedard added 2 commits April 10, 2019 09:57
…uting-take-2

Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please merge master, this was moved into deprecated.rst. (You can now ref link also.)

* 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move to this to the 1.11.0 section.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping on this


bool MGETRequest::onChildRedirection(const Common::Redis::RespValue& value, uint32_t index,
ConnPool::Instance* conn_pool) {
ConnPool::InstanceSharedPtr conn_pool) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: const ConnPool::InstanceSharedPtr&. Same elsewhere in this change.

Maxime Bedard added 6 commits April 12, 2019 10:35
…uting-take-2

Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
WIP
Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
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>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks looks great, just a few small things and please check the docs CI build.

/wait

* 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping on this


bool FragmentedRequest::onChildRedirection(const Common::Redis::RespValue& value, uint32_t index,
ConnPool::Instance* conn_pool) {
const ConnPool::InstanceSharedPtr conn_pool) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: const ConnPool::InstanceSharedPtr& same elsewhere where applicable.

EXPECT_TRUE(fake_upstream_connection_2->close());
}

// This test sends a simple
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
Signed-off-by: Maxime Bedard <maxime.bedard@shopify.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mattklein123 mattklein123 merged commit 7163451 into envoyproxy:master Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no stalebot Disables stalebot from closing an issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants