nighthawk icon indicating copy to clipboard operation
nighthawk copied to clipboard

Support remote execution cancellation

Open oschaaf opened this issue 5 years ago • 0 comments

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 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.

oschaaf avatar Jun 22 '20 22:06 oschaaf