If you're expecting the size of your image store to grow, or better yet, grow rapidly, you'd be best served to consider a strategy either with mod_proxy/mod_rewrite, or better yet, looking into a CDN (content delivery network) to host the images themselves.
Example, I'm about to launch an offering that will allow for our support team to publish video tutorials on how to use our products. It makes absolutely no sense to have a copy of each video file on each front end webserver (we use tomcat as the web server and application container), and it also isn't responsible to deliver a content offering with no redundancy in case of outage/downtime/disaster. Instead, we're leveraging some clever (but very easy) DNS, and Amazon S3 to host the files. By leveraging Amazon, we can link all our content by using a CNAME DNS record, like content.yourname.com , and automatically deliver that content from Amazon. Of course, there are drawbacks. I don't think this method would work in SSL implementations for instance. This link is to the instructions I followed ot deliver content via S3: http://www.carltonbale.com/2007/09/how-to-alias-a-domain-name-or-sub-domain-to-amazon-s3/ Paul McGurn -----Original Message----- From: Martin Spinassi [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2008 5:53 PM To: users@tomcat.apache.org Subject: Re: Balance and sync data On Tue, 2008-09-16 at 22:20 +0200, André Warnier wrote: [...] > The question I've been holding back since your initial post, is why > exactly you do want to load-balance similar requests to 2 Tomcats ? > > Just an idea : > > If it is because you have a) "image stuff" and b) "non-image stuff", and > they each represent about 50% of the load, then maybe you do not really > want to balance (with the problems of sharing and/or duplicating the > images), but you could just use a front-end to split the image stuff and > send it to Tomcat-1, and the non-image stuff and send it to Tomcat-2. > (Apache + mod_rewrite + mod_proxy). > This way, only Tomcat-1 would need to handle the images (up and down) > and it would always be up-to-date. > They are all "image stuff". The idea of duplicate those images are availability, just in case one tomcat goes down. But, in the other hand, images (and resize, thumbnails, etc) consumes resources, and the possibility of using just one server is still around my head. If the images load makes big enough, may be using another server just for that could be a good option. I've to read something more about mod_proxy, and see if I can apply it to resolve some load issues. Thanks for your help André, I'll keep your idea in mind to try it before selecting the right one to production. Cheers. Martín --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]