remote write 2.0 - add flag to override remote write header value (for rollout/rollback) #13922
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prototype for a flag to allow the Remote Write header
X-Prometheus-Remote-Write-Version
to be overridden with a specified value to aid rollout/rollback situations.For example, say you are rolling out Remote Write 2.x amongst many servers behind a load balancer, you don't want any one to respond to a request saying it can support "2.0;snappy" and then the subsequent 2.0 request is sent to a server that has not yet been upgraded.
The plan would be:
--remote-write-format 1
and--remote-write-header-advertise-override "0.1.0"
--remote-write-advertise-override
flag.Between steps 1 and 2 no servers will announce they support Remote Write 2.0.
Between steps 2 and 3 all servers will support Remote Write 2.0 even if they do not announce it.
The flag would also be required if servers are upgraded to support a new compression/encoding, e.g. if
2.0;gzip
were added.2.0;snappy,0.1.0
)gzip
support but run with--remote-write-header-advertise-override "2.0;snappy,0.1.0"
gzip
you can restart individual servers and remove the--remote-write-advertise-override
flag.At the end all servers will then return
2.0;gzip,2.0;snappy,0.1.0
(assuming that is the preferred order).Still to do:
write_handler_test.go
side