-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance of Grpc.AspNetCore vs REST over HTTP/2 Similar? #2363
Comments
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.
The text was updated successfully, but these errors were encountered: