Skip to content

delay DNS for origin server until it is required - #1756

Merged
vmamidi merged 1 commit into
apache:masterfrom
vmamidi:delay_dns
May 7, 2017
Merged

delay DNS for origin server until it is required#1756
vmamidi merged 1 commit into
apache:masterfrom
vmamidi:delay_dns

Conversation

@vmamidi

@vmamidi vmamidi commented May 3, 2017

Copy link
Copy Markdown
Contributor

There is no need to perform DNS for origin server under some scenarios. For example, request matches a parent and the parent handles the request or all the parents that matched the request died and the parent configuration does not allow to talk to origin server directly.

@vmamidi vmamidi added the HTTP label May 3, 2017
@vmamidi vmamidi added this to the 8.0.0 milestone May 3, 2017
@vmamidi vmamidi self-assigned this May 3, 2017
@vmamidi
vmamidi requested review from jrushford and zwoop May 3, 2017 19:28
@atsci

atsci commented May 3, 2017

Copy link
Copy Markdown

@atsci

atsci commented May 3, 2017

Copy link
Copy Markdown

RAT check successful! https://ci.trafficserver.apache.org/job/RAT-github/364/

@atsci

atsci commented May 3, 2017

Copy link
Copy Markdown

FreeBSD11 build successful! https://ci.trafficserver.apache.org/job/freebsd-github/2047/

@atsci

atsci commented May 3, 2017

Copy link
Copy Markdown

Intel CC build successful! https://ci.trafficserver.apache.org/job/icc-github/478/

@atsci

atsci commented May 3, 2017

Copy link
Copy Markdown

Linux build successful! https://ci.trafficserver.apache.org/job/linux-github/1940/

@atsci

atsci commented May 3, 2017

Copy link
Copy Markdown

@atsci

atsci commented May 3, 2017

Copy link
Copy Markdown

clang-analyzer build successful! https://ci.trafficserver.apache.org/job/clang-analyzer-github/611/

@vmamidi vmamidi added the WIP label May 3, 2017
Comment thread proxy/http/HttpTransact.cc Outdated
s->current.attempts = 0;
// Do DNS as we are now going to Origin Server
TRANSACT_RETURN(SM_ACTION_DNS_LOOKUP, OSDNSLookup);
/*s->current.attempts = 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If this is dead code, either #ifdef it, or just remove it. These comments makes it difficult to see the intent here :).

@jrushford jrushford May 4, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yeah, i think that should be removed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it should be removed

Comment thread proxy/http/HttpTransact.cc Outdated
build_request(s, &s->hdr_info.client_request, &s->hdr_info.server_request, s->current.server->http_version);

s->next_action = how_to_open_connection(s);
// TODO doesn't make sense to set this here, find the right place

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this so? If so, where do we put it? If we're keeping it here, then the comment probably should go ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The comment should go away. I forgot to remove the comment i added.

@jrushford

Copy link
Copy Markdown
Contributor

I don't see anything wrong with this after making the requested changes from @zwoop

@zwoop

zwoop commented May 5, 2017

Copy link
Copy Markdown
Contributor

We've been running this in prod for ~24h, and pretty decent results (and no issues as far as we can tell). Attaching a graph showing the different with and without this patch.

@zwoop

zwoop commented May 5, 2017

Copy link
Copy Markdown
Contributor

dns reduction

@zwoop zwoop removed the WIP label May 5, 2017
@zwoop zwoop modified the milestones: 8.0.0, 7.1.0 May 5, 2017
@zwoop

zwoop commented May 5, 2017

Copy link
Copy Markdown
Contributor

Marking this for 7.1.0 as well, once merged, I will cherry-pick.

@vmamidi

vmamidi commented May 5, 2017

Copy link
Copy Markdown
Contributor Author

incorporated the review comments.

@atsci

atsci commented May 5, 2017

Copy link
Copy Markdown

@atsci

atsci commented May 5, 2017

Copy link
Copy Markdown

RAT check successful! https://ci.trafficserver.apache.org/job/RAT-github/383/

@atsci

atsci commented May 5, 2017

Copy link
Copy Markdown

@atsci

atsci commented May 5, 2017

Copy link
Copy Markdown

FreeBSD11 build successful! https://ci.trafficserver.apache.org/job/freebsd-github/2066/

@atsci

atsci commented May 5, 2017

Copy link
Copy Markdown

Intel CC build successful! https://ci.trafficserver.apache.org/job/icc-github/496/

@atsci

atsci commented May 5, 2017

Copy link
Copy Markdown

Linux build successful! https://ci.trafficserver.apache.org/job/linux-github/1959/

@vmamidi

vmamidi commented May 5, 2017

Copy link
Copy Markdown
Contributor Author

zwoop let me know if the changes are okay, i will merge

@atsci

atsci commented May 5, 2017

Copy link
Copy Markdown

clang-analyzer build successful! https://ci.trafficserver.apache.org/job/clang-analyzer-github/629/

@zwoop zwoop left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants