nighthawk icon indicating copy to clipboard operation
nighthawk copied to clipboard

Nighthawk-based wget

Open eric846 opened this issue 4 years ago • 0 comments

When an Envoy server listens with a custom transport socket, another Envoy downstream with the same transport socket can be the only tool capable of making valid requests to it.

If wget or curl doesn't work because of the custom protocol, it is difficult to test whether a server is working.

The current solution is to run a low-RPS Nighthawk benchmark for a few seconds and see if it returns 2xx. But if there is an error, some diagnostic information is lost.

We should consider creating a mode for Nighthawk where it:

  • Makes a single HTTP request
  • Prints or logs the full HTTP response

This would also be useful for debugging a server with an ordinary protocol where an ordinary Nighthawk benchmark was returning all 4xx or 5xx.

A cheap way to implement it:

  • Log the first 2xx HTTP response in full
  • Log the first 3xx HTTP response in full
  • Log the first 4xx HTTP response in full
  • Log the first 5xx HTTP response in full

Plus a command line flag that translates to:

  • RPS 1
  • Duration 10 seconds
  • Termination predicates that allow up to 10 failures of each kind: connection failure, stream reset, 3xx, 4xx, 5xx
  • Extra termination predicate that quits when the 2xx count exceeds 0

eric846 avatar Nov 22 '21 00:11 eric846