Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GRPC retry policy #413

Open
yc2984 opened this issue Apr 20, 2023 · 0 comments
Open

Support GRPC retry policy #413

yc2984 opened this issue Apr 20, 2023 · 0 comments

Comments

@yc2984
Copy link

yc2984 commented Apr 20, 2023

Is your feature request related to a problem? Please describe.
I'd like to use ghz to do benchmarking but mimicking the exact behavior of my client. Currently I have a Python client looks like this:

import json
import grpc

json_config = json.dumps(
    {
        "methodConfig": [
            {
                "name": [{"service": "<package>.<service>"}],
                "retryPolicy": {
                    "maxAttempts": 5,
                    "initialBackoff": "0.1s",
                    "maxBackoff": "10s",
                    "backoffMultiplier": 2,
                    "retryableStatusCodes": ["UNAVAILABLE"],
                },
            }
        ]
    }
)

address = 'localhost:50051'

channel = grpc.insecure_channel(address, options=[("grpc.service_config", json_config)])

The Python client can scale up to many workers this is covered by the concurrency flag. However there is no retry options in ghz.

Describe the solution you'd like
Add a flag to support retry policy supplied as a json file.

Describe alternatives you've considered

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant