-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
Is spring.grpc.client.default-channel.enable-keep-alive intended to control whether client keepalive PINGs are sent?
Even when this is set to false, HTTP/2 PING frames are still sent.
Configuration used:
spring:
grpc:
client:
default-channel:
enable-keep-alive: false
keep-alive-time: 10sScreenshot:
PING frames are sent periodically even with default settings.
The explicit keepalive properties were set only for easier observation.
The suspected location is ClientPropertiesChannelBuilderCustomizer, where keepalive settings seem to be applied unconditionally:
mapper.from(channel.getKeepAliveTime()).to(durationProperty(builder::keepAliveTime));
mapper.from(channel.getKeepAliveTimeout()).to(durationProperty(builder::keepAliveTimeout));
mapper.from(channel.isKeepAliveWithoutCalls()).to(builder::keepAliveWithoutCalls);enableKeepAlive is defined as a property, but it does not appear to be used to gate keepalive application.
Would it be necessary to guard this with enableKeepAlive, for example:
if (channel.isEnableKeepAlive()) {
mapper.from(channel.getKeepAliveTime()).to(durationProperty(builder::keepAliveTime));
mapper.from(channel.getKeepAliveTimeout()).to(durationProperty(builder::keepAliveTimeout));
mapper.from(channel.isKeepAliveWithoutCalls()).to(builder::keepAliveWithoutCalls);
}Thanks for taking a look.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels