Serving FLV files using varnish vs nginx?

2009-09-22 Thread Ryan Chan
Hello,

Anyone got experience in using varnish serving FLV file? How does it
compare with nginx?

Or it is recommended to using varnish for video streaming?



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


Re: Theoretical connections/second limit using Varnish

2009-05-03 Thread Per Andreas Buer
- Nick Loman n...@loman.net wrote:

 Precisely, we only have perhaps 50 PHP children serving requests, so
 if these are kept open to serve idle keep-alive connections, that
 severely limits the numbers of dynamic page requests we can serve.

It sound like you and Michael need a limit on the number of connections for 
each backend and queuing of requests. I don't think this is possible with 
Varnish at the moment - but it sounds like a valid feature requests.

-- 
Per Andreas Buer / Business Area Manager
Mobile +47 958 39 117 / Phone: +47 21 54 41 21 

Redpill Linpro Group - Changing the Game
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Theoretical connections/second limit using Varnish

2009-04-30 Thread Nick Loman
Michael S. Fischer wrote:

 I've done that for a specific reason relating to backend PHP processes.
 
 I don't dispute your reasoning; my employer does this as well.  
 KeepAlive with Apache/PHP can be a recipe for resource starvation on 
 your origin servers.

Hi Michael,

Precisely, we only have perhaps 50 PHP children serving requests, so if 
these are kept open to serve idle keep-alive connections, that severely 
limits the numbers of dynamic page requests we can serve.

 I typically have thousands of connections in TIME_WAIT mode as a 
 result, which is expected, but I wonder what the solution could be if 
 I ever hit more connections than local ports available.
 
 I think SO_REUSEADDR is the answer - I'm somewhat surprised that Varnish 
 doesn't set it by default for the backend connections.

I've had a browse through the Varnish 2.0.4 source now and have 
convinced myself that SO_REUSEADDR isn't set. Can you think of any 
specific gotchas I might encounter if I added setsockopt() before the 
connect() when getting a backend connection?

Cheers,

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


Theoretical connections/second limit using Varnish

2009-04-29 Thread Nick Loman
Hi there,

Has anyone come to a satisfactory solution to the issue of running out 
of local port numbers when Varnish makes a connection to the backend server?

Under Linux, my understanding is the number of available port numbers 
can be increased to a maximum of 64511 by setting 
/proc/sys/net/ipv4/ip_local_port_range to 1024 - 65535.

Assuming sockets are left in TIME_WAIT for 60 seconds that would limit 
the number of backend connections Varnish can make to 64511/minute or 
1075/second.

It seems to be acceptable to reduce TIME_WAIT to perhaps 30 seconds, 
doubling that to 2150/second.

A solution often proposed is to use time wait recycling, or tw_reuse, 
but my understanding is that under Linux these settings are global and 
therefore can break NAT for user connections (all connections are 
conntracked and DNATted on our setup).

2150 requests/second is not an impossible number to achieve, especially 
with backend KeepAlive off.

Has Varnish got a solution to this problem which does not involve 
time-wait recycling? One thing I've thought of is perhaps SO_REUSEADDR 
is used or could be used when Varnish makes connections to the backend?

Regards,

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


Re: Theoretical connections/second limit using Varnish

2009-04-29 Thread Nick Loman
Michael S. Fischer wrote:
 On Apr 29, 2009, at 9:22 AM, Poul-Henning Kamp wrote:
 
 In message 49f87de4.3040...@loman.net, Nick Loman writes:

 Has Varnish got a solution to this problem which does not involve
 time-wait recycling? One thing I've thought of is perhaps SO_REUSEADDR
 is used or could be used when Varnish makes connections to the backend?

 Varnish tries as hard as reasonable to reuse backend connections,
 so you should be able to get multiple requests per backend connection.

 If this is not the case for you, you should find out why backend 
 connections
 are not reused.

Hi Poul-Henning, Michael,

I've configured Apache with KeepAlive off, so I expect the TCP 
connection to be closed after each request and Varnish won't be able to 
use it.

I've done that for a specific reason relating to backend PHP processes.

Is that what you mean?

I typically have thousands of connections in TIME_WAIT mode as a result, 
which is expected, but I wonder what the solution could be if I ever hit 
more connections than local ports available.

If I turned Keep Alive on with Apache, could Varnish multiplex different 
  requests from different TCP sockets to the same backend connection?

 The OP said he turned backend Keep-Alive off.  That's his problem.

