Skip to content

Conversation

@SolidWallOfCode
Copy link
Member

This is a major restructuring of the HostDB internals, which should (externally) be backwards compatible. The original goal of this work was to provide better control of sending requests to down upstreams. That turned out to require rewriting the internal data structures to support atomic operations on shared state (otherwise it is not possible to have fine grained control of requests to the same upstream). Additional work was done to be in compliance with the long term L7 Routing strategy as defined by the L7 Working group.

This has been tested in production but more should be done.

The documentation needs a lot of work.

Originally #7874 but was closed by a branch accident.

SolidWallOfCode and others added 6 commits July 8, 2022 12:41
The default duration of time_since_epoch() is
std::chrono::high_resolution_clock::duration, which will not generally
be seconds. hostDB.refcountcache->put expects the epoch count to be a
number of seconds. This explicitly casts to seconds so we get that
expected value.

This also makes some other std::chrono time updates.

Co-authored-by: bneradt <bneradt@yahooinc.com>
* Debug_bw updates. And clang-format fix.

* If HostDB returns only failed parents, try serving from cache.

Before this change, the parent cache logic would give up if it couldn't
resolve the origin name for a request. This will attempt to retrieve a
cached response if the resolution fails.
Copy link
Contributor

@bneradt bneradt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Yahoo is running with this internally, FWIW.

Copy link
Member

@rob05c rob05c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I don't see anything obviously concerning.

This is massive, I'm not sure it's possible for a human to really thoroughly review. But I don't think it can avoid being massive, and it needs done. And Yahoo running it in Prod adds considerable confidence.

@SolidWallOfCode SolidWallOfCode merged commit 156528d into apache:master Jul 13, 2022
fatih-acar added a commit to fatih-acar/trafficserver that referenced this pull request Aug 24, 2022
HostDB restructure introduced a regression where DNS resolution for
parent proxies would be skipped and the origin's address would be used
instead.

Fixes: apache#8953

Signed-off-by: Fatih Acar <facar@scaleway.com>
fatih-acar added a commit to fatih-acar/trafficserver that referenced this pull request Aug 24, 2022
HostDB restructure introduced a regression where DNS resolution for
parent proxies would be skipped and the origin's address would be used
instead.

Fixes: apache#8953

Signed-off-by: Fatih Acar <facar@scaleway.com>
@bneradt bneradt modified the milestones: 10-Dev, 10.0.0 Aug 24, 2022
@bneradt
Copy link
Contributor

bneradt commented Aug 24, 2022

Changing the milestone to 10.0.0 from 10-Dev since this went into master.

randall pushed a commit that referenced this pull request Sep 23, 2022
HostDB restructure introduced a regression where DNS resolution for
parent proxies would be skipped and the origin's address would be used
instead.

Fixes: #8953

Signed-off-by: Fatih Acar <facar@scaleway.com>
Co-authored-by: Fatih Acar <facar@scaleway.com>
@maskit maskit mentioned this pull request Aug 15, 2024
91 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants