Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sidecar: Optimize Prometheus Remote Read API. #488

Closed
bwplotka opened this issue Aug 24, 2018 · 3 comments · Fixed by #1268
Closed

sidecar: Optimize Prometheus Remote Read API. #488

bwplotka opened this issue Aug 24, 2018 · 3 comments · Fixed by #1268

Comments

@bwplotka
Copy link
Member

bwplotka commented Aug 24, 2018

Due to non-streamed Prometheus remote read that sends series with samples it is highly inefficient with sidecar. This is because sidecar has to buffer whole protobuf and then stream it out.

On recent Prometheus dev summit (May 2019), we finally agreed on shape of streamed, chunked remote read API. I plan to contribute streamed chunked remote read API to Prometheus, and then make sidecar using it.

All info & design available here: prometheus/prometheus#4517

@bwplotka bwplotka self-assigned this Aug 24, 2018
bwplotka added a commit that referenced this issue May 28, 2019
This is needed for remote read benchmarks as the part of #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue May 30, 2019
…rfile added.

This is needed for remote read benchmarks as the part of #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue May 31, 2019
…rfile added.

This is needed for remote read benchmarks as the part of #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
@bwplotka
Copy link
Member Author

I am actively working on it now.

@bwplotka
Copy link
Member Author

bwplotka commented Jun 21, 2019

Back to business!

Protobuf changes, delimited streaming, server: prometheus/prometheus#5703
Caller usage example (Thanos): #1268

Living document: https://docs.google.com/document/d/1JqrU3NjM9HoGLSTPYOvR217f5HBKBiJTqikEB9UiJL0/edit#

bwplotka added a commit that referenced this issue Jul 3, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Jul 3, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Jul 5, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
@bwplotka
Copy link
Member Author

bwplotka commented Jul 5, 2019

First MVP should be safe to use. I build 2 docker images if someone wants to try:

No config changes, just move docker images to that Prometheus and Thanos sidecar tags and enjoy!

2 big requests against Prometheus + sidecar in upgraded version look like this memory and CPU wise:
image

Versus old one with non-streaming sampled read (3GB of mem!):
image

Still it's work in progress and there are more optimization to make, but you can already gain from this.

bwplotka added a commit that referenced this issue Aug 16, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 16, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 16, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 18, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 18, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 18, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 18, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 18, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 19, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 19, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 19, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 19, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 19, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 19, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit to prometheus/prometheus that referenced this issue Aug 19, 2019
…hunked, checksumed reader (#5703)

Part of: #4517 and thanos-io/thanos#488

Changes:
* Extended protobuf for chunked remote read and negotation.
* Added checksumed, chunked Writer/Reader.
* Added Server side implementation for chunked streamed remote-read.


Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 20, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 20, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 20, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 20, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 22, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

# Conflicts:
#	Makefile
#	pkg/store/prompb/remote.pb.go
bwplotka added a commit that referenced this issue Aug 22, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

# Conflicts:
#	Makefile
#	pkg/store/prompb/remote.pb.go
bwplotka added a commit that referenced this issue Aug 22, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

# Conflicts:
#	Makefile
#	pkg/store/prompb/remote.pb.go
bwplotka added a commit that referenced this issue Aug 22, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

# Conflicts:
#	Makefile
#	pkg/store/prompb/remote.pb.go
bwplotka added a commit that referenced this issue Aug 27, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 27, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 27, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 27, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Aug 27, 2019
Fixes: #488

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant