Parallel Downloads from Subdomain

Discussion regarding Joomla! 1.5 Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security and Performance FAQs
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
stephen77
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Aug 05, 2008 8:12 am

Parallel Downloads from Subdomain

Post by stephen77 » Sat Oct 09, 2010 6:58 am

I am trying to improve the download time of my site and have implemented all the standard techniques - combining, minifying, compressing, expires headers, system cache and so on

I have read several articles about the benefit of serving static content from subdomains and this idea seems to make sense

From Yahoo Developer:
"Splitting components allows you to maximize parallel downloads. Make sure you're using not more than 2-4 domains because of the DNS lookup penalty. For example, you can host your HTML and dynamic content on www.example.org and split static components between static1.example.org and static2.example.org"

Following this idea, I have set up two subdomains and these mirror everything on the main domain
I am now trying to find a way of calling all images from images.mysite.com and all js and css from scripts.mysite.com

Can anyone advise on this
I figure that I need to change the 'core' reference to my images so that joomla looks at the subdomain for them rather than the main domain
so
http://www.mysite.com/images/stories/Joomla.jpg
gets called as
http://images.mysite.com/stories/Joomla.jpg

Likewise with the scripts

I also read this suggestion:
Be even more creative and call all your template files from a subdomain as well
http://templates.mysite.com/TemplateNam ... plates.css

I'd be really interested to hear any suggestions on how this can be implemented

Thanks
Stephen

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30814
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Parallel Downloads from Subdomain

Post by Per Yngve Berg » Sat Oct 09, 2010 8:44 am

Sounds like it's more work than it's worth. I presume you are on a dedicated host, otherwise the performance depends more on what the other customers are doing on a shared host. How many thousand simultaneous visitors do you have on your site?

stephen77
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Aug 05, 2008 8:12 am

Re: Parallel Downloads from Subdomain

Post by stephen77 » Sat Oct 09, 2010 10:36 am

Hi
Thanks for your reply
Maybe I'm trying too hard ?
Yes, on a Virtual Server
I have up to 100 simultaneous visitors at the moment and, guessing from what you say, it won't make much difference for that number
Just did some load time tests using two identical pages containing a dozen images
In one, I then changed the image src to http://images.mysite.com
Results on Octagate showed a slight increase by using the subdomain - seems odd
Thanks for advice
Stephen

aBrookland
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Tue Jun 16, 2009 1:41 pm

Re: Parallel Downloads from Subdomain

Post by aBrookland » Fri Oct 29, 2010 10:19 am

Hi,
Sounds like it's more work than it's worth. I presume you are on a dedicated host, otherwise the performance depends more on what the other customers are doing on a shared host. How many thousand simultaneous visitors do you have on your site?
That's actually got nothing to do with the idea for parallelisation of downloads. The idea is that a browser limits the number of concurrent connections it makes to a server. Therefore if you have 20 images to download on a page it will only download 2 at a time and queue the rest so it will download 10 images one after the other.

If you split your images so that some are served from images1.mydomain.com and some from images2.mydomain.com say then twice as many images will be downloaded at once so it will download 5 images one after the other. Also any other page elements such as css etc will be downloaded from http://www.mydomain.com as normal so they will also be downloaded concurrently with the images and not queued.

So you can end up with the page loading into the browser quite a lot quicker as long as the user is on decent broadband.

It's got nothing to do with server loads at all.
Following this idea, I have set up two subdomains and these mirror everything on the main domain
I am now trying to find a way of calling all images from images.mysite.com and all js and css from scripts.mysite.com

Can anyone advise on this
I figure that I need to change the 'core' reference to my images so that joomla looks at the subdomain for them rather than the main domain
so
http://www.mysite.com/images/stories/Joomla.jpg
gets called as
http://images.mysite.com/stories/Joomla.jpg
The general idea is to make those subdomains point to the real domain so that you don't have to mirror content at all. What you would need to do is make joomla modify urlfor images before the page is sent out.

I'm currently looking into the idea of creating a plugin that will run after the page is created, it would find all img tags and add http://images1.mysite.com etc based on some criteria (you want each image to allways be served from the same subdomain so browser caches work and google doesn't see the same content from multiple urls).

Cheers,

Alan.

stephen77
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Aug 05, 2008 8:12 am

Re: Parallel Downloads from Subdomain

Post by stephen77 » Fri Oct 29, 2010 11:32 am

Hi Alan

Thanks for explaining all that.
I would be very interested in the plugin you are working on. I was wondering about the issue of always serving an image from the same subdomain once it has been allocated. It sounds as though you've given this a lot of thought.
Please let me know how you get on
Thanks
Stephen

asynctea
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Thu Mar 26, 2009 1:43 am

Re: Parallel Downloads from Subdomain

Post by asynctea » Wed Dec 01, 2010 7:24 pm

I'm interested in doing this as well. Seems like it'd be easier to do some sort of auto path change when you added static content images to the site. @aBrook have you come up with anything?

Amrit
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Oct 27, 2010 7:37 pm

Re: Parallel Downloads from Subdomain

Post by Amrit » Wed Oct 19, 2011 4:25 pm

I know this is an old post, but I'll take my chances. :D

Anyone been able to make a plugin/component to handle concurrent downloads from subdomains?

Would be awesome to have the possibility to set one for CSS, one for JS, one for images and one for cache.

I did this on another platform, Opencart, and I drastically cut the loading time just by having the content load from 5 different subdomains plus the main domain. Using subdomains and with some .htaccess cache settings I cut the loading time down from 29 seconds to 2 seconds, and this on the same server I use for Joomla, so I know speeding up a site is quite possible.

With JCH_Optimize and Jotcache and some good cache handling in .htaccess I can about cut the loading time of a Joomla site, and sometimes that is ok, but most of the times Joomla is just sort of sluggish. :D

Any ideas on how use subdomains for speeding up loading time?

Cheers
Amrit

01Kuzma
Joomla! Intern
Joomla! Intern
Posts: 83
Joined: Tue Aug 28, 2012 8:32 am

Re: Parallel Downloads from Subdomain

Post by 01Kuzma » Mon Jan 04, 2016 2:59 pm

Hi!
It's very old thread but still very actual.
Does anyone has made a special plug-in?
Or does someone could provide a simple tutorial how the basic functionality could be made?


Locked

Return to “Performance - Joomla! 1.5”