X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=doc%2Fbook.xml;h=4564bbb60a115e815187943fee21d1b831bc9ceb;hb=9ecd8773a367e0fae79a2da422a0bebb0938fe1e;hp=c77f60ac00621891919498fc3e7b54a2d8d9193e;hpb=a19d02cb6e7689d4a1e36e13308b05f326eeba0c;p=pazpar2-moved-to-github.git
diff --git a/doc/book.xml b/doc/book.xml
index c77f60a..4564bbb 100644
--- a/doc/book.xml
+++ b/doc/book.xml
@@ -260,7 +260,7 @@
in the same invocation. For example:
cd \MyPazpar2\etc
- ..\bin\pazpar2 -install -c pazpar2.cfg -l pazpar2.log
+ ..\bin\pazpar2 -install -f pazpar2.cfg -l pazpar2.log
The Pazpar2 service may now be controlled via the Service Control
Panel. It may be unregistered by passing the -remove
@@ -289,18 +289,19 @@
cd etc
cp pazpar2.cfg.dist pazpar2.cfg
- ../src/pazpar2 -f pazpar2.cfg -t edu.xml
+ ../src/pazpar2 -f pazpar2.cfg
And on Windows:
cd etc
copy pazpar2.cfg.dist pazpar2.cfg
- ..\bin\pazpar2 -f pazpar2.cfg -t edu.xml
+ ..\bin\pazpar2 -f pazpar2.cfg
- This will start a Pazpar2 listener on port 8004. It will proxy
+ This will start a Pazpar2 listener on port 9004. It will proxy
HTTP requests to localhost - port 80, which we assume will be the regular
HTTP server on the system. Inspect and modify pazpar2.cfg as needed
- if this is to be changed. The -t option specifies the list of targets
+ if this is to be changed. The pazpar2.cfg includes settings from the
+ file settings/edu.xml
to use for searches.
@@ -671,6 +672,60 @@
+
+ Load balancing
+
+ Just like any web server, Pazpar2, can be load balanced by a standard hardware or software load balancer as long as the session stickiness is ensured. If you are already running the Apache2 web server in front of Pazpar2 and use the apache mod_proxy module to 'relay' client requests to Pazpar2, this set up can be easily extended to include load balancing capabilites. To do so you need to enable the
+ mod_proxy_balancer
+ module in your Apache2 installation.
+
+
+
+ On a Debian based Apache 2 system, the relevant modules can
+ be enabled with:
+
+ sudo a2enmod proxy_http
+
+
+
+
+ The mod_proxy_balancer can pass all 'sessionsticky' requests to the same backend worker as long as the requests are marked with the originating worker's ID (called 'route'). If the Pazpar2 serverID is configured (by setting an 'id' attribute on the 'server' element in the Pazpar2 configuration file) Pazpar2 will append it to the 'session' element returned during the 'init' in a mod_proxy_balancer compatible manner. Since the 'session' is then re-sent by the client (for all pazpar2 request besides 'init'), the balancer can use the marker to pass the request to the right route. To do so the balancer needs to be configured to inspect the 'session' parameter.
+
+
+
+ Apache 2 load balancing configuration
+
+ Having 4 Pazpar2 instances running on the same host, port range of 8004-8007 and serverIDs of: pz1, pz2, pz3 and pz4 respectively we could use the following Apache 2 configuration to expose a single pazpar2 'endpoint' on a standard (/pazpar2/search.pz2) location:
+
+
+ AddDefaultCharset off
+ Order deny,allow
+ Allow from all
+
+ ProxyVia Off
+
+ # 'route' has to match the configured pazpar2 server ID
+
+ BalancerMember http://localhost:8004 route=pz1
+ BalancerMember http://localhost:8005 route=pz2
+ BalancerMember http://localhost:8006 route=pz3
+ BalancerMember http://localhost:8007 route=pz4
+
+
+ # route is resent in the 'session' param which has the form:
+ # 'sessid.serverid', understandable by the mod_proxy_load_balancer
+ # this is not going to work if the client tampers with the 'session' param
+ ProxyPass /pazpar2/search.pz2 balancer://pz2cluster lbmethod=byrequests stickysession=session nofailover=On]]>
+
+ The 'ProxyPass' line sets up a reverse proxy for request â/pazpar2/search.pz2â and delegates all requests to the load balancer (virtual worker) with name âpz2clusterâ. Sticky sessions are enabled and implemented using the âsessionâ parameter. The âProxyâ section lists all the servers (real workers) which the load balancer can use.
+
+
+
+
+
+
+