TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Nginx Performance Tuning for SSL

46 pointsby pkandathilalmost 12 years ago
I am by no means a pro. Just sharing my experience with Nginx tuning.

8 comments

merittalmost 12 years ago
Sacrificing security in exchange for a minor performance boost. How does your domain score with <a href="https://www.ssllabs.com/ssltest/" rel="nofollow">https:&#x2F;&#x2F;www.ssllabs.com&#x2F;ssltest&#x2F;</a> after disabling those various ciphers?<p>Please read this discussion thread from 2 years ago for a discussion on the pros&#x2F;cons of this approach: <a href="https://news.ycombinator.com/item?id=2759596" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2759596</a>
评论 #6145228 未加载
JshWrightalmost 12 years ago
This again?<p>Yes.. disabling DHE ciphers will speed things up. Please understand the security implications of what you&#x27;re doing. The ephemeral Diffie-Hellman cipher suites are the only way to achieve that Perfect Forward Secrecy that&#x27;s been all the rage lately (sure, there are plenty of ways to screw it up even then, but it&#x27;s a prerequisite).<p>At least consider leaving tossing a few ECDHE ciphers at the start of the list. They&#x27;re plenty fast, and are a good foundation for providing PFS for your users.
riteshpatelalmost 12 years ago
Just compared our SSL config (<a href="https://www.theticketfairy.com/" rel="nofollow">https:&#x2F;&#x2F;www.theticketfairy.com&#x2F;</a>) to the one at the end of the article (based on HN recommendations) and pretty happy that it was already set to pretty much exactly that (apart from us having 100m for the SSL session cache rather than 10m) :)<p>One more thing I&#x27;d advise is adding this directive if you&#x27;re running Nginx 1.3.7 or higher:<p>ssl_stapling on;<p>The tech behind this is explained here: <a href="http://blog.cloudflare.com/ocsp-stapling-how-cloudflare-just-made-ssl-30" rel="nofollow">http:&#x2F;&#x2F;blog.cloudflare.com&#x2F;ocsp-stapling-how-cloudflare-just...</a><p>Lastly, if you can be bothered to build Nginx 1.4 (1.4.2 is the latest version at the time of writing), you can enable SPDY support as well.
WatchDogalmost 12 years ago
Perhaps someone more experienced can clarify, but is the gist of this article basically sacrificing perfect forward secrecy for more performance?
评论 #6144705 未加载
评论 #6144354 未加载
seijialmost 12 years ago
Good to see my conclusions from two years ago still hold: <a href="http://matt.io/technobabble/hivemind_devops_alert:_nginx_does_not_suck_at_ssl/ur" rel="nofollow">http:&#x2F;&#x2F;matt.io&#x2F;technobabble&#x2F;hivemind_devops_alert:_nginx_doe...</a> (or its HN thread meritt kindly dug up: <a href="https://news.ycombinator.com/item?id=2759596" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2759596</a>)<p>Sadly, these days we want PFS everywhere to stop the snooping apparati, but if you&#x27;re not <i>really</i> important and just want to stop local network or MiTM snooping, removing PFS should be okay (at least for my boring sites).
评论 #6144953 未加载
erichurkmanalmost 12 years ago
I am always extremely wary of any configuration changes that alter encryption algorithms. A simple typo can mean going from the exclusion of a weak cipher to the explicit inclusion of it.<p>One of the performance perks comes from the session cache. Is there an effective way to share that cache between machines serving on the same hostname? For instance: ten servers all serving round robin requests for www.example.com.
jeekajooalmost 12 years ago
&lt;quote&gt;Change your SSL cipher settings to this: ssl_ciphers ALL:!kEDH!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; &lt;&#x2F;quote&gt;. SSLv2 is flawed (<a href="http://en.wikipedia.org/wiki/Transport_Layer_Security#SSL_1.0.2C_2.0_and_3.0" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Transport_Layer_Security#SSL_1....</a>). He should disable it.
评论 #6144271 未加载
ceejayozalmost 12 years ago
&gt; The web server is running on an EC2 t1.micro instance.<p>Why do people do this?! t1.micros run beautifully at load for 30 seconds then essentially stop entirely for a while... not to mention having much slower internet than even a m1.small.
评论 #6144872 未加载
评论 #6145111 未加载