[prev in list] [next in list] [prev in thread] [next in thread] 

List:       slide-user
Subject:    Re: Load balance
From:       Dirk Verbeeck <dirk.verbeeck () pandora ! be>
Date:       2001-09-26 20:07:21
[Download RAW message or body]

Kazuyuki Shiraishi wrote:

> > Kazuyuki Shiraishi wrote:
> > >
> > > Hi there
> > >
> > > I world like to realize load balancing.
> > >
> > > For example, there are three machines.
> > > One of three is DB Server, another are Slide on Tomcat.
> > > And two slides share one DB Server.
> > >
> > > So, I have a question.
> > >
> > > Is data consistency kept when access one database
> > > from any slides at the same time?
> > >
> > > Kazuyuki Shiraishi
> >
> > No, this won't work. Slide caches a lot of stuff internally, and things
> > go BADLY wrong if anything is changed behind its back. You can only have
> > one instance of slide per database.
> >
> > Michael
>
> Thank you for your response.
>
> I have more question.
>
> Here is any machines for slide with replicated DB.
> One of any machines is for write exclusive use.
> Another machines are for read exclusive use.
> And, machines for read delegate write requests to machine for write.
> This will work?
>
> Thanks in advance.
>
> ---------------------------------
> Kazuyuki Shiraishi

If that delegate is on webdav/slide level then this should work.
You would have to say to your users use server1 for read/write and the other
webdav server(s) only for read.
(You can disable the put/proppatch/lock requests in web.xml)

One database or a replicated system doesn't matter, the caching is in the
slide engine.
The only thing that you have to do is to flush the slide cache on the second
server every 15 minutes or so.
That is just a simple servlet that you call from a cronjob (or similar).

Read-Write Slide Webdav Server <-----> DB Server
                                           |
Read-Only  Slide Webdav Server <-----------+

or

Read-Write Slide Webdav Server <-----> Master DB Server
                                            |
                                            | (One way replication)
                                            V
Read-Only  Slide Webdav Server <-----  Replicated DB Server


Another option is to disable caching, then you can use multiple read-write
slide servers on the same DB.
I don't know about the performance penalty but you can try. (it requires some
code changes but it's very simple to do)

Or you could use a read-write store with caching and the read-only stores
without caching.
Then you have always up to date info on all services.

What the best configuration is depends on the usage.

You might also want to look at putting a page cache in front on the webdav
server (squid or similar).
It will reduce the load on the server by caching the page GETs, and if you
have large documents this will help a lot.
I don't know a lot about squid but maybe you can even cache the propfind and
head requests.
Just an idea...


Dirk

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic