Skip to content

Simple warmup: default to opting out#295

Merged
mum4k merged 6 commits intoenvoyproxy:masterfrom
oschaaf:simple-warmup-optout
Jan 24, 2020
Merged

Simple warmup: default to opting out#295
mum4k merged 6 commits intoenvoyproxy:masterfrom
oschaaf:simple-warmup-optout

Conversation

@oschaaf
Copy link
Copy Markdown
Member

@oschaaf oschaaf commented Jan 24, 2020

The current single request we issue for the simple warmup pollutes
some of the counters we emit in our output.

Looking forward, when landing generic phases, we might want to
default to opting out.
This new flag could then serve as an opt-in afterwards, for those
who want to preserve old behavior.

Signed-off-by: Otto van der Schaaf oschaaf@we-amp.com

The current single request we issue for the simple warmup pollutes
some of the counters we emit in our output.

Looking forward, when landing generic phases, we might want to
default to opting out.
This new flag could then serve as an opt-in afterwards, for those
who want to preserve old behavior.

Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf oschaaf added P0 Highest priority waiting-for-review A PR waiting for a review. labels Jan 24, 2020
// TransportSocket configuration to use in every request
envoy.config.core.v3.TransportSocket transport_socket = 27;
// Do not perform the simple warmup call.
google.protobuf.BoolValue no_simple_warmup = 32;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We have learned internally that naming boolean flags in the negative can end up being confusing. E.g:

--no-simple-warmup=False

Can we name the flag simple-warmup instead and set its default accordingly?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

fixed in 5940d56

// TransportSocket configuration to use in every request
envoy.config.core.v3.TransportSocket transport_socket = 27;
// Do not perform the simple warmup call.
google.protobuf.BoolValue no_simple_warmup = 32;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

On a similar topic - why wouldn't we make it an opt-in right away? What are the use cases to have this enabled by default?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think that is a good idea, fixed in 5940d56 (with a callout in the changelist)

Envoy::Stats::Store& store, const int worker_number,
const Envoy::MonotonicTime starting_time,
Envoy::Tracing::HttpTracerPtr& http_tracer);
Envoy::Tracing::HttpTracerPtr& http_tracer, const bool simple_warmup);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How will this API evolve? This is about my usual concern around readability of boolean flags. Is this related to phases and will this be removed in favor of some phase information? Or should we introduce an enum now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

See 5940d56, let me know what you think.

@mum4k mum4k self-assigned this Jan 24, 2020
@mum4k mum4k added waiting-for-changes A PR waiting for comments to be resolved and changes to be applied. and removed waiting-for-review A PR waiting for a review. labels Jan 24, 2020
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf oschaaf changed the title Simple warmup: allow opting out Simple warmup: default to opting out Jan 24, 2020
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf oschaaf added waiting-for-review A PR waiting for a review. and removed waiting-for-changes A PR waiting for comments to be resolved and changes to be applied. labels Jan 24, 2020
Copy link
Copy Markdown
Collaborator

@mum4k mum4k 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 for the updates, just one documentation nit.

README.md Outdated
Where:

--simple-warmup
Do not perform the simple warmup call.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should also update the comment next to the flag. Should now say something like:

Perform the simple warmup call.

While we are here, do we also want to expand this a bit to explain what simple warmup call is?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

whoops, done in bb70db1 (thanks!)

@mum4k mum4k added waiting-for-changes A PR waiting for comments to be resolved and changes to be applied. and removed waiting-for-review A PR waiting for a review. labels Jan 24, 2020
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf oschaaf added waiting-for-review A PR waiting for a review. and removed waiting-for-changes A PR waiting for comments to be resolved and changes to be applied. labels Jan 24, 2020
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@mum4k mum4k merged commit df6ec03 into envoyproxy:master Jan 24, 2020
@oschaaf oschaaf mentioned this pull request Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P0 Highest priority waiting-for-review A PR waiting for a review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants