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

gRPC Storage Service #2220

Merged
merged 6 commits into from
May 29, 2020

Conversation

VineethReddy02
Copy link
Contributor

What this PR does:
This PR contains gRPC service client i.e

  1. Index Client
  2. Storage Client
  3. Table Client

This is still in work in progress PR this needs testing with gRPC storage server implementation

Which issue(s) this PR fixes:
Fixes #1681

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@VineethReddy02 VineethReddy02 force-pushed the vineeth-grpc-storage branch 4 times, most recently from b8e8348 to 8105431 Compare March 12, 2020 17:52
Copy link
Contributor

@gouthamve gouthamve left a comment

Choose a reason for hiding this comment

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

Looks good for the first attempt! Left some cursory feedback, lets iterate on this!

@VineethReddy02 VineethReddy02 changed the title [WIP] gRPC Storage Service gRPC Storage Service Mar 24, 2020
@VineethReddy02 VineethReddy02 force-pushed the vineeth-grpc-storage branch 3 times, most recently from 6ce1b06 to 9e6a9db Compare April 8, 2020 12:26
@VineethReddy02 VineethReddy02 force-pushed the vineeth-grpc-storage branch 12 times, most recently from 3a56ef4 to 2330999 Compare April 15, 2020 15:49
Copy link
Contributor

@gouthamve gouthamve left a comment

Choose a reason for hiding this comment

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

One final comment and then we're good to go!

@VineethReddy02 VineethReddy02 force-pushed the vineeth-grpc-storage branch 6 times, most recently from 857ba52 to 5de9543 Compare May 21, 2020 20:31
@VineethReddy02
Copy link
Contributor Author

Thanks @pracucci for taking the time & reviewing. I made all the suggested changes.
Looking forward in getting this merged. :)

Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

LGTM! I just left a couple of minor nits and then we should good to go.

@VineethReddy02 VineethReddy02 force-pushed the vineeth-grpc-storage branch from 5de9543 to cc328bd Compare May 26, 2020 18:04
@pstibrany
Copy link
Contributor

Since this API is supposedly to be used for writing 3rd party storage implementations, I think it lacks documentation (at least inside grpc.proto file, but more generic documentation about how Cortex uses the storage and what should the user of this API reasonably expect).

Is there any implementation using this API? How do we know it satisfies the needs of external storage client?

(I am also skeptical about including this in Cortex in the first place. Many failure modes related to gRPC (grpc server not running, big responses, bad config, ...) would be automatically removed if client was included in the Cortex)

@gouthamve
Copy link
Contributor

I think it lacks documentation

Absolutely. We still have follow up work to document and give a reference in-memory implementation. And to use the in-mem implementation to write an integration test.

would be automatically removed if client was included in the Cortex

What do you mean?

@pstibrany
Copy link
Contributor

Absolutely. We still have follow up work to document and give a reference in-memory implementation. And to use the in-mem implementation to write an integration test.

I think we need real implementation or two, not just in-mem one.

would be automatically removed if client was included in the Cortex

What do you mean?

I was talking about failure modes related to gRPC -- which wouldn't be a problem if client was in Cortex directly, and not using gRPC (well, obviously). Just saying that using gRPC adds more complexity.

@gouthamve
Copy link
Contributor

I kinda disagree :) I see gRPC having the same amount of failure modes as a remote Bigtable/Cassandra. They are both endpoints.

grpc server not running, big responses, bad config, ...

We faced these with Bigtable tbh, specially the big responses. We had to up our gRPC message limit with a previous schema, hence came up with the v9/v10 schema. I would say gRPC makes the failure modes more likely, but doesn't introduce new ones.

And while I agree that having the client directly in Cortex would be the best, I am not super enthused about a ton of storage clients in the tree.

@gouthamve
Copy link
Contributor

I think we need real implementation or two, not just in-mem one.

The first one was going to be Postgres/MySQL so Loki could use it as the index. Not sure what the next one would be tbh.

@pstibrany
Copy link
Contributor

And while I agree that having the client directly in Cortex would be the best, I am not super enthused about a ton of storage clients in the tree.

I personally think that biggest issue in people contributing more clients is lack of good documentation, and pointers about how to start.

Anyway, please feel free to merge when PR is ready, my comments are not merge-blockers.

This PR contains gRPC service client i.e
1. Index Client
2. Storage Client
3. Table Client

Signed-off-by: vineeth <[email protected]>
Signed-off-by: Vineeth Pothulapati <[email protected]>
… added the logic to terminate connection on Stop() invocation.

Signed-off-by: Vineeth Pothulapati <[email protected]>
@VineethReddy02 VineethReddy02 force-pushed the vineeth-grpc-storage branch 3 times, most recently from fe7a374 to 955ac72 Compare May 28, 2020 16:51
@VineethReddy02 VineethReddy02 force-pushed the vineeth-grpc-storage branch from 955ac72 to 20aaa11 Compare May 28, 2020 17:18
@pracucci
Copy link
Contributor

Let's gooo 🚀 ! I will merge as soon as the CI passes

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.

Explore storage plugins
4 participants