Re: Virtualhost issue

2009-11-03 Thread andan andan
2009/11/3 Vladimir Dyachenko :
> Folks,
>
> I have changed the configuration to the following (mostly based on
> mediawiki). Any idea why it does not restart? Sill empty logs.
>
> [r...@net2 ~]# varnishd -V
> varnishd (varnish-2.0.4)
> Copyright (c) 2006-2009 Linpro AS / Verdens Gang AS
>
> [r...@net2 ~]# cat /etc/varnish/default.vcl
>
> # set default backend if no server cluster specified
> backend default {
> .host = "www.google.ru";
> .port = "80";
> }

www.google.ru resolves to multiple IPs. You are trying to use varnish
with a strange behaviour :)

To see errors, in your init script change:

daemon ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} > /dev/null 2>&1

by:

daemon ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} > /whereveryouwant 2>&1

Or simply remove  > /dev/null 2>&1 to see errors on console.

Kind Regards.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Virtualhost issue

2009-11-02 Thread andan andan
2009/11/2 Vladimir Dyachenko :
> Folks,
>
> I am discovering Varnish which looks like a gift from Gods, or from
> Poul-Henning.
>
> We have one case where clients gets big DDoS and we distibute HTTP servers
> between various ISP. I have set it up alright for one host, but now I need
> to do virtualhost as we have various sites.
>
> Upon restart varnish does not start (no error and nothing in logs).
> Wondering what obvious I did wrong.
>
> Here is my configuration:
>
> /// start
>
> # This is a basic vcl.conf file for varnish.
>
> backend default {
>     set backend.host = "localhost";
>     set backend.port = "80";
> }

You are using an old syntax, backend syntax has changed.

backend default {
   .host = "localhost";
   .port  = "80";
}

man 7 vcl (you should revise all the configuration).

BTW: Probably your init scripts are sending errors to /dev/null

Hope this helps.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: varnish redundancy

2009-09-03 Thread andan andan
2009/9/3 Rob Ayres :
> Hi,
>
> We are using varnish on a single server with four backend servers. This is
> working very well (thanks to the varnish developers!) but we wish to add
> some redundancy to the system. The obvious way is just to add another
> varnish running on another server in a different datacentre. The downside to
> this is that keeping two caches populated will increase the load on the
> backend servers.
>
> We do have the facility to use "backup chaining" which would allow us to use
> varnish_1 and then if that goes down we would automatically failover to
> varnish_2 but this would have an empty cache so a sudden and huge load would
> hit the backend servers.
>
> Does anyone have any experience or tips on using varnish in this way?
>
Hi.

We have two varnish load balanced with LVS (active-active).

The difference between to use 1 or 2 varnish (for the backends load)
is practically zero, because the hit rate
is 90%.

Hope this helps.
BR.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


ESI and clients HTTP/1.0

2008-10-03 Thread andan andan
Hi all.

Is there any manner to avoid Transfer-Encoding: chunked in responses
of ESI pages to HTTP/1.0 clients.

According to RFC:

14.41 Transfer-Encoding
...
   Many older HTTP/1.0 applications do not understand the Transfer-
   Encoding header.

We have several issues with Squid2.5.x proxys (not newer versions).
Unfortunately, this branch is still very commonly in productions
environments.

Thank you.
BR.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Issue related to ticket 278

2008-08-07 Thread andan andan
Sorrry, I forgot give data:

Varnish trunk rev 2980
RHEL 5.2 x86_64

Thanks.

2008/8/7 andan andan <[EMAIL PROTECTED]>:
> Hi.
>
> We are experimenting exactly the same issue related to ticket 278.
>
> In the case that the URL is involved with the problem, the failed URL
> is /blogs_opinion/
>
> We have two Varnish, and both presents the problem, when we restart
> them, varnish servers back to normal.
>
> Thanks in advance.
> Best Regards.
>
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Issue related to ticket 278

2008-08-07 Thread andan andan
Hi.

We are experimenting exactly the same issue related to ticket 278.

In the case that the URL is involved with the problem, the failed URL
is /blogs_opinion/

We have two Varnish, and both presents the problem, when we restart
them, varnish servers back to normal.

Thanks in advance.
Best Regards.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


503 status code

2008-07-23 Thread andan andan
Hi all.

We have Varnish trunk rev2980 running in production.

