Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SPDY + Nginx - Advisable to use whenever possible?

So, we have nginx + spdy running for our SSL requests / responses.

All works good.

Unfortunately, spdy is SSL only at this point.

Now, our service is fairly ajax heavy.

We have the option of fairly quickly making the required changes so the requests are sent to our ssl handler and our ssl handler reverse proxies them to where they need to go.

Does spdy really speed things up that much? Would it be worth spending what will probably be a couple of hours to make chrome / latest firefox send our ajax requests to our ssl handler and have our ssl handler reverse proxy them where they need to go?

Notes:

a) This will only be active for a select group of white listed browsers (eg: chrome latest / firefox latest). Fairly simple js change there.

b) Yes, we know how to make http -> https ajax requests on these white listed browsers.

c) From our fairly extensive testing, the nginx + spdy combo works quite well. So yes, we know its slightly alpha/beta at this point. A small risk we are willing to take.

d) Bare in mind, our service is 90%+ ajax. Only initial entry is served via non-ajax, all other 'page views' are handled via ajax. So this has the potential to speed things up quite a bit for a large subset of our users.

Thanks.

like image 809
anonymous-one Avatar asked Nov 04 '22 02:11

anonymous-one


1 Answers

Short answer: Hell yes.

Long answer: It depends. https://www.phusionpassenger.com is heavy on images. Loading the front page takes a lot of requests. By switching from plain HTTP to SPDY we reduced loading time by 25% because the browser can download more assets with fewer roundtrips. However SPDY requires recent Chrome and Firefox versions. In our case, most of our users are technical users so that's not a problem. If your visitors are mostly MSIE, or if you don't load assets in a way that would benefit from parallelism, then SPDY will not help you much. In all other cases SPDY is great.

like image 165
Hongli Avatar answered Nov 09 '22 16:11

Hongli