Re: ACL Question

From: Joseph Hardeman <jhardeman#colocube.com>
Date: Mon, 09 Nov 2009 11:30:49 -0500
Hi Guys,

I appreciate the responses, over the weekend I decided to test with using NFS and a single caching server for the application caching module and it worked great, so I don't have to set haproxy to try to send the same request to multiple servers *S*  I just have to send it to a single box now. 

I was just curious if it could be done. *S*

Love Haproxy and I recommend it to every one now.

Joe

Willy Tarreau wrote:
Hi,

On Fri, Nov 06, 2009 at 11:35:24AM +0100, XANi wrote:
  
Hi,

On Thu, 05 Nov 2009 19:44:03 -0500, Joseph Hardeman
<jhardeman@colocube.com> wrote:
    
Hi Everyone,

I know you can use acl's to take a request for a file and send it to
a different backend than the normal requests go to, but I was
wondering can an acl be setup so that when a request for a file, say
update.php, is called via the external url, for example:

http://www.example.com/update.php

Instead of sending it to a single server can you send it to all of
the backend servers at the same time? 
      
(...)

  
AFAIK there isn't any possibility to do "send reqest to that backend
AND do something else" (i'd love having possibility to use external
rewriting software, like squid can).
    

indeed, it is not possible to play a request multiple times (and this
has nothing to do with ACLs).

  
What kind of cache do u use ? If it's memcached u can make one big
"global" cache quite easily (in most client libs u just need to specify
all servers in same order), and in other types of cache you would have
to have script that whne cache gets updated on one backend it sends
updates to other ones.
    

It's often quite common to see people send remote actions to directed
target servers, most often it's just to verify that all servers are
up to date. For this they simply use cookies. If you set a passive
cookie for each of your cache servers, you can decide which one you
use and your script can simply use that :

	cookie SRV
	server cache1 1.1.1.1 cookie c1 ...
	server cache2 1.1.1.2 cookie c2 ...
	server cache3 1.1.1.3 cookie c3 ...

Regards,
Willy



  

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean. Received on 2009/11/09 17:30

This archive was generated by hypermail 2.2.0 : 2009/11/09 17:45 CET