[Yazlist] Yazproxy | PHP / YAZ

Richard MAHONEY r.mahoney at iconz.co.nz
Fri Sep 19 12:22:00 CEST 2008


Dear Adam,

On Fri, 2008-09-19 at 07:49, Adam Dickmeiss wrote:
> Richard MAHONEY wrote:
> > Readers,
> >
> > I've been having trouble with the performance of Zebra while under load
> > so I want to try running two instances and to load balance between
> > them.
> >
> > Yazproxy is sitting in front of the Zebra instances receiving requests
> > from a PHP / YAZ search interface. Yazproxy's config.xml file contains:
> >
> > ...
> >    <target name="localhost" default="1">
> >     <url>localhost:9998</url>
> >     <url>localhost:9999</url>
> > ...
> >
> > Currently the PHP / YAZ search interface contains:
> >
> > ...
> > yaz_connect('localhost:9999/sch1', array('charset' => 'UTF-8', \
> >  'proxy' => 'localhost:9000', 'cookie' => 'ScholiaCookie', 'piggyback' => 'true'));
> > ...
> >
> >   
> I suggest you do not specify a proxy or cookie in PHP/YAZ. Just pass the 
> address of the yazproxy as if it was a Z39.50 server itself. IIRC 
> yazproxy just assigns to you the server that currently has the lowest 
> number of existing sessions.

Thanks for this suggestion. With the connect line now reading:

 yaz_connect('localhost:9000', array('charset' => 'UTF-8', 'piggyback'
=> '1'));

yazproxy is happily switching between  localhost:9998 and 9999 ;)


Kind regards,

 Richard


-- 
Richard MAHONEY | internet: http://indica-et-buddhica.org/
Littledene      | telephone/telefax (man.): +64 3 312 1699
Bay Road        | cellular: +64 275 829 986
OXFORD, NZ      | email: r.mahoney at indica-et-buddhica.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Indica et Buddhica: Materials for Indology and Buddhology




More information about the Yazlist mailing list