Load testing gRPC services

68 views
Skip to first unread message

AD

unread,
Dec 5, 2018, 7:12:41 PM12/5/18
to grpc.io
How do folks approach load testing of gRPC services? Are there any recommendations for tools that can be used for load testing gRPC services?

I'm was also exploring the possibility of using a generic h2 load testing tool (e.g. https://github.com/rakyll/hey/ and https://github.com/tsenart/vegeta) by using serialized gRPC payload.
However, I'm drawing a blank on how to go about serializing h2 requests for gRPC calls.

dbo...@gmail.com

unread,
Dec 6, 2018, 8:49:30 AM12/6/18
to grpc.io
Hello,

There is ghz (https://github.com/bojand/ghz). It's a tool a made a little while ago (and still maintain) for benchmarking and load testing gRPC services. It is inspired by hey and grpcurl. Hopefully it can be useful for your use case. If you have any problems feel free to create GitHub issues with relevant information.

Alternatively there seem to be few other approaches from some quick research; but I have not used any of these:

Supposedly Gatling can be used with gRPC:

There is a library for making your own test:

Buoyant.io seems to have some kind of stress-test utility:

Good luck!

amol.d...@quizlet.com

unread,
Dec 6, 2018, 6:22:54 PM12/6/18
to grpc.io


On Thursday, December 6, 2018 at 5:49:30 AM UTC-8, dbo...@gmail.com wrote:
Hello,

There is ghz (https://github.com/bojand/ghz). It's a tool a made a little while ago (and still maintain) for benchmarking and load testing gRPC services. It is inspired by hey and grpcurl. Hopefully it can be useful for your use case. If you have any problems feel free to create GitHub issues with relevant information.

Thanks, that was a great tip!
It was really easy to get started with using ghz. This is how I used it to test a standard gRPC health endpoint:

$ ghz -proto proto/health.proto -insecure -c 1 -t 0 -d '{"service": ""}' -call "grpc.health.v1.Health.Check" localhost:9090

Summary:
  Count: 200
  Total: 265.02 ms
  Slowest: 12.49 ms
  Fastest: 0.76 ms
  Average: 1.20 ms
  Requests/sec: 754.65

Response time histogram:
  0.757 [1] |
  1.930 [195] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  3.103 [2] |
  4.276 [1] |
  5.449 [0] |
  6.622 [0] |
  7.796 [0] |
  8.969 [0] |
  10.142 [0] |
  11.315 [0] |
  12.488 [1] |

Latency distribution:
  10% in 0.89 ms
  25% in 0.95 ms
  50% in 1.06 ms
  75% in 1.22 ms
  90% in 1.67 ms
  95% in 1.80 ms
  99% in 3.19 ms
Status code distribution:
  [OK] 200 responses



Will be exploring the tool a bit more, but that definitely seems like the best fit for my purpose.
Reply all
Reply to author
Forward
0 new messages