Using SPDY instead of HTTP to increase page load drasticly

5 views
Skip to first unread message

Alexander Obuhovich

unread,
Sep 9, 2012, 5:44:22 AM9/9/12
to Development In-Portal
To show website at requested url to a user web browser (e.g. Google Chrome) makes HTTP request to a web server (e.g. Apache) and that's all in general.
Version of HTTP protocol that is currently in use is HTTP 1.1, which was developed 13 years ago. Much has changed on the internet, but not this protocol.
Today it only slows down loading times of modern websites.


Version HTTP 2.0 being developed right now, which will use ideas suggested by Google and Microsoft. While it's not ready let's focus on what is ready - SPDY protocol.
This protocol is an alternative to HTTP that most interesting features are:
  • Next Protocol Negotiation (NPN)
  • Framing and header compression
  • Stream multiplexing
  • Server push

Interesting facts:
Want to know if website is using SPDY or not? Just install this extension into Google Chrome: https://chrome.google.com/webstore/detail/mpbpobfflnpcgagjijhmgnchggcjblin


P.S.
Most notable difference would be visible when there are a lots of images on websites (see http://www.youtube.com/watch?v=vEYKRhETy4A&feature=player_embedded video).

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Dmitry A.

unread,
Sep 16, 2012, 12:34:03 AM9/16/12
to in-por...@googlegroups.com
Hi Alex,


Very interesting - thanks for finding and sharing. 

Question 1 - what's faster / better / earlier to setup and use - NGINX or SPDY? Considering you mentioned SPDY speeds up the Static files same as NGINX.

Question 2 - PHP won't be working by default as we have it configured now (as apache module) and has to be reconfigured as Fast-CGI script - what are implications of this - for server with many websites? for server with just a few websites?


DA

Alexander Obuhovich

unread,
Sep 16, 2012, 8:01:20 AM9/16/12
to in-por...@googlegroups.com
Question 1 - what's faster / better / earlier to setup and use - NGINX or SPDY? Considering you mentioned SPDY speeds up the Static files same as NGINX. 

There is module for Nginx as well. We don't need to switch. Since it's a still relatively new protocol then some problems might be happening.


Question 2 - PHP won't be working by default as we have it configured now (as apache module) and has to be reconfigured as Fast-CGI script - what are implications of this - for server with many websites? for server with just a few websites?

I'm no system administrator to know such details, but I bet google can shed some light on it. Besides php as FastCGI is connected to Nginx. If there were some problems there, then same problems might be on Apache as well.

Alexander Obuhovich

unread,
Sep 16, 2012, 8:24:22 AM9/16/12
to in-por...@googlegroups.com
I've found interesting article in Russian on the Internet about FastCGI and PHP: http://dklab.ru/chicken/nablas/49.html

One of the themes discussed there is how to solve include problem in PHP, where you need to include multiple small files all the time.

Solution in simple:
  • install eAccellerator
  • on first page load remember what files where included
  • after page was loaded combine all files into large single file and put in into cached folder
  • next time on that page include only that one large file
Author of article I've mentioned has done that and eAccelerrator has increased include time 22 times.

In In-Portal we already have knowledge about what units are used on a page. Each unit at least have 3 files in it:
  • unit config
  • event handler
  • tag processor
Then we can safely create template-based package of these files in production. In development we can still use current scheme.

Valentin Poddubnyak

unread,
Sep 16, 2012, 8:46:39 AM9/16/12
to in-por...@googlegroups.com

Dmitry A.

unread,
Sep 16, 2012, 1:18:33 PM9/16/12
to in-por...@googlegroups.com
Very insteresting Article Alex - thank you!

I believe we should research on this in more details and do some test cases.

Also, as you noticed there is something we have overlooked in eAccelerator before - control.php file.

At this point, do we create a task or just run some concepts on the side? The implementation obvoiusly should be included in In-Portal 5.3.x


DA

Dmitry A.

unread,
Sep 16, 2012, 1:19:24 PM9/16/12
to in-por...@googlegroups.com
Thanks Valentin - very interesting article that shads some light on this technology.

I guess we won't hurry with this for now.

DA
Reply all
Reply to author
Forward
0 new messages