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
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:
- gRPC vs REST: Understanding gRPC, OpenAPI and REST and when to use them in API design | Google Cloud Blog
- gRPC vs. REST: pros and cons and technical comparison (daily.dev)
Comments
Post a Comment