Re: Different host headers - same cache?

2016-10-24 Thread Frederik Ramm
Guillaume, On 10/24/16 11:32, Guillaume Quintard wrote: > Why isn't unsetting the host header (to let varnish use .host_header) > acceptable? Oh that's perfectly acceptable, I just didn't know it did that! Because the Host header that came from the frontend always trumped .host_header, I didn't

Re: Different host headers - same cache?

2016-10-24 Thread Guillaume Quintard
Why isn't unsetting the host header (to let varnish use .host_header) acceptable? I wouldn't worry about the performance impact of strstr, but if you really don't like it, you can do this: if ("somebackend" == bereq.backend + "") to force the type conversion. If you feel really nostalgic,

Re: Different host headers - same cache?

2016-10-19 Thread Andrei
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 wrote: > Hi, > > On

Re: Different host headers - same cache?

2016-10-17 Thread Frederik Ramm
Hi, 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

Re: Different host headers - same cache?

2016-10-16 Thread Frederik Ramm
Thomas, thank you, that gets me a bit further. I have one more question though: On 10/16/2016 12:55 AM, Thomas Lecomte wrote: > You will need to rewrite bereq.http.host in the vcl_backend_fetch > routine depending on the backend to which you are sending the request. So which backend the

Re: Different host headers - same cache?

2016-10-16 Thread Guillaume Quintard
On Oct 16, 2016 01:15, "Thomas Lecomte" wrote: > > Hello, > > On Sat, Oct 15, 2016 at 11:03 AM, Frederik Ramm wrote: > > Question 1: > > You will need to rewrite bereq.http.host in the vcl_backend_fetch > routine depending on the backend to

Re: Different host headers - same cache?

2016-10-15 Thread Thomas Lecomte
Hello, On Sat, Oct 15, 2016 at 11:03 AM, Frederik Ramm wrote: > Question 1: You will need to rewrite bereq.http.host in the vcl_backend_fetch routine depending on the backend to which you are sending the request. > Question 2: The hash used to identify an unique object is