Trying to increase performence for a site w/ SSL

Trying to increase performence for a site w/ SSL

am 05.01.2007 06:09:29 von tgh003

I have a web application that makes pretty heavy use of Javascript,
couple of style sheets, and several other image assets. Probably a
total of ~30 assets per page (images, style sheets, and script files).
I use a wildcard certificate so *.mycompany.com.

I understand that spreading these assets over several subdomains can
significantly reduce the client side load time. (this is because
pipelining isnt turned on the major browsers so the maximum number of
assets the browser can download simultaneously is 2, so if you spread
the load amongst several domains you can download more assets
simultaneously).

Does this benefit still hold true if you are on a SSL connection? If I
spread the assets across say 4 subdomains (subdomain1.mycompany.com,
subdomain2.mycompany.com, etc...) does each of these connections need
to perform a new SSL handshake for every page thus negating the
benefit? Or is the first request just going to be slower because it
does indeed need to make 4 separate ssl handshakes but the rest of the
session (all subsequent page loads) is faster? Or is there a way to
handshake on the base url such as https://*.mycompany.com thus making
all subsequent requests faster?

Basically I am trying to make all the pages load faster. Any thoughts
are appreciated.

Re: Trying to increase performence for a site w/ SSL

am 05.01.2007 06:46:03 von Ertugrul Soeylemez

tgh003@gmail.com (07-01-04 21:09:29):

> I understand that spreading these assets over several subdomains can
> significantly reduce the client side load time. (this is because
> pipelining isnt turned on the major browsers so the maximum number of
> assets the browser can download simultaneously is 2, so if you spread
> the load amongst several domains you can download more assets
> simultaneously).

Making pages load faster means not to work around problems, but to solve
them. Use less images, SSI (see below), etc.


> Does this benefit still hold true if you are on a SSL connection? If
> I spread the assets across say 4 subdomains (subdomain1.mycompany.com,
> subdomain2.mycompany.com, etc...) does each of these connections need
> to perform a new SSL handshake for every page thus negating the
> benefit? Or is the first request just going to be slower because it
> does indeed need to make 4 separate ssl handshakes but the rest of the
> session (all subsequent page loads) is faster? Or is there a way to
> handshake on the base url such as https://*.mycompany.com thus making
> all subsequent requests faster?

No. For each connection, a separate SSL handshake is required.


> Basically I am trying to make all the pages load faster. Any thoughts
> are appreciated.

You might try to use SSI (Server-Side Includes) [1,2] to include the
script and style files directly into the main HTML file. As such, the
client would need a lot fewer requests, which reduces both network and
CPU load for both parties.


Regards,
E.S.


References:
[1] http://httpd.apache.org/docs/1.3/howto/ssi.html
[2] http://httpd.apache.org/docs/2.0/howto/ssi.html