[TYPO3-performance] Spreading HTTP request among multiple hostnames

georg kuehnberger georg at georg.org
Wed Jun 17 14:08:10 CEST 2009


Michiel,
a) thanks for the nice article
b) out of some measurements and observations on best practice I would 
recommend not to use more than 2 domains (main and one (max 2) 
subdomain(s) for static files); this due to DNS lookup times.
georg

Michiel Roos [netcreators] wrote:
> Steffen Gebert schreef:
>> Mario Rimann wrote:
>>> Parallelize downloads across hostnames
>>> This page makes 40 parallelizable requests to www.domain.tld. Increase
>>> download parallelization by distributing these requests across multiple
>>> hostnames:
>>> [list of 40 static files like css and images]
>> Hi Mario,
>>
>> you can use ja_replacer to replace the relative paths to fileadmin etc. John 
>> designed this extension for CDNs (but never used it myself).
>>
>> Steffen
>>
> 
> // constants:
> 
> staticBaseURL = http://staticwww.typofree.org
> jsBaseURL     = http://jswww.typofree.org
> cssBaseURL    = http://csswww.typofree.org
> 
> 
> 
> // setup:
> 
> config.tx_ja_replacer {
> 	search {
> 		1="/fileadmin/site/typofree.org
> 		2="fileadmin/site/typofree.org
> 		3="/fileadmin/site/typofree.org/script
> 		4="fileadmin/site/typofree.org/script
> 		5="/fileadmin/site/typofree.org/style
> 		6="fileadmin/site/typofree.org/style
> 		7="/uploads/
> 		8="uploads/
> 		9="/typo3conf/
> 		10="typo3conf/
> 		11="/typo3temp/
> 		12="typo3temp/
> 		13=.css"
> 		14=.js"
> 		15=.png"
> 		16=.png'
> 		17=.jpg"
> 		18=.jpg'
> 		19=.gif"
> 		20=.gif'
> 	}
> 	replace {
> 		1="{$staticBaseURL}/fileadmin/site/typofree.org
> 		2="{$staticBaseURL}/fileadmin/site/typofree.org
> 		3="{$jsBaseURL}/fileadmin/site/typofree.org/script
> 		4="{$jsBaseURL}/fileadmin/site/typofree.org/script
> 		5="{$cssBaseURL}/fileadmin/site/typofree.org/style
> 		6="{$cssBaseURL}/fileadmin/site/typofree.org/style
> 		7="{$staticBaseURL}/uploads/
> 		8="{$staticBaseURL}/uploads/
> 		9="{$staticBaseURL}/typo3conf/
> 		10="{$staticBaseURL}/typo3conf/
> 		11="{$staticBaseURL}/typo3temp/
> 		12="{$staticBaseURL}/typo3temp/
> 		13=.css?v{$version}"
> 		14=.js?v{$version}"
> 		15=.png?v{$version}"
> 		16=.png?v{$version}'
> 		17=.jpg?v{$version}"
> 		18=.jpg?v{$version}'
> 		19=.gif?v{$version}"
> 		20=.gif?v{$version}'
> 	}
> }
> 


More information about the TYPO3-performance mailing list