linkerd-tcp icon indicating copy to clipboard operation
linkerd-tcp copied to clipboard

Adds failfast mode for unroutable requests.

Open stevej opened this issue 8 years ago • 3 comments

  • Fixes Issue #26.
  • Adds a failfast mode for currently unroutable requests.
  • Adds an integration test for failfast mode.
  • Adds a mock namerd.
  • Adds a mock static webserver.
  • Improves some comments.

Problem: If a request coming through is unroutable (e.g. if no routable path is given) then linkerd-tcp hangs.

Solution: Add a failfast mode that immediately drops unroutable requests.

stevej avatar Apr 10 '17 20:04 stevej

Should I take this opportunity to bump linkerd-tcp to 0.0.3?

stevej avatar Apr 10 '17 21:04 stevej

@stevej re: linkerd-tcp-0.0.3, I think we should do another release soon too, but was thinking we could have a separate branch to update CHANGES.md once we're ready to release. So for now I'd vote to leave it as is.

klingerf avatar Apr 10 '17 21:04 klingerf

I gave this branch a try and was able to successfully reproduce the fail fast behavior that's intended. I ran into a separate issue thought that seems potentially related.

I started by configuring linkerd-tcp with a path that's resolvable using namerd's dtab, and verified that I could successfully proxy an HTTP request through linkerd-tcp.

After making the initial successful request, I used namerctl to change the the dtab in namerd so that the path was no longer resolvable. After that, I made a second request to linkerd-tcp, which failed. In the linkerd-tcp logs, I see:

ERROR:linkerd_tcp::app         : sink error
thread 'admin' panicked at 'could not run admin: Error { repr: Kind(Other) }', /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/libcore/result.rs:868
note: Run with `RUST_BACKTRACE=1` for a backtrace.

After that I made a third request to linkerd-tcp, which causes the process to panic and exit with status code 101. In the linkerd-tcp logs, I see:

INFO :tacho::recorder : dropping metrics
thread 'main' panicked at 'could not run proxies: Error { repr: Custom(Custom { kind: Other, error: SendError("...") }) }', /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/libcore/result.rs:868

klingerf avatar Apr 12 '17 22:04 klingerf