Mailing List Archive

Varnishtest client user agents
Greetings,

When I write test cases involving multiple requests that don't need to
come from the same client session I try to make one client per
request. When a client reports something wrong, it's usual very
convenient because I don't have to track down too many events.

When I need to jump from a client error to Varnish logs, I find it
increasingly frustrating to actually need to retrace events in the
absence of an X-Varnish header.

Would it be OK to have `client cNAME` send a `User-Agent: vtest
(cNAME)` or similar to reduce some of it?

This should be for the most part transparent, except for test cases
doing request accounting or other header shenanigans (HPACK maybe?)
that should be trivial to adjust.

Thanks,
Dridi
_______________________________________________
varnish-dev mailing list
varnish-dev@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
Re: Varnishtest client user agents [ In reply to ]
--------
Dridi Boukelmoune writes:

> Would it be OK to have `client cNAME` send a `User-Agent: vtest
> (cNAME)` or similar to reduce some of it?

I generally just use /c1 /c2 etc in the URL ?


--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-dev mailing list
varnish-dev@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
Re: Varnishtest client user agents [ In reply to ]
On Wed, Jul 12, 2023 at 5:21?AM Poul-Henning Kamp <phk@phk.freebsd.dk> wrote:
>
> --------
> Dridi Boukelmoune writes:
>
> > Would it be OK to have `client cNAME` send a `User-Agent: vtest
> > (cNAME)` or similar to reduce some of it?
>
> I generally just use /c1 /c2 etc in the URL ?

That's part of the frustration, whenever I'm troubleshooting a test
case I have to jump through more hoops to get something useful. What I
would like is something out of the box, such as clients advertising
themselves in a User-Agent header.

I would have considered `Server: vtest (sNAME)` if it weren't for the
Via headers added by Varnish already. In that regard I no longer need
an indirection to find out where the bereq went to when multiple
servers are involved.

Dridi
_______________________________________________
varnish-dev mailing list
varnish-dev@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
Re: Varnishtest client user agents [ In reply to ]
--------
Dridi Boukelmoune writes:
> On Wed, Jul 12, 2023 at 5:21=E2=80=AFAM Poul-Henning Kamp <phk@phk.freebsd.=
> dk> wrote:
> >
> > --------
> > Dridi Boukelmoune writes:
> >
> > > Would it be OK to have `client cNAME` send a `User-Agent: vtest
> > > (cNAME)` or similar to reduce some of it?
> >
> > I generally just use /c1 /c2 etc in the URL ?
>
> That's part of the frustration, whenever I'm troubleshooting a test
> case I have to jump through more hoops to get something useful. What I
> would like is something out of the box, such as clients advertising
> themselves in a User-Agent header.

I would prefer you do not overload any Well Known Headers.

X-VTC: c1

maybe ?

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-dev mailing list
varnish-dev@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
Re: Varnishtest client user agents [ In reply to ]
On Wed, Jul 12, 2023 at 6:59?AM Poul-Henning Kamp <phk@phk.freebsd.dk> wrote:
>
> --------
> Dridi Boukelmoune writes:
> > On Wed, Jul 12, 2023 at 5:21=E2=80=AFAM Poul-Henning Kamp <phk@phk.freebsd.=
> > dk> wrote:
> > >
> > > --------
> > > Dridi Boukelmoune writes:
> > >
> > > > Would it be OK to have `client cNAME` send a `User-Agent: vtest
> > > > (cNAME)` or similar to reduce some of it?
> > >
> > > I generally just use /c1 /c2 etc in the URL ?
> >
> > That's part of the frustration, whenever I'm troubleshooting a test
> > case I have to jump through more hoops to get something useful. What I
> > would like is something out of the box, such as clients advertising
> > themselves in a User-Agent header.
>
> I would prefer you do not overload any Well Known Headers.
>
> X-VTC: c1
>
> maybe ?

In the spirit of rfc6648 i would rather use a "VTC-" prefix, so
something more like

VTC-Client: c1

But also, since a VTC client mocks a user agent, I would rather use
the standard header for this. We can also add a -noua option similar
to -nolen, -nohost and -nodate and imply -noua when an explicit `-hdr
"User-Agent: other"` is present.

Dridi
_______________________________________________
varnish-dev mailing list
varnish-dev@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
Re: Varnishtest client user agents [ In reply to ]
--------
Dridi Boukelmoune writes:

> > I would prefer you do not overload any Well Known Headers.
> >
> > X-VTC: c1
> >
> > maybe ?
>
> In the spirit of rfc6648 i would rather use a "VTC-" prefix, so
> something more like
>
> VTC-Client: c1
>
> But also, since a VTC client mocks a user agent, I would rather use
> the standard header for this. We can also add a -noua option similar
> to -nolen, -nohost and -nodate and imply -noua when an explicit `-hdr
> "User-Agent: other"` is present.

So what about the servers ?

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-dev mailing list
varnish-dev@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
Re: Varnishtest client user agents [ In reply to ]
On Wed, Jul 12, 2023 at 7:18?AM Poul-Henning Kamp <phk@phk.freebsd.dk> wrote:
>
> --------
> Dridi Boukelmoune writes:
>
> > > I would prefer you do not overload any Well Known Headers.
> > >
> > > X-VTC: c1
> > >
> > > maybe ?
> >
> > In the spirit of rfc6648 i would rather use a "VTC-" prefix, so
> > something more like
> >
> > VTC-Client: c1
> >
> > But also, since a VTC client mocks a user agent, I would rather use
> > the standard header for this. We can also add a -noua option similar
> > to -nolen, -nohost and -nodate and imply -noua when an explicit `-hdr
> > "User-Agent: other"` is present.
>
> So what about the servers ?

I would be on board with the user agent counterpart:

User-Agent: vtest (c1)
vs
Server: vtest (s1)

I suppose this would be even more useful for the `s0 -dispatch` case,
where the Via header generated by varnishd would not carry this
nuance.

Dridi
_______________________________________________
varnish-dev mailing list
varnish-dev@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev