Skip to content

router: adding a knob to configure a cap on buffering for shadowing/retries - #8574

Merged
mattklein123 merged 12 commits into
envoyproxy:masterfrom
alyssawilk:retry
Oct 23, 2019
Merged

mattklein123 merged 12 commits into
envoyproxy:masterfrom
alyssawilk:retry

Conversation

@alyssawilk

Copy link
Copy Markdown
Contributor

Risk Level: Medium (refactors to existing router logic)
Testing: new unit tests
Docs Changes: n/a
Release Notes: added

@repokitteh-read-only

Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #8574 was opened by alyssawilk.

see: more, trace.

Signed-off-by: Alyssa Wilk <[email protected]>

@snowp snowp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me, just one comment

// limit if another filter increases it.
buffer_limit_ = callbacks_->decoderBufferLimit();
if (callbacks_->decoderBufferLimit() != 0) {
retry_shadow_buffer_limit_ = callbacks_->decoderBufferLimit();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

its a little bit hard to follow that this limit is set to the buffer limit in the callbacks, then potentially updated in decodeHeaders to account for the retry/shadow limit. Maybe a comment here would help?

// The maximum bytes which will be buffered for retries and shadowing.
// The bytes actually buffered will be the minimum value of this and the
// listener per_connection_buffer_limit_bytes.
google.protobuf.UInt32Value per_request_buffer_limit_bytes = 16;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it make sense to have this at multiple levels, e.g. RouteConfiguration and/or VirtualHost. That way, a default can be set that is "safe", without having to do it for every route, and when you have routes with special requirements, e.g. large payloads or streams, we can also override at the route level?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

SGTM, done.

Signed-off-by: Alyssa Wilk <[email protected]>
Signed-off-by: Alyssa Wilk <[email protected]>
snowp
snowp previously approved these changes Oct 19, 2019

@snowp snowp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

mattklein123
mattklein123 previously approved these changes Oct 21, 2019

@mattklein123 mattklein123 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. An integration test would be nice for this at some point if you have time.

@mattklein123

Copy link
Copy Markdown
Member

Oops looks like this needs master merge.

/wait

Signed-off-by: Alyssa Wilk <[email protected]>
@alyssawilk
alyssawilk dismissed stale reviews from mattklein123 and snowp via fcf60c2 October 22, 2019 15:32
Signed-off-by: Alyssa Wilk <[email protected]>
mattklein123
mattklein123 previously approved these changes Oct 22, 2019

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: extra line

Signed-off-by: Alyssa Wilk <[email protected]>
Signed-off-by: Alyssa Wilk <[email protected]>
@alyssawilk

Copy link
Copy Markdown
Contributor Author

ugh, still conflicting, and fix_format is broken locally

@alyssawilk

Copy link
Copy Markdown
Contributor Author

/azp rerun

@azure-pipelines

Copy link
Copy Markdown
Command 'rerun' is not supported by Azure Pipelines.

Supported commands
  • help:
    • Get descriptions, examples and documentation about supported commands
    • Example: help "command_name"
  • list:
    • List all pipelines for this repository using a comment.
    • Example: "list"
  • run:
    • Run all pipelines or a specific pipeline for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify a pipeline to run.
    • Example: "run" or "run pipeline_name"
  • where:
    • Report back the Azure DevOps orgs that are related to this repository and org
    • Example: "where"

See additional documentation.

@alyssawilk

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@mattklein123

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@mattklein123
mattklein123 merged commit c63c1e8 into envoyproxy:master Oct 23, 2019
spenceral added a commit to spenceral/envoy that referenced this pull request Oct 23, 2019
* master: (54 commits)
  Update dependencies - Go, Bazel toos, xxHash, nanopb, rules_go, curl, protobuf, Jinja, yaml-cpp, re2 (envoyproxy#8728)
  test: increase coverage of listener_manager_impl.cc (envoyproxy#8737)
  test: modify some macros to reduce number of uncovered lines reported (envoyproxy#8725)
  build: add a script to setup clang (envoyproxy#8682)
  http: fix ssl_redirect on external (envoyproxy#8664)
  docs: update fedora build requirements (envoyproxy#8641)
  fix draining listener removal logs (envoyproxy#8733)
  dubbo: fix router doc (envoyproxy#8734)
  server: provide server health status when stats disabled (envoyproxy#8482)
  router: adding a knob to configure a cap on buffering for shadowing/retries (envoyproxy#8574)
  tcp proxy: add default 1 hour idle timeout (envoyproxy#8705)
  thrift: fix filter names in docs (envoyproxy#8726)
  Quiche changes to avoid gcc flags on Windows (envoyproxy#8514)
  test: increase test coverage in Router::HeaderParser (envoyproxy#8721)
  admin: add drain listeners endpoint  (envoyproxy#8415)
  buffer filter: add content-length when ending stream with trailers (envoyproxy#8609)
  clarify draining option docs (envoyproxy#8712)
  build: ignore go-control-plane mirror git commit error code (envoyproxy#8703)
  api: remove API type database from checked in artifacts. (envoyproxy#8716)
  admin: correct help strings (envoyproxy#8710)
  ...

Signed-off-by: Spencer Lewis <[email protected]>
derekargueta pushed a commit to derekargueta/envoy that referenced this pull request Oct 24, 2019
@alyssawilk
alyssawilk deleted the retry branch April 20, 2020 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants