# SPDY, SSL termination and proxy\_pass

**URL:** <https://www.ruby-forum.com/t/spdy-ssl-termination-and-proxy-pass/237242>\
**Category:** NGINX\
**Created:** [October 31, 2013, 11:01am UTC](https://www.ruby-forum.com/t/spdy-ssl-termination-and-proxy-pass/237242 "2013-10-31T11:01:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [October 31, 2013, 11:01am UTC](https://www.ruby-forum.com/t/spdy-ssl-termination-and-proxy-pass/237242/1 "2013-10-31T11:01:48Z")

</div>

I have setup SPDY on my application and have observed some nice  
reductions  
in page load times. However in a production environment my setup is  
somewhat  
different.

At the moment my setup looks like this:

server 1 running nginx, terminates ssl and uses proxy\_pass to server 2  
server 2 running nginx, php-fpm and varnish etc. (actual web  
application)

I have just setup on server 1 spdy protocol:

server {

listen \*:443 ssl spdy;

location / {

proxy\_pass [http://someip](http://someip);  
}  
}

Now my question is with SSL and SPDY being terminated on the first  
server,  
do I still get the relevant performance improvement from using SPDY from  
the  
application that I am trying to use on server 2?

Does server 2 need SPDY enabled on nginx or does it not matter? Do I  
need to  
use proxy\_pass https:// or [https://someip:443](https://someip:443) (and thus SSL installed on  
server 2?) Do I need to add\_header alternative spdy on server 1?

On a related note, I am also planning on setting up load balancing on a  
seperate application. It will have load balancing setup on server 1,  
with  
ssl/spdy and then upstream to server 2/3/4/5/6 etc. Will I also get SPDY  
performance improvements?

Any comments/suggestions welcome!

Posted at Nginx Forum:

> **[SPDY, SSL termination and proxy\_pass](https://forum.nginx.org/read.php?2,244286,244286#msg-244286)**
>
> I have setup SPDY on my application and have observed some nice reductions in page load times. However in a production environment my setup is somewhat different. At the moment my setup looks like this: server 1 running nginx, terminates ssl and uses...

---

<div class="post-metadata">

**Author:** ![luckyknight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@luckyknight](https://www.ruby-forum.com/u/luckyknight)\
**Post date:** [October 31, 2013, 1:30pm UTC](https://www.ruby-forum.com/t/spdy-ssl-termination-and-proxy-pass/237242/2 "2013-10-31T13:30:11Z")

</div>

On Thursday 31 October 2013 14:01:20 luckyknight wrote:

> Now my question is with SSL and SPDY being terminated on the first server,  
> do I still get the relevant performance improvement from using SPDY from  
> the application that I am trying to use on server 2?

It’s likely, yes.

> Does server 2 need SPDY enabled on nginx or does it not matter? Do I need  
> to use proxy\_pass https:// or [https://someip:443](https://someip:443) (and thus SSL installed  
> on server 2?)

No, don’t need, unless you care about security between your servers.

> Do I need to add\_header alternative spdy on server 1?

Only if you also use plain http and want users switch to spdy when it’s  
possible.

> On a related note, I am also planning on setting up load balancing on a  
> seperate application. It will have load balancing setup on server 1, with  
> ssl/spdy and then upstream to server 2/3/4/5/6 etc. Will I also get SPDY  
> performance improvements?

You will.

wbr, Valentin V. Bartenev
