You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ðavîd Låndïs <dl...@gmail.com> on 2010/10/19 03:40:38 UTC

Splitting Content Across Multiple Domains

I am considering creating another Host in my Tomcat server and
creating another .war file with static content for that additional
host. So the links to static content generated by my primary
application will point to the domain name of this new host. Here are
the two hostnames for example:

app.example.com
static1.example.com

Here is an article discussing this general technique (not Tomcat
specific): http://www.yuiblog.com/blog/2007/04/11/performance-research-part-4/

Creating the new Host elements is no problem and creating new DNS
aliases that refer to those Hosts is also no problem. My issue is that
my application requires a login and I only want to expose those static
resources to someone who has logged into the primary application. Does
anyone have any recommendations on how to accomplish that? Or is this
the wrong approach entirely?

One thing I thought might be possible would be to append a session Id
onto the url's of the images located on the static content host and
then just create a Filter that would check that id somehow. That's
pretty much as far as I've got; any advice would be appreciated.

Thanks.

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


Re: Splitting Content Across Multiple Domains

Posted by Ðavîd Låndïs <dl...@gmail.com>.
On Mon, Oct 18, 2010 at 10:49 PM, Caldarale, Charles R
<Ch...@unisys.com> wrote:
>
> I think you may be wasting your time.  Have you determined that you actually have a performance problem, or are you fixing a non-existent problem?


I don't expect the technique to make that much difference on its own,
but it's an architecture that seems like it would better facilitate
creating a cookie-free domain as well as eventually migrating to a
CDN. But I guess that's part of my problem, I haven't been able to
find any information on splitting content across multiple domains
while still protecting the stuff that is outside the primary app. And
don't worry I don't want to do anything too crazy with hacking
jsession Ids I'm more just wondering if there is a legitimate way to
actually accomplish this on Tomcat.

>
> The cited article is over three years old, and since then all of the popular browsers have increased their default for the number of parallel connections to something larger than two - usually six.  I'd suggest just putting things back the way they were, so your images are automatically protected by the main logon.

Yes you are right, here is a handy site listing the differences
between some of the browsers we are supporting:

http://www.browserscope.org/?category=network&v=1&ua=Chrome%205,Chrome%206,Firefox%202,Firefox%203,IE%206,IE%207,IE%208,Safari%204,Safari%205

And in the business world as I'm sure you know, "popular" still means
IE 6 and IE 7. Anyway I am just investigating the technique at this
point, thanks for your response.

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


Re: Splitting Content Across Multiple Domains

Posted by Ðavîd Låndïs <dl...@gmail.com>.
On Tue, Oct 19, 2010 at 7:35 AM, Pid <pi...@pidster.com> wrote:
>
> And I'm not sure what actual performance gain you'd get from hosting it
> on the same IP address.  From memory, my experience was that the
> performance gain was barely detectable and only occurred when the app
> was on a separate IP address.

Hmm, interesting. I think in theory at least it shouldn't matter if
it's on the same IP unless the increased load offset any gains made
with the parallelization of the downloads. In any case once I had
everything split up I think then it would be easy to add more IP's
into the mix as needed.

Also I did find a newer article from Google that recommends this technique:

http://code.google.com/intl/en/speed/page-speed/docs/rtt.html#ParallelizeDownloads

"If your pages serve large numbers of static resources, such as
images, from a single hostname, consider splitting them across
multiple hostnames using DNS aliases. We recommend this technique for
any page that serves more than 10 resources from a single host."

But yes your point is taken that probably there are more important
optimizations to make at this point.

>
> Have you configured the Tomcat native (APR) component?  That'll give you
> improved performance, if it's an issue.
>

That is on my very short list of things to do, thanks.

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


Re: Splitting Content Across Multiple Domains

Posted by Pid <pi...@pidster.com>.
On 19/10/2010 03:49, Caldarale, Charles R wrote:
>> From: Ðavîd Låndïs [mailto:dlandis@gmail.com] 
>> Subject: Splitting Content Across Multiple Domains
> 
>> I am considering creating another Host in my Tomcat 
>> server and creating another .war file with static 
>> content for that additional host. So the links to 
>> static content generated by my primary application 
>> will point to the domain name of this new host.
> 
>> Here is an article discussing this general technique:
>> http://www.yuiblog.com/blog/2007/04/11/performance-research-part-4/
> 
> I think you may be wasting your time.  Have you determined that you actually have a performance problem, or are you fixing a non-existent problem?
> 
> The cited article is over three years old, and since then all of the popular browsers have increased their default for the number of parallel connections to something larger than two - usually six.  I'd suggest just putting things back the way they were, so your images are automatically protected by the main logon.

And I'm not sure what actual performance gain you'd get from hosting it
on the same IP address.  From memory, my experience was that the
performance gain was barely detectable and only occurred when the app
was on a separate IP address.

Have you configured the Tomcat native (APR) component?  That'll give you
improved performance, if it's an issue.


p

RE: Splitting Content Across Multiple Domains

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Ðavîd Låndïs [mailto:dlandis@gmail.com] 
> Subject: Splitting Content Across Multiple Domains

> I am considering creating another Host in my Tomcat 
> server and creating another .war file with static 
> content for that additional host. So the links to 
> static content generated by my primary application 
> will point to the domain name of this new host.

> Here is an article discussing this general technique:
> http://www.yuiblog.com/blog/2007/04/11/performance-research-part-4/

I think you may be wasting your time.  Have you determined that you actually have a performance problem, or are you fixing a non-existent problem?

The cited article is over three years old, and since then all of the popular browsers have increased their default for the number of parallel connections to something larger than two - usually six.  I'd suggest just putting things back the way they were, so your images are automatically protected by the main logon.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.