envoyproxy / envoyproxy/nighthawk

Support remote execution cancellation

Open
#380 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
414
Forks
95
Avg merge
2d 9h
Merged PRs (30d)
11

Description

In https://github.com/envoyproxy/nighthawk/pull/367 we add signal handling to the load gen CLI.

A TODO was left in in `RemoteProcessImpl::requestExecutionCancellation()` as a reminder that we could
also propagate this feature when `--nighthawk-service` is specified. Today, this feature isn't supported.

A suggested way to complete that would look as follows:

1. Implement `RemoteProcessImpl::requestExecutionCancellation()`: have it send a [gRPC cancellation request](https://github.com/envoyproxy/nighthawk/blob/fae9b7c8af7a63f2e92b316660119916a1b2bb91/api/client/service.proto#L20) to the remote service.
2. The remote service should then implement handling of this message by calling `ProcessImpl::requestExecutionCancellation()` on the currently active ProcessImpl instance.
3. The step above will then trigger all the workers to bump the right counters and gracefully stop load testing, and these counters should be propagated back to the remote client which requested it, allowing it to confirm cancellation was indeed effective. This should all just work as-is today, but this can also conveniently be used in an end-to-end test which should be added.

I seems most of the challenge will in pulling of 2.:
- The `CancellationRequest` message definition should be discussed first to see if the current one suffices.
- Getting a (safe) hold of the currently executing ProcessImpl instance (if any) may be tricky business as threading models need to be bridged.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.