A purpose-built proxy for the Linkerd service mesh. Written in Rust.
Go to file
Brian Smith f9cc52e1c0 Stop cloning & hashing HTTP requests & related types. (#1058)
During code review of another change I noticed that a lot of types seem
to derive `Hash` (and `Eq`, `PartialEq`) even though the types should
never (for performance reasons) be used as keys of a hash table, and
where it is kind of questionable what equality should mean for those
types. Then I noticed that similarly many types implement `Clone` even
though I expect we should never be cloning them, again because of our
performance goals.

Because these types derive these traits, then whenever we add a field
to them, that field also has to implement these traits. That means we
then have to expand the problem, deriving implementations of these
traits for types that don't otherwise want/need to implement these
traits. This makes review complicated, because, for example, we have
to decide whether something should be compared case-insensitively or
case-sensitively when really we don't want to compare those things at
all.

To prove that we can get by by doing less, to speed up code review
(particularly related to some stuff related to TLS), stop deriving
`Clone`, `Eq`, `PartialEq`, and `Hash` for these types.

I believe that, in particular, the change to key the Tap hash table
based on request ID, instead of the whole request, should speed up
the tap feature since we don't hash and/or compare every field,
recursively, of requests.

Later more such cleanup of this sort should be done.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-06-05 08:58:18 -10:00
.github Add a newline to dco.yml (#254) 2018-02-01 15:16:02 -08:00
proxy Stop cloning & hashing HTTP requests & related types. (#1058) 2018-06-05 08:58:18 -10:00
CONTRIBUTING.md Add contributing doc and DCO file (#88) 2017-12-22 14:54:27 -08:00
Cargo.lock proxy: Reload TLS config on changes (#1056) 2018-06-04 13:36:28 -07:00
Cargo.toml proxy: Upgrade Conduit to use the new version of Tokio (#944) 2018-05-17 16:38:15 -07:00
DCO Add contributing doc and DCO file (#88) 2017-12-22 14:54:27 -08:00
LICENSE Introducing Conduit, the ultralight service mesh 2017-12-05 00:24:55 +00:00