All works fine except some errors logged by varnishncsa with the 503
status code. All these errors are associated to pass rules.

We have tried to increase .connectimeout without sucess.

Apparently, the backend (a load balancer in front of several
webservers), works fine, testing it, with stress tools, curl and
others.

Any ideas ?

Thank You very much.
Best regards.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Meaning of obj.prefetch

2008-07-14 Thread andan andan
Hi.

The obj.prefecth variable, What is it supposed to do?

The default VCL set this variable to -30s, and varnishlog shows (30
seconds before that object expires):

0 ExpPick  - 964711497 prefetch
0 VCL_call - prefetch
0 VCL_return   - fetch
0 Debug- "Attempt Prefetch 964711497"

Can someone please, explain what does it mean.

Thanks in advance.
BR.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish trunk rev 2780 refuses to start

2008-06-24 Thread andan andan
2008/6/24 Poul-Henning Kamp <[EMAIL PROTECTED]>:
> In message <[EMAIL PROTECTED]>, "anda
> n andan" writes:
>
>
> Can you try #2786 pleae, I think I have fixed it now.

Working again !

Thank you very much.
BR.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Varnish trunk rev 2780 refuses to start

2008-06-24 Thread andan andan
Hi all.

We have upgraded to the latest trunk version (2780), but Varnish
refuses to start property, the syslog says:

Jun 24 07:09:06 vvarnish varnishd[2280]: child (2281) Started
Jun 24 07:09:06 vvarnish varnishd[2280]: Pushing vcls failed: CLI
communication error
Jun 24 07:09:06 vvarnish varnishd[2280]: Child (2281) said Closed fds:
3 4 5 6 10 11 13 14
Jun 24 07:09:06 vvarnish varnishd[2280]: Child (2281) said Child starts
Jun 24 07:09:06 vvarnish varnishd[2280]: Child (2281) said managed to
mmap 0 bytes of 734003200

Our configuration is:

DAEMON_OPTS="-a :80 \
 -T 127.0.0.1:6082 \
 -f /etc/varnish/conf.vcl \
 -u varnish -g varnish \
 -s file,/var/lib/varnish/varnish_storage.bin,700MB \
 -t 240 \
 -p thread_pools=1 \
 -p thread_pool_max=5000"

CentOS 5.1, rpm built from trunk, revision 2780.

Previously, we were using revision 2735, this works fine.

Thanks.
BR.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


CLI sessions and syslog

2008-06-19 Thread andan andan
Hello.

It is possible to disable sysloging for the CLI sessions, or at least,
change the priority or facility. ?

We are using Varnish (trunk) with LVS,  pinging varnish to test if the
instance is alive, logging these sessions every 5 seconds is very
annoying.

Thanks in advance.
BR.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Pass and pipe in trunk version

2008-05-26 Thread andan andan
Hi.

According to: 
http://varnish.projects.linpro.no/wiki/FAQ#ShouldIusepipeorpassinmyVCLcode

pipe must be used to handle POST requests, but according to:

http://varnish.projects.linpro.no/wiki/VCLExampleDefault

POST requests are handled with pass.

if (req.request != "GET" && req.request != "HEAD") {
/* We only deal with GET and HEAD by default */
pass;
}


What document is wrong ?

Thanks in advance.
Best regards.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Fetch called after pass

2008-05-22 Thread andan andan
Hi all.

Whats happened with the possible bug related in
http://projects.linpro.no/pipermail/varnish-misc/2007-July/000626.html:

In our tests (varnish trunk rev 2635), vcl_fetch is still inserting
the request  in cache even though it got a "pass" in vcl_recv.

Varnishlog attached.

Thanks.
Best regards.
   13 SessionOpen  c 10.211.13.105 52137
   13 ReqStart c 10.211.13.105 52137 1730642771
   13 RxRequestc GET
   13 RxURLc /img/logo20m.gif
   13 RxProtocol   c HTTP/1.1
   13 RxHeader c User-Agent: curl/7.18.1 (i486-pc-linux-gnu) libcurl/7.18.1 
