tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Balance and sync data
Date Tue, 16 Sep 2008 13:27:01 GMT
Martin Spinassi wrote:
> On Tue, 2008-09-16 at 14:02 +0100, Mark Thomas wrote:
>> Martin Spinassi wrote:
>>> Hello list!
>>>
>>>
>>> I'm reading some docs to make load balance with apache and 2 tomcats.
>>>
>>> By now I'm just at "ultra-beta" testing stage, but there is something
>>> that I don't know how to resolve or search info about.
>>>
>>> The app at tomcat writes some files at disk, but with load balance just
>>> one of both tomcats will have that info, the other one will not know
>>> about that. I think that may be rsync could be a solution, but adding it
>>> to a cron job every 1 minute won't resolve it, it must sync at the same
>>> time that the file is modified or created.
>>>
>>>
>>> Is there something that can be used to do that?
>>> Any documentation or link that can help me?
>> What is the relationship between files and requests / sessions? If they are
>> unique (it sounds as if they are since otherwise rsync won't work at all)
>> then you might be able to use a shared file location.
>>
>> What information is in these files? There might be other solutions.
>>
>> Mark
>>
> 
> 
> Thanks for your reply Mark.
> 
> Most of the files are images. We don't store them in a database just to
> make the database as lightweight as possible.
> 
> Using a shared place to store them can be a solution, may be using samba
> or nfs. The problem about that is that using another server just for
> that is a waste of resources, and including the shared path at one of
> the tomcat servers, makes the possibility of, if it goes down for some
> reason, the other one won't be able to take that images...
> 
> 
> Should I store them inside a database anyway? I don't see how to resolve
> this..
> 
> 
> Thanks again for your reply, any other idea will be appreciated.

The db would be one (maybe the simplest) option.

Could you rsync them and just re-create the ones that are missing as
required after a failover?

Mark



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message