Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Misc

Wordpress+WP-E-COMMERCE+VARNISH

 

 

Varnish misc RSS feed   Index | Next | Previous | View Threaded


genarg at live

Feb 9, 2012, 10:24 AM

Post #1 of 2 (132 views)
Permalink
Wordpress+WP-E-COMMERCE+VARNISH

Hello. This is my first Varnish setup I plan to do. The question begins
with the setup:

Webpage (Wordpress+WP-E-Commerce) Testing/dummy site www.ilomilo.com.ar

Homepage | No cookies needed, daily updates, SSL
Products Page | No cookies needed, weekly updates, SSL
Product Page | Includes button to add to cart, need cookies, SSL
Checkout - Transaction Results - Account | Needs cookies, SSL
1 gig of resources (images & other media like pdf)

Server configuration (planned):
Intel(R) Xeon(R) CPU X5460 @ 3.16GHz, 3 cores, 1.75 GB of RAM, Max of 3
GB burstable
Linux 2.6.32-042stab044.17 on i686 (CenOS 6.2)

Main site
Varnish (ver. 3.0.2 revision 55e70a4) port 80, 443. - Nginx - PHP-FPM+APC
Local CDN
Nginx

Questions:
How can I tell Varnish to enable cache on certain url and let pass
cookies on others/rest of the site?
Having 500.000 visits/month what's the best practice for cache purge?
How can i configure varnish and nginx, one serving cached pages and the
other (nginx) serving static content like images ON THE SAME MACHINE. I
have 2 spare IP address.
I have HyperCache plugin for Wordpress, it generates static files of the
site and sends it to nginx to serve. APC also do its work. Should I
disable HyperCache and let Varnish take care of the PHP content?
More on HyperCache on http://www.satollo.net/plugins/hyper-cache


_______________________________________________
varnish-misc mailing list
varnish-misc [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


damon at huddler-inc

Feb 10, 2012, 9:36 AM

Post #2 of 2 (106 views)
Permalink
Re: Wordpress+WP-E-COMMERCE+VARNISH [In reply to]

See some suggestions inline below. Hope this helps get you started.


Server configuration (planned):
> Intel(R) Xeon(R) CPU X5460 @ 3.16GHz, 3 cores, 1.75 GB of RAM, Max of 3 GB
> burstable
> Linux 2.6.32-042stab044.17 on i686 (CenOS 6.2)
>

This is probably overkill. Varnish/nginx are not that cpu intensive. You
are probably fine with that amount of memory to get started.


> Questions:
> How can I tell Varnish to enable cache on certain url and let pass cookies
> on others/rest of the site?
>

Check out the docs on how to cache/not specific urls. Its pretty straight
forward. See https://www.varnish-cache.org/docs/3.0/tutorial/vcl.html. One
thing you want to do from the start is add a HIT/MISS header for debugging
your configuration. See
https://www.varnish-cache.org/trac/wiki/VCLExampleHitMissHeader.


> Having 500.000 visits/month what's the best practice for cache purge?
>

Purge whenever you have new content. The purging is lazy, so you don't have
to worry about purging being costly or effecting the operation.


> How can i configure varnish and nginx, one serving cached pages and the
> other (nginx) serving static content like images ON THE SAME MACHINE. I
> have 2 spare IP address.
>

This is pretty common. You can have nginx serve maint pages and static
content then proxy_pass to varnish for the content you want cached.


> I have HyperCache plugin for Wordpress, it generates static files of the
> site and sends it to nginx to serve. APC also do its work. Should I disable
> HyperCache and let Varnish take care of the PHP content?
> More on HyperCache on http://www.satollo.net/**plugins/hyper-cache<http://www.satollo.net/plugins/hyper-cache>


Varnish is good at what it does. I would lean on varnish first so long as
you can get the purging hooked in to wordpress. Since your content is
updated on a schedule, you could probably purge by hand when new content is
published.

Hope this helps,
Damon


>
>
>
> ______________________________**_________________
> varnish-misc mailing list
> varnish-misc [at] varnish-cache
> https://www.varnish-cache.org/**lists/mailman/listinfo/**varnish-misc<https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc>
>

Varnish misc RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.