Different host headers - same cache?
lagged at gmail.com
Wed Oct 19 09:02:55 CEST 2016
Out of curiosity, how expensive is it to use std.strstr()? Would it even
have any sort of noticeable performance impact or just a slightly elevated
cpu time for somewhat elevated traffic (~25k req/s)?
On Mon, Oct 17, 2016 at 6:22 PM, Frederik Ramm <frederik at remote.org> wrote:
> On 10/16/2016 10:30 PM, Frederik Ramm wrote:
> > I should be able to do this:
> > if (bereq.backend == "somedirector")
> > vgc.c:2152:35: error: comparison with string literal results in
> > unspecified behavior [-Werror=address]
> Ok, I meanwhile found out two things:
> 1. bereq.backend will contain the actual backend selected by the
> director, not the director itself;
> 2. for some reason I cannot do a string equality check against
> bereq.backend like above, but I can do
> if (std.strstr(bereq.backend, "somebackend"))
> - which doesn't make me entirely happy since a strstr is certainly more
> expensive than a string equality check but at least that seems to work!
> Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the varnish-misc