Improve SSL Performance with Nginx

I had some performance problems in nginx and incapsula and i found that the problem was related with the cipher used. Incapsula was connecting with DHE-RSA-AES128-SHA and that gave low performance and high load on the server. I use the "Intermediate list" in https://wiki.mozilla.org/Security/Server_Side_TLS and done some stress tests with the ciphers and got this results for the ones that worked:

Cipher                      Worst response time
DHE-RSA-AES128-SHA         15.745s
DHE-RSA-AES256-SHA         15.271s
AES128-SHA                 1.421s
AES256-SHA                 1.765s  
DES-CBC3-SHA               1.459s

So as you can see, DHE-* where working badly, but AES128-SHA is working fine. So if you think you have performance problems, build a stress test with a few hundred or thousands connections and configure nginx to just use one cipher. you should be able to see if any cipher is working bladly and try to disable it (do not forget to test the final setup against your clients, or use ssllabs test to see if you are not blocking your users)