Skip to content

Why is grpc via dapr slower than http? #4866

@hspaay

Description

@hspaay

Note: If you have a general support question and are looking for a quicker response, please checkout our discord channel for answers from the community:
https://aka.ms/dapr-discord

In what area(s)?

/area runtime

/area operator

/area placement

/area docs

/area test-and-release

Ask your question here

A simplistic performance comparison of invoking a method via gRPC and http with and without dapr shows that without dapr the grpc calls are more efficient by factor 2 but via dapr less efficient by 10%. Also interesting is that grpc performance is nearly 5 times slower via dapr compared to direct calls. Is this expected?

The tests are in the makefile in this repo: https://github.com/wostzone/echo-dapr and the readme shows the numbers. Repeated here for convenience:

Makefile test duration
run1 1000 plain grpc calls 164 msec
run2 1000 plain http calls 320 msec
run3 1000 dapr wrapped grpc calls 986 msec
run4 1000 dapr wrapped http calls 824 msec
run5 1000 grpc sdk calls 772 msec
run6 1000 http sdk calls 700 msec

Please note that this is a simplistic performance test without additional middleware, just simple invoke.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssues and PRs without response

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions