Skip to content

Add optional maxConnectionAge and maxConnectionAgeGrace support to G…#143

Merged
Gg-harness merged 2 commits intomainfrom
AAP-12233
Apr 15, 2026
Merged

Add optional maxConnectionAge and maxConnectionAgeGrace support to G…#143
Gg-harness merged 2 commits intomainfrom
AAP-12233

Conversation

@Gg-harness
Copy link
Copy Markdown
Contributor

@Gg-harness Gg-harness commented Apr 14, 2026

Description

Adds support for configuring maxConnectionAge and maxConnectionAgeGrace on the gRPC Netty server via GrpcPlatformServerDefinition.

Problem

Currently, gRPC connections to services built on this framework are long-lived with no upper bound on connection lifetime.
Once a persistent HTTP/2 connection is created at the time of DNS resolution, it sticks to the resolved pods and there is no rotation.

Solution

Two new optional fields on GrpcPlatformServerDefinition:

maxConnectionAgeInSeconds : Maximum time a connection may exist before the server sends a GOAWAY.
maxConnectionAgeGraceInSeconds: Grace period after GOAWAY for in-flight RPCs to complete before the connection is forcibly closed.

These are wired into NettyServerBuilder.maxConnectionAge() and NettyServerBuilder.maxConnectionAgeGrace() in GrpcPlatformServiceContainer.initializeBuilder()

Changes

GrpcPlatformServerDefinition.java — Added maxConnectionAgeInSeconds and maxConnectionAgeGraceInSeconds fields with @Builder.Default of 0.
GrpcPlatformServiceContainer.java — Apply the new fields on the NettyServerBuilder in initializeBuilder() when values are > 0.

Backward compatibility

Fully backward compatible. Both fields default to 0, which preserves the existing behavior (no connection age limit). No changes required in existing consumers.

Testing

  • Verified the module compiles cleanly
  • Full build passes
  • No existing unit tests in this module to regress

…rpcPlatformServerDefinition

AI-Session-Id: c5dae67b-13fb-4369-80af-7b15a26bfbdf
AI-Tool: claude-code
AI-Model: unknown
@Gg-harness Gg-harness requested a review from a team as a code owner April 14, 2026 05:53
@Gg-harness Gg-harness requested a review from prodion23 April 14, 2026 05:54
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

Test Results

32 tests  ±0   32 ✅ ±0   16s ⏱️ ±0s
 9 suites ±0    0 💤 ±0 
 9 files   ±0    0 ❌ ±0 

Results for commit 16242c6. ± Comparison against base commit c895f47.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

@aaron-steinfeld aaron-steinfeld left a comment

Choose a reason for hiding this comment

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

sorry dependencies are a bit out of date in this whole org. To get this passing

@aaron-steinfeld First 2 PRs are good. What dependency does this have on the kafka streams framework though?

@aaron-steinfeld
Copy link
Copy Markdown
Contributor

@aaron-steinfeld First 2 PRs are good. What dependency does this have on the kafka streams framework though?

Did you edit my comment? 🤨

I'm not sure what repo's dependency check I was looking at that flagged the avro version - maybe it was the BOM? Looks like this one is green with just the suppression, so we can close the avro upgrade until/unless needed.

@Gg-harness
Copy link
Copy Markdown
Contributor Author

@aaron-steinfeld First 2 PRs are good. What dependency does this have on the kafka streams framework though?

Did you edit my comment? 🤨

Yeah sorry, missed the Quote Reply option there :D

I'm not sure what repo's dependency check I was looking at that flagged the avro version - maybe it was the BOM? Looks like this one is green with just the suppression, so we can close the avro upgrade until/unless needed.

Cool. I will go forward with this one then

@Gg-harness Gg-harness merged commit 4e010fa into main Apr 15, 2026
5 of 6 checks passed
@Gg-harness Gg-harness deleted the AAP-12233 branch April 15, 2026 13:00
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.

2 participants