Right, exactly, but I want it this way assuming that leaving it on means 
that each user connection translates to one backend connection to Apache 
- not desirable - but perhaps this is not how Varnish operates?

Cheers,

Nick.


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


Re: Theoretical connections/second limit using Varnish

2009-04-29 Thread Michael S. Fischer
On Apr 29, 2009, at 9:30 AM, Nick Loman wrote:

 Michael S. Fischer wrote:
 On Apr 29, 2009, at 9:22 AM, Poul-Henning Kamp wrote:
 In message 49f87de4.3040...@loman.net, Nick Loman writes:

 Has Varnish got a solution to this problem which does not involve
 time-wait recycling? One thing I've thought of is perhaps  
 SO_REUSEADDR
 is used or could be used when Varnish makes connections to the  
 backend?

 Varnish tries as hard as reasonable to reuse backend connections,
 so you should be able to get multiple requests per backend  
 connection.

 If this is not the case for you, you should find out why backend  
 connections
 are not reused.

 Hi Poul-Henning, Michael,

 I've configured Apache with KeepAlive off, so I expect the TCP  
 connection to be closed after each request and Varnish won't be able  
 to use it.

 I've done that for a specific reason relating to backend PHP  
 processes.

I don't dispute your reasoning; my employer does this as well.   
KeepAlive with Apache/PHP can be a recipe for resource starvation on  
your origin servers.

 I typically have thousands of connections in TIME_WAIT mode as a  
 result, which is expected, but I wonder what the solution could be  
 if I ever hit more connections than local ports available.

I think SO_REUSEADDR is the answer - I'm somewhat surprised that  
Varnish doesn't set it by default for the backend connections.

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


Re: Using varnish

2008-03-03 Thread Fredrik Nygren
I'm a member of the development team at Gota Media which runs four  
swedish newspapers (Barometern.se, BLT.se, BT.se and SMP.se). Right  
now we are evaluating Varnish and it looks good. I also know that  
SvD.se runs Varnish.

Regards
Fredrik Nygren
Gota Media


On 13 feb 2008, at 17.36, Anders Vännman wrote:

Hi,

We are in the process of evaluating Varnish as an alternative for Squid
for our sites. We have got an internal varnish up and running and it  
seems
just great. Of course I have many questions, is there anyone on a  
swedish
newspaper using varnish?

// Anders Vännman


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

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


Re: Using varnish

2008-03-03 Thread Fredrik Nygren
I'm a member of the development team at Gota Media which runs four  
swedish newspapers (Barometern.se, BLT.se, BT.se and SMP.se). Right  
now we are evaluating Varnish and it looks good.

Regards
Fredrik Nygren
Gota Media

On 13 feb 2008, at 18.58, Erik Torlen wrote:

Do you just want to know a swedish newspaper that's using varnish?

If so, Aftonbladet and SvD is both using varnish.

/ Erik

Anders Vännman skrev:
 Hi,

 We are in the process of evaluating Varnish as an alternative for  
 Squid
 for our sites. We have got an internal varnish up and running and it  
 seems
 just great. Of course I have many questions, is there anyone on a  
 swedish
 newspaper using varnish?

 // Anders Vännman


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



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

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


Using varnish

2008-02-13 Thread Anders Vännman
Hi,

We are in the process of evaluating Varnish as an alternative for Squid
for our sites. We have got an internal varnish up and running and it seems
just great. Of course I have many questions, is there anyone on a swedish
newspaper using varnish?

// Anders Vännman


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


Re: Using varnish

2008-02-13 Thread Fredrik Nygren
I'm a member of the development team at Gota Media which runs four  
swedish newspapers (Barometern.se, BLT.se, BT.se and SMP.se). Right  
now we are evaluating Varnish and it looks good.

Let's keep in touch!

Regards
Fredrik Nygren
Gota Media

On 13 feb 2008, at 18.58, Erik Torlen wrote:

Do you just want to know a swedish newspaper that's using varnish?

If so, Aftonbladet and SvD is both using varnish.

/ Erik

Anders Vännman skrev:
 Hi,

 We are in the process of evaluating Varnish as an alternative for  
 Squid
 for our sites. We have got an internal varnish up and running and it  
 seems
 just great. Of course I have many questions, is there anyone on a  
 swedish
 newspaper using varnish?

 // Anders Vännman


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



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


Hälsar
/Fredrik

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