Search code examples
javagrpcload-testinggatlingrate-limiting

Rate Limit Gatling-grpc users outbound requests/second


Rate Limit Gatling-grpc users outbound requests/second We are working on one a critical project and executing load tests using https://github.com/phiSgr/gatling-grpc framework targeting GRPC specific services. We are trying to limit the number of outbound requests from gatling GRPC user like only 1 req/sec. currently as part of our test, each of the GRPC user is making more than 500 reqs/sec.

As per Gatling documentation https://gatling.io/docs/gatling/reference/current/core/scenario/ we could leverage pace for normal http requests like forever().on( pace(5) .exec( // will be run every 5 seconds, irrespective of what pause time is used pause(1, 4) ) );

Would be good to have this pace like method for gatling-grpc as well so as to limit our GRPC clients.

No clear workaround thought of currently. Is there any temporary workaround within gatling-grpc on how to limit the outbound requests/sec for GRPC users ?

tried to use the pace method within our gatling-grpc java client code.


Solution

  • I consider this fixed like below, so to add a gatling pace to this Gatling GRPC. Basically, pass the pace to forever.on()

    I am using this Gatling GRPC client:
    https://github.com/phiSgr/gatling-grpc

    private final ScenarioBuilder myScenario =
        scenario("InboundGrpcScenario")
            .forever()
            .on(pace(6).exec(inboundHydration()));
    

    The most helpful link was:
    https://gatling.io/docs/gatling/reference/current/core/scenario