In my last post, I presented a benchmark about performance in gRPC vs REST context. The results were very clear, gRPC in local macOS networks works better only for larger payloads. I decided to do the next step in this context & prepare a similar test environment in the Azure Kubernetes cluster.
To measure these results I decided to use Azure Application Insights requests monitor. Now I decided to use only four methods:
- Post/Failed – post requests finished with fail (500) (Failed / Post),
- Get – get only one element,
- GetColection – get a small collection of elements,
- Add – put requests.
This methods were implemented in both solutions:
Infrastructure of tests
- 16 pods of clients,
- 2 pods of server.
- 1200 requests per pod, per hour = 19200 requests/hour to 2 instances of the server.
Screenshots of results:
App Insights monitoring all gRPC requests like the POST method. Btw. without small modification of handling gRPC errors at server-side, all requests return 200! The way of handling of gRPC errors was presented here.
So as You see in almost production environments both ways of communication have very similar performance for small payload requests. Only error handling is 3 times faster in gRPC technology, but who wants to get handle errors faster :D?