linkerd-tcp
linkerd-tcp copied to clipboard
Adds failfast mode for unroutable requests.
- 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.
Should I take this opportunity to bump linkerd-tcp to 0.0.3?
@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.
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