Re: domains vs sub-domains

2009-11-10 Thread Evgeny

>From the user's point of view #2 might be better
i'd think that most people naturally "root" path to site name



On Nov 10, 12:38 pm, Paul Menzel  wrote:
> Am Montag, den 09.11.2009, 21:38 -0800 schrieb Chris:
>
> > I've recently been in discussion about which is better to have.
>
> >http://media.example.comOR
> >http://example.com/media/
>
> > 1) The first method, I've been told, allows you to make more requests.
> > IE for example can only make like 4 requests at a given time on a
> > given domain. but, if you use sub-domains, you can make additional
> > requests (4 additional in the example of IE).
>
> I am not sure, but I think if you use SSL this could lead to problems
> because some files are loaded from a different server.
>
> […]
>
>  signature.asc
> < 1KViewDownload
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: domains vs sub-domains

2009-11-10 Thread Paul Menzel
Am Montag, den 09.11.2009, 21:38 -0800 schrieb Chris:
> I've recently been in discussion about which is better to have.
> 
> http://media.example.com OR
> http://example.com/media/
> 
> 1) The first method, I've been told, allows you to make more requests.
> IE for example can only make like 4 requests at a given time on a
> given domain. but, if you use sub-domains, you can make additional
> requests (4 additional in the example of IE).

I am not sure, but I think if you use SSL this could lead to problems
because some files are loaded from a different server.

[…]


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: domains vs sub-domains

2009-11-10 Thread rebus_

Hi,

I personally also use option #1 due to performance, scalability and
"prettiness" of URL, etc, reasons all mentioned in above posts.

On the other hand if you spread your content over a bunch of sub
domains you could, instead of increasing performance, downgrade it due
to numerous DNS queries which can be quite expensive sometimes.

So don't get carried away with static content serving domains.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: domains vs sub-domains

2009-11-09 Thread Craig McClanahan

On Mon, Nov 9, 2009 at 9:38 PM, Chris  wrote:
>
> I've recently been in discussion about which is better to have.
>
> http://media.example.com OR
> http://example.com/media/
>
> 1) The first method, I've been told, allows you to make more requests.
> IE for example can only make like 4 requests at a given time on a
> given domain. but, if you use sub-domains, you can make additional
> requests (4 additional in the example of IE).
>
> 2) The second method is a more canonical approach and to me is the
> preferred approach. The person arguing this point says that the
> additional requests cannot be made on sub-domains b/c browsers issue X
> amount of requests on a per domain basis therefore sub-domains do
> create additional requests.

Browsers have a limit on simultaneous requests per host name, not per
domain name.

>
> I've also been told that these arguments are really not that big of a
> deal.

Like nearly everything in computing, there is no absolute answer to
this that is correct under all circumstances.  But my experience is
that downloading more media resources simultaneously will generally
improve the user-perceived response time of the initial access to a
media-rich page.  And, given how important first impressions are, that
is very much worth considering.

After the first load of a given page, there will be less impact as
long as the resources remain cached locally by the browser.

>
> Which method should I adopt? I personally like the second method, but
> if it will effect performance/ loading times at all then I should go
> with the first method. I will be serving things like media and API's
> on a separate server or instance. Any thoughts?

There are a couple additional of reasons to consider option (1).
First, since you are serving static resources only, you don't need to
serve them with Django -- you can pick a highly optimized web server
like nginix or Apache for serving the media resources.  Second, they
don't have to be served by the same physical server, which can
definitely improve your application's scalability.

You can play configuration games and accomplish some of both of these
benefits with option (2), but it's a *lot* more configuration work.

As a final thought, it's instructive to note that the Ruby on Rails
equivalent to media-serving template tags have built in support for
spreading the media requests, even for a single page, across as many
media asset hosts as you wish to configure, with no impact on the
templates themselves.  And, in a globally accessed application, you
can even use asset host names on a content delivery network so that
media resources get served from a geographically close server, which
will (again) improve the user-perceived responsiveness of your
application.

Sounds like a few other people in the world have found approach (1) to
be worth the effort.

Craig

PS:  WIth regards to aesthetics, does the *user* of your application
care what the media URLs look like?  Nope, I didn't think so either.
So, neither should *you* make that a primary decision criteria :-).


>
> Thanks in advance for input.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: domains vs sub-domains

2009-11-09 Thread Max Battcher

Chris wrote:
> I've recently been in discussion about which is better to have.
> 
> http://media.example.com OR
> http://example.com/media/
> 
...
> Which method should I adopt? I personally like the second method, but
> if it will effect performance/ loading times at all then I should go
> with the first method. I will be serving things like media and API's
> on a separate server or instance. Any thoughts?

All things considered the choice here is probably more aesthetic (which 
looks "prettier" to you) than about performance. If you like the second, 
then go with the second. If performance is an issue and you think the 
first gives you better performance you can edit your HTML templates and 
switch...

Personally I like the first because it is "prettier" to me. It is also 
much easier for "poor man's load balancing"... If one server gets to 
crowded on the very basic sites that I host, I can swap it to another 
server with "merely" a DNS change. But that is only but one load 
balancing technique among many...

Another reason I use subdomains, particularly for media, is the ability 
to use "off-the-shelf cloud products". For instance, my 
media.worldmaker.net "server" is currently a CNAME for a 'cheap' Amazon 
S3 bucket. It could just as easily be on Rackspace CloudFiles, for all 
that it matters. Meanwhile, I'm also considering "upgrading" it to a 
CloudFront distribution, potentially without having to touch any of my 
HTML for "instant" bonus performance. Having all my static media hosted 
by good static media hosts saves me time to think about my dynamic 
content and tools.

Your mileage may certainly vary.

--
--Max Battcher--
http://worldmaker.net

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



domains vs sub-domains

2009-11-09 Thread Chris

I've recently been in discussion about which is better to have.

http://media.example.com OR
http://example.com/media/

1) The first method, I've been told, allows you to make more requests.
IE for example can only make like 4 requests at a given time on a
given domain. but, if you use sub-domains, you can make additional
requests (4 additional in the example of IE).

2) The second method is a more canonical approach and to me is the
preferred approach. The person arguing this point says that the
additional requests cannot be made on sub-domains b/c browsers issue X
amount of requests on a per domain basis therefore sub-domains do
create additional requests.

I've also been told that these arguments are really not that big of a
deal.

Which method should I adopt? I personally like the second method, but
if it will effect performance/ loading times at all then I should go
with the first method. I will be serving things like media and API's
on a separate server or instance. Any thoughts?

Thanks in advance for input.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---