Skip to content

A119: Auto-Sharding LB Policy - #551

Open
easwars wants to merge 27 commits into
grpc:masterfrom
easwars:slicer
Open

A119: Auto-Sharding LB Policy#551
easwars wants to merge 27 commits into
grpc:masterfrom
easwars:slicer

Conversation

@easwars

@easwars easwars commented May 22, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@easwars
easwars requested review from dfawley, ejona86 and markdroth May 22, 2026 23:26
@easwars

easwars commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

@markdroth @ejona86 @dfawley
FYI: There are still some sections with TBDs (mostly around load reporting and xDS integration). I will have them filled out as early as I possibly can. But I believe that there is still enough in here for reviews to begin. Thanks.

Comment thread A119-slicer-lb-policy.md Outdated
@easwars

easwars commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

I'm going to be making some structural changes to the spec based on our review today. Will ping here once it is ready for review. @markdroth @ejona86 @dfawley

@shivaspeaks @pawbhard Please expect some changes to the spec, but not wholesale changes. So, you could start looking at it from an implementation pov. Thanks.

@easwars

easwars commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

The PR is ready to be looked at.
@markdroth @ejona86 @dfawley

@markdroth markdroth left a comment

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.

This looks really good!

I have a lot of comments here, but they're mostly fine details or clarifications -- the high-level shape of this is solid, and the doc does a good job of describing it.

Please let me know if you have any questions. Thanks!

Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated

@markdroth markdroth left a comment

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.

This is getting closer!

Please let me know if you have any questions. Thanks!

Comment thread A119-autosharding-lb-policy.md
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment on lines +332 to +335
// A timeout value for fallback to kick in when no assignments have been
// received from the sharding service.
// Defaults to 60 seconds if not specified.
google.protobuf.Duration fallback_timeout = 6;

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.

It doesn't really matter whether it's defined here or in A121. I guess it should be in whichever of the two gRFCs is going to be merged last.

Please coordinate with @mbissa.

Comment thread A119-slicer-lb-policy.md Outdated
Comment on lines +146 to +147
allEndpointsInSlice []int // Indices into sliceMap.allEndpoints
endpointsByState [5][]int // Array indexed directly by connectivity.State (ranges 0..4)

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.

Okay. @pawbhard, let's consider this for the C-core implementation.

Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment on lines +752 to +757
1. Parsing a `GrpcService` proto embedded within an LB policy's configuration
into its internal representation, requires access to the following:
* the complete bootstrap configuration to access the `allowed_grpc_services`
section of the bootstrap configuration.
* configuration of the specific xDS server that delivered this resource, to
determine if the server is to be trusted or not.

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.

Meant to tag @pawbhard on this comment.

Comment thread A119-autosharding-lb-policy.md
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-autosharding-lb-policy.md
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-autosharding-lb-policy.md
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-autosharding-lb-policy.md
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
@easwars

easwars commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@markdroth : I think I've addressed all your comments. Thanks for the detailed review.

@markdroth markdroth left a comment

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.

This looks really good! Remaining comments are mostly minor.

@ejona86 and @dfawley, please review.

Comment thread A119-autosharding-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment on lines +571 to +572
If validation fails, the LB policy must terminate the stream to the sharding
service, and attempt to re-establish it.

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.

Is this really the right thing to do? If we get an invalid assignment, that's likely a bug in the slicer service, and it's not clear to me that reestablishing the stream will fix it -- we'll probably just get the same bad data again after we restart the stream. But restarting the stream will cause load on the server, so I'd be worried about a cascading failure here: a bug in the slicer service could cause all of the clients to start terminating and reconnecting streams, which could cause a lot of unexpected load.

I suggest asking the slicer folks how they handle this kind of case today.

Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-autosharding-lb-policy.md
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-slicer-lb-policy.md Outdated
Comment thread A119-autosharding-lb-policy.md Outdated
Comment thread A119-autosharding-lb-policy.md Outdated
@markdroth markdroth changed the title A119: Slicer LB Policy A119: Auto-Sharding LB Policy Aug 10, 2026

@jggj-c jggj-c left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

...

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.

4 participants