Open IYZaytsev opened 10 months ago
That's expected. Serialization is a small piece of making an HTTP request.
That's expected. Serialization is a small piece of making an HTTP request.
But I thought that the whole point of protobuf was faster serialization/deserialization and smaller size. Shouldn't there be at least some performance improvement? Are you sure I am not doing something wrong and that these two calls are equivalent, or maybe some configuration I missed? If there is not something wrong with my methods, System.Text.Json must have some crazy good performance. If I am not using streaming but just unary what is the benefit of using GRPC?
I wrote these two APIs to talk to another service(TestApp2). One forwards via GRPC and the other uses HTTP/2.
Using these settings.
TestApp2 has these settings
And the two handlers being.
I wrote a program to try to measure the latency of each API and what I found is that both have almost the same performance. I understand that GRPC uses HTTP/2 but I thought the serialization and deserialization would still make it faster.