gRPC or REST

gRPC or REST

I have designed and implemented many REST API's over years. If I have to do them now I would have chosen gRPC for more than half of those scenario's. REST (REpresentational state transfer) was developed early 2000's. It took off and replaced SOAP API's quickly. While gRPC is developed pretty recently in 2015.

A quick comparison

No alt text provided for this image

If you do not consume the API's directly in your browser you should go gRPC. If your use case needs your browser to make API calls then REST is the option for you. I do not have the performance numbers of gRPC with a proxy like Envoy. I will update the article soon with that.

All other aspects are comparable and give advantage to gRPC. If you want more details these are my references:

Link to my blog: gRPC or REST (pigeonmw.com)

If you are using dotnet 5.0, REST performance is almost equal to gRPC. From 3.1 to 5.0 performance improved 3 times for REST (dotnet core). I will add some tests for other platforms soon.

I did not find lot of difference in performance after doing my own tests. https://github.com/vijayakrishnamr/grpcvsrest If anyone want the performance number let me know. Or you can run the tests and see.

赞
回复

要查看或添加评论,请登录

Vijayakrishna Ramachandra的更多文章

  • Measurements

    Measurements

    Yesterday I made a statement to my daughter that she is spending too much time on the phone. She argued back that she…

  • Developer demo to QA

    Developer demo to QA

    This is copy of my blog Agile for Customer We were having a two-week sprint. We calculate the capacity of the team and…

社区洞察

其他会员也浏览了