Skip to content

receive: use gRPC for forwarding messages#1970

Merged
brancz merged 3 commits intothanos-io:masterfrom
blockloop:bjones/receive/use-grpc
Jan 10, 2020
Merged

receive: use gRPC for forwarding messages#1970
brancz merged 3 commits intothanos-io:masterfrom
blockloop:bjones/receive/use-grpc

Conversation

@blockloop
Copy link
Copy Markdown
Contributor

@blockloop blockloop commented Jan 8, 2020

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Receive: use gRPC for forwarding messages between receive peers to significantly increase throughput. This also introduces the ability for users to use gRPC to write messages to Thanos via gRPC.

Verified

A working build can be run with this docker-compose configuration https://gist.github.com/blockloop/637bd0c8c9295178b67812f43e661419

The images used in that gist have been built from this branch. I have run it and verified that everything is working.

Here is a screenshot of Thanos query from that setup:

image

Fixes #1710

@blockloop blockloop force-pushed the bjones/receive/use-grpc branch 3 times, most recently from bdbc8d6 to e1153af Compare January 8, 2020 23:13
Copy link
Copy Markdown
Member

@squat squat left a comment

Choose a reason for hiding this comment

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

Super fast progress! I have some questions @blockloop

@blockloop blockloop force-pushed the bjones/receive/use-grpc branch from e1153af to f54ecf6 Compare January 9, 2020 01:50
// ReadWriteStoreServer is a StoreServer and a WriteableStoreServer.
type ReadWriteStoreServer interface {
storepb.StoreServer
storepb.WriteableStoreServer
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.

I am wondering again about exposing these on the same gRPC service. If we do, we have to make sure to document that exposing the receive gRPC to a WAN to enable writes means that one tenant could read any other tenant’s metrics

Copy link
Copy Markdown
Member

@GiedriusS GiedriusS Jan 9, 2020

Choose a reason for hiding this comment

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

I guess that's acceptable for now 🤔 we could change it in the future if needed.

@squat
Copy link
Copy Markdown
Member

squat commented Jan 9, 2020 via email

@blockloop blockloop force-pushed the bjones/receive/use-grpc branch 3 times, most recently from 4aa3200 to ea911f5 Compare January 9, 2020 17:42
Copy link
Copy Markdown
Member

@squat squat left a comment

Choose a reason for hiding this comment

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

So awesome. We already hacked together a lot offline so most comments are already addressed. I have some v small requests and then 💯

@blockloop blockloop force-pushed the bjones/receive/use-grpc branch from 6676444 to 0d039eb Compare January 9, 2020 20:34
Copy link
Copy Markdown
Member

@squat squat left a comment

Choose a reason for hiding this comment

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

Nice :))) lgtm on green

Copy link
Copy Markdown
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

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

At a first glance LGTM. Could you rebase after the recent changes before the final review?

@blockloop blockloop force-pushed the bjones/receive/use-grpc branch 2 times, most recently from 5748a8a to 6709020 Compare January 9, 2020 23:53
@blockloop
Copy link
Copy Markdown
Contributor Author

Rebase complete @GiedriusS

Signed-off-by: Brett Jones <blockloop@users.noreply.github.com>
@blockloop blockloop force-pushed the bjones/receive/use-grpc branch from 6709020 to 018d262 Compare January 9, 2020 23:54
Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
@squat squat force-pushed the bjones/receive/use-grpc branch from d2706dc to 9d1df07 Compare January 10, 2020 10:28
Copy link
Copy Markdown
Member

@brancz brancz left a comment

Choose a reason for hiding this comment

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

Just one small comment, otherwise this lgtm. Very incredibly fast turn around I have to say! Thank you so much! :)

CHANGELOG.md Outdated
- [#1969](https://github.com/thanos-io/thanos/pull/1969) Sidecar: allow setting http connection pool size via flags
- [#1967](https://github.com/thanos-io/thanos/issues/1967) Receive: Allow local TSDB compaction
- [#1975](https://github.com/thanos-io/thanos/pull/1975) Store Gateway: fixed panic caused by memcached servers selector when there's 1 memcached node
- [#1970](https://github.com/thanos-io/thanos/issues/1970) Receive: Use gRPC for forwarding requests between peers
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.

I think we need an item here that indicates that people need to change their hashring files to be just addresses that the gRPC client is built from, instead of the full http endpoint.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
Copy link
Copy Markdown
Member

@brancz brancz left a comment

Choose a reason for hiding this comment

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

So awesome! Thanks! lgtm 👍

@brancz brancz merged commit 3cf366a into thanos-io:master Jan 10, 2020
squat added a commit to squat/thanos-receive-controller that referenced this pull request Jan 13, 2020
This commit updates the controller to generate gRPC endpoints rather
than HTTP endpoints, following
thanos-io/thanos#1970.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
squat added a commit to squat/thanos-receive-controller that referenced this pull request Jan 13, 2020
This commit updates the controller to generate gRPC endpoints rather
than HTTP endpoints, following
thanos-io/thanos#1970.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
@blockloop blockloop deleted the bjones/receive/use-grpc branch July 28, 2021 18:42
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.

receive: create a gRPC remote_write endpoint

4 participants