varnish

Alternative Reverse Proxy Architecture Directions

Currently, I've got an expensive license for a reverse proxy server in an environment that is mostly Tomcat. I'm thinking of one or both of the following upgrades. Using Squid instead of the expensive licensed product. Using some Apache2 settings for caching. Right now, I'm vague on the details, but perhaps mod_proxy will work here? ...

Tux, Varnish or Squid?

Hi folks We need a web content accelerator for static images to sit in front of our Apache web front end servers Our previous hosting partner used Tux with great success and I like the fact it's part of Red Hat Linux which we're using, but its last update was in 2006 and there seems little chance of future development. Our ISP recommen...

What's a good caching reverse proxy which can serve stale content if the underlying application becomes unavailable?

I'm looking for a caching reverse proxy (something like squid or varnish) with good support for serving stale content in the event of failure - in other words, if the application I'm proxying goes away or starts serving internal server errors I'd like the cache to continue to serve the last good response saved from the back end. Essentia...

Ubuntu Startup Script for Varnish

I am wondering if anyone has a working startup script (/etc/init.d/varnish) for Varnishd that works on Ubuntu Hardy. It should set a pid file so it can be monitored. I have been looking all over Google but have yet to find something that works without hacking which I don't have time to do for a few days. ...

Drupal: Varnish and cookies

I'm using drupal with varnish, and I need to teach it about cookies. Anyone know where to start? Google does me no favors, thank you all in advance. http://drupal.org/node/700022 ...

Reverse Proxy dynamic webserver loading

Is there any way to dynamically load and unload webservers from a reverse proxy? For example let's say I have a cluster of 100 apache servers and I want to patch the servers. I would like the have a setup where I have a pool of updated servers and a pool of "being updated" servers. I would like the reverse proxy be aware of what is bei...

Using a second backend with Varnish 1.0.3-2 in case of 404 from first backend

Hi there, We used to have a caching proxy setup using a very early version of Varnish (0.5ish, I think) which used the 'restart' action to send requests to a second backend in the case of a 404 on the first. The new version of Varnish doesn't seem to support this - the 'restart' action no longer seems to be supported, and the 'req.rest...

unset in Varnish - syntax error

I'm trying to hide the "Server" header returned by Apache on every request, from Varnish. Using in sub vcl_fetch: unset obj.http.Server; on Varnish start I get: Expected action, 'if' or '}' (/etc/varnish/default.vcl Line 43 Pos 9) unset obj.http.Server; --------#####----------------- Any ideas? ...

Should I go with Varnish instead of nginx?

I really like nginx. But recently I've found that varnish gives you an opportunity to implement smart caching revers proxy layer(with URL purging). I have a cluster of mongrels which are pretty resource-intensive so if this caching layer can remove some load from mongrels this can be a great thing. I didn't find a way to implement the ...

Varnish waits for the complete page load before sending response to browser.

I've setup varnish to sit in front of a tomcat server. What I've noticed is that Varnish seems to wait for the complete page to load (all css, js, etc) before it sends any response to the browser. This causes a huge lag before the user sees anything. If I bypass Varnish and go directly to the site, it responds immediately. While the ...

Varnish and Google Analytics

Hi, I don't quite understand how Google Analytics cookies work with Varnish. Do pages that contain GA cookie not get cached? Do I need to remove the GA cooke in vcl_recv? If I do remove them, does that stop GA tracking visitors? ...

Configure multiple sites with Varnish

We have a server which needs to server multiple domains though varnish e.g. example1.com, example2.com and example3.com Our current .vcl file looks like this: sub vcl_recv { set req.http.Host = "example1.com"; lookup; } How do I set the correct req.http.Host for the correct incoming request? ...

Varnish + Rails causes invalid authenticity tokens in development

Here is my situation. I am testing out Varnish on my local box (I'm doing some stuff related to page caching that would be a big pain to push to staging every time). Everything works fine, except whenever I submit a form, I get an ActionController::InvalidAuthenticityToken exception. Varnish is running on localhost at port 6081, and Thi...

Can I reformat my URL parameters with Varnish

Hello, I have a relatively simple (I think) use-case but I can't find any examples where someone has done this. We are using Varnish as a cache and reverse proxy in front of two different applications and would like to make things a bit more unified across both as they both do similar things. I was hoping Varnish could help rewrite the U...

REST API caching, should I use a Reverse proxy or memcache(d)?

I have a REST API where I would like to cache the JSON response of the index (GET /foo) and the read actions (GET /foo/1) to significantly increase the performance. When there is a POST or a PUT on a resource the cache entries for the index and read results need to be expired, so no old content is served. Is this a scenario that's best ...

Varnish: cache only specific domain

Hello, I have been Googling aggressively, but without luck. I'm using Varnish with great results, but I would like to host multiple websites on a single server (Apache), without Varnish caching all of them. Can I specify what websites by URL to cache? Thanks ...

Using Varnish in a Symfony Application?

My goal is to use Varnish to cache my static assets with my Symfony 1.4 site (http://my.perqworks.com). I can write a VCL file that strips out cookies on all static files while leaving the user authentication cookie on the php file -- but the user authentication is failing. I cannot log into my application. I am looking for an answer t...

haproxy as frontend to varnish throwing lots of 50X errors with status cD

Hi, I've a setup with haproxy as frontend to two varnish servers (say srvA, srvB). srvA and srvB also have nginx running on 'em and varnish serves as frontend to these servers. Few days back we collected stats to find out how many requests being served by varnish cache (i.e. with two X-Varnish values) were getting timed out on haproxy. ...

Django Performance

I am using a django with apache mod_wsgi, my site has dynamic data on every page and all of the media (css, images, js) is stored on amazon S3 buckets liked via "http://bucket.domain.com/images/*.jpg" inside the markup . . . . my question is, can varnish still help me speed up my web server? I am trying to knock down all the stumbling b...

Run Wordpress in RAMDISK?

Is it viable to run Wordpress in a RAMDISK for performance reasons? ...