OpenSSL/0.9.8g zlib/1.2.3.3 c-ares/1.5.1 libidn/1.8 libssh2/0.18
   13 RxHeader c Host: guardiasweb2
   13 RxHeader c Accept: */*
   13 VCL_call c recv
   13 VCL_return   c pass
   13 VCL_call c pass
   13 VCL_return   c pass
   14 BackendClose - default
   14 BackendOpen  b default 10.211.14.155 55765 10.211.14.139 80
   14 TxRequestb GET
   14 TxURLb /img/logo20m.gif
   14 TxProtocol   b HTTP/1.1
   14 TxHeader b User-Agent: curl/7.18.1 (i486-pc-linux-gnu) libcurl/7.18.1 
OpenSSL/0.9.8g zlib/1.2.3.3 c-ares/1.5.1 libidn/1.8 libssh2/0.18
   14 TxHeader b Host: guardiasweb
   14 TxHeader b Accept: */*
   14 TxHeader b X-Varnish: 1730642771
   14 TxHeader b X-Forwarded-for: 10.211.13.105
   14 RxProtocol   b HTTP/1.1
   14 RxStatus b 200
   14 RxResponse   b OK
   14 RxHeader b Date: Thu, 22 May 2008 09:17:40 GMT
   14 RxHeader b Server: Apache
   14 RxHeader b Last-Modified: Wed, 08 Nov 2006 08:58:07 GMT
   14 RxHeader b ETag: "891195-e81-847805c0"
   14 RxHeader b Accept-Ranges: bytes
   14 RxHeader b Content-Length: 3713
   14 RxHeader b Content-Type: image/gif
   13 ObjProtocol  c HTTP/1.1
   13 ObjStatusc 200
   13 ObjResponse  c OK
   13 ObjHeaderc Date: Thu, 22 May 2008 09:17:40 GMT
   13 ObjHeaderc Server: Apache
   13 ObjHeaderc Last-Modified: Wed, 08 Nov 2006 08:58:07 GMT
   13 ObjHeaderc ETag: "891195-e81-847805c0"
   13 ObjHeaderc Content-Type: image/gif
   14 BackendReuse b default
   13 TTL  c 1730642771 RFC 240 1211451069 1211447860 0 0 0
   13 VCL_call c fetch
   13 VCL_return   c insert
   13 Length   c 3713
   13 VCL_call c deliver
   13 VCL_return   c deliver
   13 TxProtocol   c HTTP/1.1
   13 TxStatus c 200
   13 TxResponse   c OK
   13 TxHeader c Server: Apache
   13 TxHeader c Last-Modified: Wed, 08 Nov 2006 08:58:07 GMT
   13 TxHeader c ETag: "891195-e81-847805c0"
   13 TxHeader c Content-Type: image/gif
   13 TxHeader c Content-Length: 3713
   13 TxHeader c Date: Thu, 22 May 2008 10:11:09 GMT
   13 TxHeader c X-Varnish: 1730642771
   13 TxHeader c Age: 0
   13 TxHeader c Via: 1.1 varnish
   13 TxHeader c Connection: keep-alive
   13 ReqEnd   c 1730642771 1211451069.518307924 1211451069.536924124 
0.000278711 0.018503428 0.000112772
0 StatAddr - 10.211.13.105 0 867 1549 1549 0 0 1549 413417 5744011
   13 SessionClose c no request
   13 StatSess c 10.211.13.105 52137 0 1 1 0 0 1 267 3713
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


PURGE http method and compression.

2008-04-28 Thread andan andan
Hi all.

According to: http://varnish.projects.linpro.no/wiki/FAQ/Compression,
for two requests with different "Accept-encoding", the cache stores
two objets.

But, to purge an URL, how affect this ? we must send two PURGE
requests with the two "Accept-encoding" ?

Thanks in advance.
Best regards.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Security doubt about Varnish and firewall.

2008-04-22 Thread andan andan
Hi all.

We are testing Varnish in order to deploy it into a production enviroment.

We have a security doubt: Should we install Varnish inside or outside
firewall?

For better performance, we consider that the best choice is outside, but for
obvious security reasons, the better is putting it into a DMZ.

Any suggestions? Somebody has Varnish outside the firewall?

Thanks in advance. Best regards.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Return 304 status code

2008-01-18 Thread andan andan
Hi.

How can I configure Varnish to return 304 status code to the client when the
object was not changed in base of cache headers like if-modified-since (or
others). We want to avoid to send the object if the client has an updated
version.

Thanks in advance.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc