-
Notifications
You must be signed in to change notification settings - Fork 105
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
Add spanner_grpc_config.json and enable grpc-gcp support for spanner #503
Merged
JustinBeckwith
merged 13 commits into
googleapis:master
from
WeiranFang:grpc-gcp-support
Feb 15, 2019
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5652e16
Add spanner_grpc_config.json and enable grpc-gcp support for spanner
WeiranFang 2f1660c
Merge branch 'master' into grpc-gcp-support
WeiranFang a9aef4c
pin google-gax 0.25.0
WeiranFang 9950e52
Merge branch 'master' into grpc-gcp-support
crwilcox c0e374b
Merge branch 'master' into grpc-gcp-support
JustinBeckwith c264e00
Merge branch 'master' into grpc-gcp-support
WeiranFang 775b44d
fix lint error
WeiranFang 30130ef
Merge branch 'master' into grpc-gcp-support
JustinBeckwith a6942d2
Merge branch 'master' into grpc-gcp-support
WeiranFang 89ac8a8
Merge branch 'master' into grpc-gcp-support
JustinBeckwith edf7b16
Merge branch 'master' into grpc-gcp-support
JustinBeckwith 95e4fa5
Merge branch 'master' into grpc-gcp-support
WeiranFang 6d2b428
Merge branch 'master' into grpc-gcp-support
JustinBeckwith File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
"channelPool": { | ||
"maxSize": 10, | ||
"maxConcurrentStreamsLowWatermark": 100 | ||
}, | ||
"method": [ | ||
{ | ||
"name": [ "/google.spanner.v1.Spanner/CreateSession" ], | ||
"affinity": { | ||
"command": "BIND", | ||
"affinityKey": "name" | ||
} | ||
}, | ||
{ | ||
"name": [ "/google.spanner.v1.Spanner/GetSession" ], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "name" | ||
} | ||
}, | ||
{ | ||
"name": [ "/google.spanner.v1.Spanner/DeleteSession" ], | ||
"affinity": { | ||
"command": "UNBIND", | ||
"affinityKey": "name" | ||
} | ||
}, | ||
{ | ||
"name": [ "/google.spanner.v1.Spanner/ExecuteSql" ], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": [ "/google.spanner.v1.Spanner/ExecuteStreamingSql" ], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": [ "/google.spanner.v1.Spanner/Read" ], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": [ "/google.spanner.v1.Spanner/StreamingRead" ], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": [ "/google.spanner.v1.Spanner/BeginTransaction" ], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": [ "/google.spanner.v1.Spanner/Commit" ], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": [ "/google.spanner.v1.Spanner/Rollback" ], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": [ "/google.spanner.v1.Spanner/PartitionQuery" ], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": [ "/google.spanner.v1.Spanner/PartitionRead" ], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is this all essentially fine tuning for each API endpoint we access? Who is supposed to keep this up to date?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently it's configured as this to address the max 100 concurrent streams issue, but I think as for who's responsible for future changes in this file, it depends on which parts to change. For example if the affinity key changes, then the service owner needs to change it, and if the grpc channel max throughput changes, then we should make the changes accordingly. Does that sound reasonable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My one thought here is if there is a way to combine this with our other configuration at some point. We already specify retry conditions for rpc calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crwilcox We already maintain a general ApiConfig proto definition for all languages, so I believe it would be good to have a separate config file specifically for this proto. Also FWIK in future more grpc features (like retry logic and regional support) will also be supported in this grpc-gcp library. In that case those grpc related configs can all be put into this config file.. WDYT?