Skip to content

A119: Slicer LB Policy - #551

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

A119: Slicer LB Policy#551
easwars wants to merge 4 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
@@ -0,0 +1,931 @@
# A119: Slicer LB Policy

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.

Nit: Please follow the gRFC template's formatting exactly:

https://github.com/grpc/proposal/blob/master/GRFC-TEMPLATE.md

As an example, the formatting you're using here causes the title to appear in the outline, which is undesirable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

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

* Application servers
* Kubernetes pods within a cluster
* Regions within a multi-regional service deployment

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.

Since we've decided not to support slicer as a locality-picking policy that can delegate to a child policy for endpoint picking, we're not going to support this use-case, so it might be better to remove this bullet.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment thread A119-slicer-lb-policy.md Outdated
The LB policy must support a fallback mechanism that utilizes all endpoints
provided by the Name Resolver. There are two types of fallback:

* Per-RPC fallback:

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 might be better described as "per-slice fallback".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment thread A119-slicer-lb-policy.md Outdated
* This happens when the following conditions are met:
* No valid assignments have been received from the sharding service
* Endpoints received from the Name Resolver
* Fallback timer has expired

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 don't see anything in this document that actually describes what this timer is or how it works. I think we need to flesh that out here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added a new sub-section here to talk about it.

I remember you didn't want us to start the timer everytime we create a new channel, but it feels wrong to me to use assignments from a server that we are no longer supposed to talk to (when the target URI changes). But since we are using a channel_factory_key and not just the target_uri, the LB policy cannot distinguish if it is talking to the same sharding server as before or a new one. All it knows is that the key has changed and that it has created a new channel.

Also, I believe that changes to this key will be a rare event. So, I'm in favor of restarting the timer whenever the policy creates a new channel. I'd like to hear your thoughts.

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

The LB policy receives the following information from the Name Resolver apart from its configuration:

* Endpoints with an optional hostname attribute

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.

We need to explain that if the hostname attribute is missing, we will use the address as the name.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment thread A119-slicer-lb-policy.md Outdated
// to receive sharding assignments from and to send load reports to.
config.core.v3.GrpcService grpc_service = 1

// An identifier sent to the sharding service. Assignments and load reports are

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.

Please remove reference to load reporting, since that's not part of this design.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment thread A119-slicer-lb-policy.md Outdated
Comment on lines +914 to +917
While connecting to backends eagerly like `pick_first` or `round_robin` would
work for the first case, it would be extermely wasteful in the second case. Most
of our known use-cases fall into the second bucket and optimizing for that seems
prudent.

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's probably also worth noting that supporting lazy connection establishment will work fine for both use-cases, because in the reverse-proxy case, it will quickly wind up establishing connections to all endpoints anyway.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

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

* [A42: xDS Ring Hash LB Policy][A42]
* [A52: gRPC xDS Custom Load Balancer Configuration][A52]
* [A57: XdsClient Failure Mode Behavior][A57]

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 would remove this from the list, since I don't think we actually need to reference it here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment thread A119-slicer-lb-policy.md Outdated
Comment on lines +54 to +55
* [A92: xDS ExtAuthz Support][A92]
* [A93: xDS ExtProc Support][A93]

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 don't think we need to reference A92 or A93 here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment thread A119-slicer-lb-policy.md
Comment on lines +808 to +810
The converter for the `Slicer` xDS LB policy must set the `channel_factory_key`
field of the `slicer_experimental` LB policy to contain the same value that is
used as the map key in the returned map of GrpcServices.

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 like this approach! This nicely avoids the need for the channel factory to transparently swap out the underlying channel when things like channel creds change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ack.

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.

3 participants