...
Rebalance during scaling up is always painful. Every newly joined member will keep the group at rebalancing stage until all of new instances finished bootstrapping. There could be multiple shuffling of active tasks around existing and new instances, thus decreasing the availability by a lot. This situation has been changed after we introduced KIP-345. Under static membership, user could provide a list of hard-coded `group.instance.id`s to pre-register their identities on broker, so that broker cooridnator could respond to scaling operations more intelligently. For example when we scale up the fleet by defining 4 new client instance ids, the server shall wait until all 4 new members to join the group before kicking out the only one rebalance, instead of 4 four in the worst case.
Proposed Changes
...
Code Block |
---|
JoinGroupRequest => GroupId SessionTimeout RebalanceTimeout MemberId GroupInstanceId ProtocolType GroupProtocols GroupId => String SessionTimeout => int32 // removed RebalanceTimeout => int32 // removed MemberId => String // removed GroupInstanceId => String // removed ProtocolType => String GroupProtocols => [Protocol MemberMetadata] Protocol => String // removed MemberMetadata => bytes // removed JoinGroupMembers => []JoinGroupRequestMember // new SessionTimeout => int32 // new RebalanceTimeout => int32 // new MemberId => String // new GroupInstanceId => String // new Protocol => String // new JoinGroupResponse => ThrottleTime ErrorCode GenerationId ProtocolName LeaderId MemberId Members ThrottleTime => int16 ErrorCode => int16 // removed GenerationId => int32 ProtocolName => String LeaderId => String MemberId => String // removed Members => []JoinGroupResponseMember MemberId => String GroupInstanceId => String Metadata => bytes MemberJoinResponseList => []JoinGroupResult // new MemberInfo => JoinGroupResponseMember ErrorCode => int16 |
A new admin request shall be created to execute this request by supplying for user to supply a list of `group.instance.id` for batch join:
Code Block | ||||
---|---|---|---|---|
| ||||
public static AddMemberResult addMembersToGroup(String groupId, list<String> groupInstanceIdsToAdd, AddMemberToGroupOptions options); |
...
- User needs to upgrade broker to latest version to be able to use this new feature.
- Since we are only introducing a new admin API, the change should be backward compatible.
...