-
Notifications
You must be signed in to change notification settings - Fork 807
Open
Labels
questionFurther information is requestedFurther information is requested
Milestone
Description
I'm trying to transfer a big data between two services using grpc.
The data size is about 23M and is composed by 42 big List.
Then I test the performance using one unary call vs server side streaming(stream one list at a time).
The unary call takes 276.59 ms.
The streaming call takes 126.64 ms.
But if I change the data to contains 1000 small list, each list just have one number, the streaming call is much more slower than unary call.
Is the result normal? And Why?
Here is the server side code:
public override Task<MemDtoToWbs> GetLargeMEM(Empty request, ServerCallContext context)
{
return Task.FromResult(MemData.GrpcLargeMem);
}
public override async Task StreamLargeMem(Empty request, IServerStreamWriter<LogDtoToWbs> responseStream, ServerCallContext context)
{
foreach (var log in MemData.GrpcLargeMem.Logs)
{
await responseStream.WriteAsync(log);
}
}
I use the .net core 3.1 and grpc nuget package 2.32.0.
Run test in aks cluster
Thanks.
dheerajawale-svg
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested