Search squid archive

how to use accel url_rewrite_program urlgroup and cache_peer?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm setting up a special config which sould do the following:

* load balance URL on backend servers (originserver)
* filter URL on different kind of server with URL rewriting based on URL.


So I have:

incomming URL: somedomaine/path/script.php => should go to peer which host script, php incomming URL: somedomaine/imagepath/someimg.jpg => should go to static peer, filer

So I've a redirector which analyze the URL based on some regexp. It was needed for 2.5. Because the redirector script was embedding the round robbing balancing algorithm.

Now in 2.6 I've to rewrite all my config, and the reriter may become useless. But I'm a bit lost in the configuration because I've based my script on 2.5. Now with url_rewrite_program, http_port accel, cache_peer it seems I should be able to do it in full squid.conf directive.

For now my squid works on the load balancing side, but not on filtering, as the filtered url are also balanced on the originserver.

Here is my related squid.conf directives:

# I do vhost namebased
http_port 80 defaultsite=my.site.com vhost

# the rewrite filter
url_rewrite_program /etc/squid/redirector.pl
url_rewrite_children 5
url_rewrite_concurrency 0
url_rewrite_host_header off

cache_peer php-01 parent 80 0 no-query originserver round-robin weight=1 login=PASS cache_peer php-02 parent 80 0 no-query originserver round-robin weight=1 login=PASS

/etc/squid/redirector.pl return, the incomming URL if not matched, or the url with the domain replaced with the filer's hostname if it matches a static document.
ex: http://filer/imagepath/someimg.jpg

I don't find any good doc on how to use all those rewriting url + peer balancing etc. Can someone point me to some good ref?

Regards,
Sylvain.

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux