jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: Remote Access by DavEx
Date Tue, 20 Sep 2011 17:58:26 GMT

On Tue, Sep 20, 2011 at 6:17 PM, mmjose26 <mmjose26@yahoo.com.mx> wrote:
> Reading more deeply the source code of JR and some older posts,  the
> Session.refresh() method enforces to synchronize all cluster nodes, but,
> this is not supported in jcr2spi layer.

The basic assumption here is that the cluster is either behind a load
balancer that supports client affinity or that each client resolves
the cluster domain name to the IP address of a specific cluster node,
so that in normal circumstances a single client would only be talking
with one node of the cluster. In this scenario the problem of delayed
updates you describe will never happen.

> so I extended the SessionProviderImpl from org.apache.jackrabbit.server, and
> override the method getSession so that in each getSession call, I do a
> session.refresh() before of return the session. It works fine.

Note that the cluster sync can be pretty expensive performance-wise,
so invoking it too often can significantly slow down the repository.

> I think that this is necessary due to each http request from a client DavExt
> could be answered by any   node in the cluster(thinking in one load balancer
> plus clustered nodes) and some times (as this scenario) may occurs
> unexpected behavior.

I would recommend instead configuring the load balancer to use client affinity.


Jukka Zitting

View raw message