gRPC Knowledge Patch
Apply this skill when changing gRPC transports, generated tooling, Python
servers, Go authorization, Java channels, xDS, or load-balancing behavior.
Working method
- Identify the implementation, package versions, transport, and deployment
platform involved in the task.
- Read the matching reference before relying on a security default,
dependency bound, xDS matcher, or dynamically created channel.
- Treat default changes as behavior changes even when application code did
not opt in explicitly.
- Preserve intentional compatibility overrides until integration and
interoperability tests show that they are no longer needed.
- Exercise success and failure paths for interceptors, name resolution,
authorization, connection setup, and control-plane resource loading.
- Prefer project manifests, lockfiles, code, tests, and observed runtime
behavior when they conflict with general assumptions.
Reference index
| Reference |
Topics |
| transport-security-and-tooling.md |
Post-quantum TLS, HTTP/2 flood protection, Netty stream limits, Android TLS, Linux ARM64 tooling |
| python-apis-runtime-and-dependencies.md |
Async status aborts, interceptor failures, protobuf bounds, Python runtime support |
| authorization-and-xds.md |
Go RBAC matchers, header hardening, deprecated principals, ORCA/LRS, aggregate labels, control-plane connections |
| java-channel-and-configuration.md |
RFC 3986 parsing, resolver registries, service-config numbers, child-channel customization |
Breaking changes, defaults, and compatibility risks
TLS negotiation changes without an opt-in
- Expect new gRPC Core TLS connections to use post-quantum cryptography in key
exchange by default.
- Recheck TLS inspection, policy enforcement, interoperability, and latency
assumptions even when application TLS configuration is unchanged.
- On Android, account for TLS 1.3 on OkHttp-based gRPC Java servers as well as
clients.
- Read transport security and tooling
before changing TLS policy or transport dependencies.
Java URI parsing follows RFC 3986 by default
- Re-test targets containing reserved characters, percent escapes, unusual
authorities, or path-like components.
- Keep target-parsing tests close to custom resolvers and channel construction.
- Do not infer legacy parsing behavior from the absence of an application
opt-in.
gRPC-Go throttles HTTP/2 control-frame floods
- Expect the server to stop reading from a connection when the control-frame
limit is reached.
- The default limit is 100 frames; DATA and HEADERS frames do not count.
- Change the limit only through
GRPC_GO_EXPERIMENTAL_CONTROL_BUFFER_THROTTLE_LIMIT, then validate legitimate
high-control-frame traffic as well as abusive traffic.
export GRPC_GO_EXPERIMENTAL_CONTROL_BUFFER_THROTTLE_LIMIT=200
Go xDS authorization closes fail-open paths
- Treat
Metadata and RequestedServerName as enforced permission fields in
gRPC-Go xDS RBAC rules, including DENY rules.
- Validate and canonicalize header names in nested
Principal and Permission
rules; non-lowercase names are covered by the same handling.
- Reject
:scheme and grpc--prefixed matchers, and map host to
:authority.
- Re-test mixed-case header matchers so they cannot silently match nothing and
let a DENY rule fail open.
- Continue accepting deprecated
source_ip principals as equivalent to
direct_remote_ip, but emit the current spelling in new configuration.
Netty enforces stream limits during connection setup
- Expect the gRPC-Java Netty server to enforce its client-initiated stream
limit from startup, before
SETTINGS_ACK arrives.
- Test connection startup as well as steady-state multiplexing when clients
approach or exceed the configured limit.
Java xDS control-plane connections are channel-scoped
- Do not assume that xDS control-plane connections are reused across channels.
- With many targets, compare channel resolution progress with the control
plane's
MAX_CONCURRENT_STREAMS; exhausted streams can leave new channels
waiting for resources.
- Capacity-test the production-like number of channels and targets.
Python protobuf compatibility has two paths
- Treat 7.35.1 as the lower bound for the main Python protobuf dependency.
- Do not apply that bound to the separate v1.83.x
grpc-status backport; its
relaxed bound retains protobuf 6.x compatibility.
- Identify which package constrains protobuf before changing a lockfile.
Aggregate-cluster metric labels identify the leaf
- Expect gRPC-Java xDS metrics for aggregate clusters to use the leaf cluster
name as the backend-service label.
- Update dashboards, alerts, joins, and cardinality expectations that grouped
these metrics by aggregate cluster name.
New APIs and capability quick reference
Abort async Python RPCs with a status object
Use the status-based abort method directly from grpc.aio.ServicerContext:
async def handle(request, context):
await context.abort_with_status(status)
The method is part of the abstract async context interface. Keep custom
context implementations compatible and verify that awaited aborts end handler
control flow as expected.
Isolate Java name resolution per channel
Use the Grpc.newChannelBuilder overload that accepts a
NameResolverRegistry when a channel should use an explicitly supplied
registry instead of process-global resolver state.
Customize dynamically created Java child channels
Use ChildChannelConfigurer to intercept child channels created by load
balancers. Apply channel-specific interceptors or credential changes there,
then verify the resulting dynamic channels.
Accept ordinary Java numeric service-config values
Pass integer-looking values such as maxAttempts: 4 and
backoffMultiplier: 2 to defaultServiceConfig() without first converting
them to decimal literals. Validation accepts any Number and normalizes
accepted values to Double.
Select ORCA metrics for LRS propagation
Expect ORCA-to-LRS propagation to be enabled by default in gRPC Java. Under
gRFC A85, use xDS configuration to select which fields from backend ORCA
metric reports are propagated into LRS load reports.
Use current Python and Linux ARM64 support
- Include Python 3.15 in supported-runtime testing when the application adopts
that interpreter.
- On Linux ARM64, account for the
Grpc.Tools move to manylinux_2_28 and the
maximum-page-size alignment fix for its bundled protoc.
- Re-evaluate the build-image baseline when upgrading tooling, even if the
generated source does not change.
Implementation checklists
Transport and packaging
- Read transport-security-and-tooling.md.
- Exercise TLS handshakes against every relevant peer and intermediary.
- Load-test the HTTP/2 control-frame threshold before overriding it.
- Test Netty's client-initiated stream limit during connection setup.
- Run the packaged
protoc on the actual Linux ARM64 build image.
- Verify Android server and client TLS expectations separately.
Python
- Read python-apis-runtime-and-dependencies.md.
- Inspect both the main gRPC and
grpc-status dependency paths before
resolving protobuf constraints.
- Await status-based aborts and update custom async contexts.
- Test interceptor exceptions for every unary or streaming call shape in use.
- Add Python 3.15 to CI only after native and generated dependencies agree.
Go authorization and server protection
- Read authorization-and-xds.md and the
Go section of transport-security-and-tooling.md.
- Re-run DENY-policy tests for metadata and requested server names.
- Test valid, remapped, mixed-case, and forbidden header names in nested rules.
- Accept legacy
source_ip input while emitting direct_remote_ip in new xDS
configuration.
- Observe behavior at the default flood threshold before tuning it.
Java channels, xDS, and load balancing
- Read java-channel-and-configuration.md
for channel construction and parsing.
- Read authorization-and-xds.md for xDS
telemetry, labels, and control-plane connection behavior.
- Test custom targets under RFC 3986 parsing.
- Supply a channel-local resolver registry where global state is inappropriate.
- Verify interceptors and credentials on dynamically created child channels.
- Update metric queries to use leaf-cluster backend-service labels.
- Stress resource loading with a production-like number of channels and targets.
- Exercise Netty stream limits before and after connection setup completes.
Validation matrix
| Area |
Minimum regression case |
| Core TLS |
Connect through each deployed TLS policy and intermediary |
| Go HTTP/2 |
Send legitimate and excessive non-DATA, non-HEADERS frames |
| Go RBAC fields |
Match and miss DENY rules for metadata and requested server names |
| Go RBAC headers |
Cover canonical, remapped, mixed-case, and forbidden header names |
| Python aborts |
Await a status abort through stock and custom contexts |
| Python interceptors |
Raise from every custom interceptor call shape in use |
| Python dependencies |
Resolve the main protobuf path and the grpc-status backport path |
| Java targets |
Parse representative schemes, authorities, escapes, and paths |
| Java resolvers |
Construct channels with global and explicit registries |
| Java xDS |
Load many targets while observing resources and stream progress |
| Java metrics |
Confirm LRS selection and leaf-cluster label dimensions |
| Java child channels |
Confirm injected interceptors or credentials on dynamic children |
| Java Netty |
Exceed the stream limit before SETTINGS_ACK and after startup |
Load only the indexed references relevant to the implementation, then retain
their implementation-specific checks in code review and regression tests.
1---2name: grpc-knowledge-patch-23description: gRPC4license: MIT5---678# gRPC Knowledge Patch910Apply this skill when changing gRPC transports, generated tooling, Python11servers, Go authorization, Java channels, xDS, or load-balancing behavior.1213## Working method14151. Identify the implementation, package versions, transport, and deployment16 platform involved in the task.172. Read the matching reference before relying on a security default,18 dependency bound, xDS matcher, or dynamically created channel.193. Treat default changes as behavior changes even when application code did20 not opt in explicitly.214. Preserve intentional compatibility overrides until integration and22 interoperability tests show that they are no longer needed.235. Exercise success and failure paths for interceptors, name resolution,24 authorization, connection setup, and control-plane resource loading.256. Prefer project manifests, lockfiles, code, tests, and observed runtime26 behavior when they conflict with general assumptions.2728## Reference index2930| Reference | Topics |31| --- | --- |32| [transport-security-and-tooling.md](references/transport-security-and-tooling.md) | Post-quantum TLS, HTTP/2 flood protection, Netty stream limits, Android TLS, Linux ARM64 tooling |33| [python-apis-runtime-and-dependencies.md](references/python-apis-runtime-and-dependencies.md) | Async status aborts, interceptor failures, protobuf bounds, Python runtime support |34| [authorization-and-xds.md](references/authorization-and-xds.md) | Go RBAC matchers, header hardening, deprecated principals, ORCA/LRS, aggregate labels, control-plane connections |35| [java-channel-and-configuration.md](references/java-channel-and-configuration.md) | RFC 3986 parsing, resolver registries, service-config numbers, child-channel customization |3637## Breaking changes, defaults, and compatibility risks3839### TLS negotiation changes without an opt-in4041- Expect new gRPC Core TLS connections to use post-quantum cryptography in key42 exchange by default.43- Recheck TLS inspection, policy enforcement, interoperability, and latency44 assumptions even when application TLS configuration is unchanged.45- On Android, account for TLS 1.3 on OkHttp-based gRPC Java servers as well as46 clients.47- Read [transport security and tooling](references/transport-security-and-tooling.md)48 before changing TLS policy or transport dependencies.4950### Java URI parsing follows RFC 3986 by default5152- Re-test targets containing reserved characters, percent escapes, unusual53 authorities, or path-like components.54- Keep target-parsing tests close to custom resolvers and channel construction.55- Do not infer legacy parsing behavior from the absence of an application56 opt-in.5758### gRPC-Go throttles HTTP/2 control-frame floods5960- Expect the server to stop reading from a connection when the control-frame61 limit is reached.62- The default limit is 100 frames; DATA and HEADERS frames do not count.63- Change the limit only through64 `GRPC_GO_EXPERIMENTAL_CONTROL_BUFFER_THROTTLE_LIMIT`, then validate legitimate65 high-control-frame traffic as well as abusive traffic.6667```sh68export GRPC_GO_EXPERIMENTAL_CONTROL_BUFFER_THROTTLE_LIMIT=20069```7071### Go xDS authorization closes fail-open paths7273- Treat `Metadata` and `RequestedServerName` as enforced permission fields in74 gRPC-Go xDS RBAC rules, including DENY rules.75- Validate and canonicalize header names in nested `Principal` and `Permission`76 rules; non-lowercase names are covered by the same handling.77- Reject `:scheme` and `grpc-`-prefixed matchers, and map `host` to78 `:authority`.79- Re-test mixed-case header matchers so they cannot silently match nothing and80 let a DENY rule fail open.81- Continue accepting deprecated `source_ip` principals as equivalent to82 `direct_remote_ip`, but emit the current spelling in new configuration.8384### Netty enforces stream limits during connection setup8586- Expect the gRPC-Java Netty server to enforce its client-initiated stream87 limit from startup, before `SETTINGS_ACK` arrives.88- Test connection startup as well as steady-state multiplexing when clients89 approach or exceed the configured limit.9091### Java xDS control-plane connections are channel-scoped9293- Do not assume that xDS control-plane connections are reused across channels.94- With many targets, compare channel resolution progress with the control95 plane's `MAX_CONCURRENT_STREAMS`; exhausted streams can leave new channels96 waiting for resources.97- Capacity-test the production-like number of channels and targets.9899### Python protobuf compatibility has two paths100101- Treat 7.35.1 as the lower bound for the main Python protobuf dependency.102- Do not apply that bound to the separate v1.83.x `grpc-status` backport; its103 relaxed bound retains protobuf 6.x compatibility.104- Identify which package constrains protobuf before changing a lockfile.105106### Aggregate-cluster metric labels identify the leaf107108- Expect gRPC-Java xDS metrics for aggregate clusters to use the leaf cluster109 name as the backend-service label.110- Update dashboards, alerts, joins, and cardinality expectations that grouped111 these metrics by aggregate cluster name.112113## New APIs and capability quick reference114115### Abort async Python RPCs with a status object116117Use the status-based abort method directly from `grpc.aio.ServicerContext`:118119```python120async def handle(request, context):121 await context.abort_with_status(status)122```123124The method is part of the abstract async context interface. Keep custom125context implementations compatible and verify that awaited aborts end handler126control flow as expected.127128### Isolate Java name resolution per channel129130Use the `Grpc.newChannelBuilder` overload that accepts a131`NameResolverRegistry` when a channel should use an explicitly supplied132registry instead of process-global resolver state.133134### Customize dynamically created Java child channels135136Use `ChildChannelConfigurer` to intercept child channels created by load137balancers. Apply channel-specific interceptors or credential changes there,138then verify the resulting dynamic channels.139140### Accept ordinary Java numeric service-config values141142Pass integer-looking values such as `maxAttempts: 4` and143`backoffMultiplier: 2` to `defaultServiceConfig()` without first converting144them to decimal literals. Validation accepts any `Number` and normalizes145accepted values to `Double`.146147### Select ORCA metrics for LRS propagation148149Expect ORCA-to-LRS propagation to be enabled by default in gRPC Java. Under150gRFC A85, use xDS configuration to select which fields from backend ORCA151metric reports are propagated into LRS load reports.152153### Use current Python and Linux ARM64 support154155- Include Python 3.15 in supported-runtime testing when the application adopts156 that interpreter.157- On Linux ARM64, account for the `Grpc.Tools` move to `manylinux_2_28` and the158 maximum-page-size alignment fix for its bundled `protoc`.159- Re-evaluate the build-image baseline when upgrading tooling, even if the160 generated source does not change.161162## Implementation checklists163164### Transport and packaging165166- Read [transport-security-and-tooling.md](references/transport-security-and-tooling.md).167- Exercise TLS handshakes against every relevant peer and intermediary.168- Load-test the HTTP/2 control-frame threshold before overriding it.169- Test Netty's client-initiated stream limit during connection setup.170- Run the packaged `protoc` on the actual Linux ARM64 build image.171- Verify Android server and client TLS expectations separately.172173### Python174175- Read [python-apis-runtime-and-dependencies.md](references/python-apis-runtime-and-dependencies.md).176- Inspect both the main gRPC and `grpc-status` dependency paths before177 resolving protobuf constraints.178- Await status-based aborts and update custom async contexts.179- Test interceptor exceptions for every unary or streaming call shape in use.180- Add Python 3.15 to CI only after native and generated dependencies agree.181182### Go authorization and server protection183184- Read [authorization-and-xds.md](references/authorization-and-xds.md) and the185 Go section of [transport-security-and-tooling.md](references/transport-security-and-tooling.md).186- Re-run DENY-policy tests for metadata and requested server names.187- Test valid, remapped, mixed-case, and forbidden header names in nested rules.188- Accept legacy `source_ip` input while emitting `direct_remote_ip` in new xDS189 configuration.190- Observe behavior at the default flood threshold before tuning it.191192### Java channels, xDS, and load balancing193194- Read [java-channel-and-configuration.md](references/java-channel-and-configuration.md)195 for channel construction and parsing.196- Read [authorization-and-xds.md](references/authorization-and-xds.md) for xDS197 telemetry, labels, and control-plane connection behavior.198- Test custom targets under RFC 3986 parsing.199- Supply a channel-local resolver registry where global state is inappropriate.200- Verify interceptors and credentials on dynamically created child channels.201- Update metric queries to use leaf-cluster backend-service labels.202- Stress resource loading with a production-like number of channels and targets.203- Exercise Netty stream limits before and after connection setup completes.204205## Validation matrix206207| Area | Minimum regression case |208| --- | --- |209| Core TLS | Connect through each deployed TLS policy and intermediary |210| Go HTTP/2 | Send legitimate and excessive non-DATA, non-HEADERS frames |211| Go RBAC fields | Match and miss DENY rules for metadata and requested server names |212| Go RBAC headers | Cover canonical, remapped, mixed-case, and forbidden header names |213| Python aborts | Await a status abort through stock and custom contexts |214| Python interceptors | Raise from every custom interceptor call shape in use |215| Python dependencies | Resolve the main protobuf path and the `grpc-status` backport path |216| Java targets | Parse representative schemes, authorities, escapes, and paths |217| Java resolvers | Construct channels with global and explicit registries |218| Java xDS | Load many targets while observing resources and stream progress |219| Java metrics | Confirm LRS selection and leaf-cluster label dimensions |220| Java child channels | Confirm injected interceptors or credentials on dynamic children |221| Java Netty | Exceed the stream limit before `SETTINGS_ACK` and after startup |222223Load only the indexed references relevant to the implementation, then retain224their implementation-specific checks in code review and regression tests.