You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Status

Current stateUnder Discussion

Discussion thread: TBD

JIRA: here [Change the link from KAFKA-1 to your own ticket]

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

Under static membership, client user could provide a list of hard-coded `group.instance.id` so that the server 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 rebalance, same with scale down. This change requires us to change JoinGroup protocol to batch mode in order to enable admin request to easily scale.

Public Interfaces

We will bump JoinGroup request/response version to support batch adding members.

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 a list of `group.instance.id`:

AdminClient.java
public static AddMemberResult addMembersToGroup(String groupId, list<String> groupInstanceIdsToAdd, AddMemberToGroupOptions options);


In the meantime, for better visibility for static members, we are also going to bump DescribeGroup request/response protocol to include `group.instance.id`:

Proposed Changes

Describe the new thing you want to do in appropriate detail. This may be fairly extensive and have large subsections of its own. Or it may be a few sentences. Use judgement based on the scope of the change.

Compatibility, Deprecation, and Migration Plan

  • What impact (if any) will there be on existing users?
  • If we are changing behavior how will we phase out the older behavior?
  • If we need special migration tools, describe them here.
  • When will we remove the existing behavior?

Rejected Alternatives

If there are alternative ways of accomplishing the same thing, what were they? The purpose of this section is to motivate why the design is the way it is and not some other way.

  • No labels