Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

varnishd: add backend age & reuses to Open & Close #4007

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asadsa92
Copy link
Contributor

This extra information comes handy when trubleshooting idle timeout from the backend.

This extra information comes handy when trubleshooting idle timeout from the
backend.

Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com>
Comment on lines -125 to +134
"\t%d %s %s [ %s ]\n"
"\t| | | |\n"
"\t| | | +- Optional reason\n"
"\t| | +------ \"close\" or \"recycle\"\n"
"\t| +--------- Backend display name\n"
"\t+------------ Connection file descriptor\n"
"\t%d %s %s %.6f %ld [ %s ]\n"
"\t| | | | | |\n"
"\t| | | | | +- Optional reason\n"
"\t| | | | +------- Backend reuses\n"
"\t| | | +------------ Backend age in seconds\n"
"\t| | +--------------- \"close\" or \"recycle\"\n"
"\t| +------------------ Backend display name\n"
"\t+--------------------- Connection file descriptor\n"
Copy link
Member

Choose a reason for hiding this comment

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

This is a breaking change, and since we are adding the same fields to two tags, maybe we should limit this to BackendOpen? We can deduce the values for BackendClose anyway based on whether we created a brand new connection or reused one from the pool.

Comment on lines +110 to +120
"\t%d %s %s %s %s %s %s %.6f %ld\n"
"\t| | | | | | | | |\n"
"\t| | | | | | | | +- Backend reuses\n"
"\t| | | | | | | +------ Backend age in seconds\n"
"\t| | | | | | +--------- \"connect\" or \"reuse\"\n"
"\t| | | | | +------------ Local port\n"
"\t| | | | +--------------- Local address\n"
"\t| | | +------------------ Remote port\n"
"\t| | +--------------------- Remote address\n"
"\t| +------------------------ Backend display name\n"
"\t+--------------------------- Connection file descriptor\n"
Copy link
Member

Choose a reason for hiding this comment

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

I think I would rather refer to Connection uses and Connection age (everything is in seconds since 4.0 anyway).

Also, I would probably make these fields optional, they aren't really helpful in the "connect" case.

Comment on lines +133 to +138
vtim_real
PFD_Age(const struct pfd *p)
{
CHECK_OBJ_NOTNULL(p, PFD_MAGIC);
return (VTIM_real() - p->created);
}
Copy link
Member

Choose a reason for hiding this comment

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

We probably have a now at the call site we can pass here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants