Skip to content

Commit dafe8c0

Browse files
authored
service config and channelz changes for connection scaling (#171)
* add connection scaling message to service config * add connection scaling fields in channelz * add reference to gRFC A105
1 parent ec99424 commit dafe8c0

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

grpc/channelz/v1/channelz.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ message ChannelData {
115115

116116
// The last time a call was started on the channel.
117117
google.protobuf.Timestamp last_call_started_timestamp = 7;
118+
119+
// Populated for subchannels only.
120+
uint32 max_connections_per_subchannel = 8;
118121
}
119122

120123
// A trace event is an interesting thing that happened to a channel or
@@ -292,6 +295,14 @@ message SocketData {
292295
// Socket options set on this socket. May be absent if 'summary' is set
293296
// on GetSocketRequest.
294297
repeated SocketOption option = 13;
298+
299+
// Populated if a GOAWAY has been received. The value will be the
300+
// HTTP/2 error code from the GOAWAY.
301+
google.protobuf.UInt32Value received_goaway_error = 14;
302+
303+
// The value of MAX_CONCURRENT_STREAMS set by the peer. Populated on
304+
// client side only.
305+
uint32 peer_max_concurrent_streams = 15;
295306
}
296307

297308
// Address represents the address used to create the socket.

grpc/service_config/service_config.proto

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,25 @@ message ServiceConfig {
641641
}
642642
HealthCheckConfig health_check_config = 5;
643643

644-
// next available tag: 6
644+
// Settings to control dynamic connection scaling. For details, see:
645+
// https://github.com/grpc/proposal/blob/master/A105-max_concurrent_streams-connection-scaling.md
646+
message ConnectionScaling {
647+
// Maximum connections gRPC will maintain for each subchannel in
648+
// this channel. When no streams are available for an RPC in a
649+
// subchannel, gRPC will automatically create new connections up
650+
// to this limit. If this value changes during the life of a
651+
// channel, existing subchannels will be updated to reflect
652+
// the change. No connections will be closed as a result of
653+
// lowering this value; down-scaling will only happen as
654+
// connections are lost naturally.
655+
//
656+
// Values higher than the client-enforced limit (by default, 10)
657+
// will be clamped to that limit.
658+
google.protobuf.UInt32Value max_connections_per_subchannel = 1;
659+
}
660+
ConnectionScaling connection_scaling = 6;
661+
662+
// next available tag: 7
645663
}
646664

647665
//

0 commit comments

Comments
 (0)