Skip to content

netty: Swap to UniformStreamByteDistributor #11659

@forthehell

Description

@forthehell

Is your feature request related to a problem?

We send the asyncUnaryCall in line in the same thread and with only one channel , we find the rpc call arrived in server is out of order。

Describe the solution you'd like

We find the reason is the WeightedFairQueueByteDistributor 。 And theUniformStreamByteDistributor can more likely do the job, but there is no configuration to switch between those ByteDistributors。 can we add the configuration about it?

if(FAIR_Distributor){
  WeightedFairQueueByteDistributor dist = new WeightedFairQueueByteDistributor(connection);
  dist.allocationQuantum(16 * 1024); // Make benchmarks fast again.
  streamByteDistributor = dist;
}else{
  UniformStreamByteDistributor uniformStreamByteDistributor =  new UniformStreamByteDistributor(connection);
  uniformStreamByteDistributor.minAllocationChunk(16 * 1024);
  streamByteDistributor = uniformStreamByteDistributor;
}

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions