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.

Optimizing Nginx for High Traffic Loads

95 pointsby ichiltonabout 14 years ago

8 comments

morganpyneabout 14 years ago
I would also recommend that you gzip any static assets and use <a href="http://wiki.nginx.org/HttpGzipStaticModule" rel="nofollow">http://wiki.nginx.org/HttpGzipStaticModule</a> to serve these pre-gzipped files.<p>No point in re-compressing the same files over and over again. I normally gzip all static assets as part of the deployment process.
评论 #2503056 未加载
评论 #2502172 未加载
patio11about 14 years ago
Note the absence of any particular setting which will cause it to crash if you get a link to your blog retweeted.<p><i>glares at Apache</i>
not_chriscohoatabout 14 years ago
Some useful Nginx optimizations, but I've always found that the bottlenecks are far worse elsewhere. Nginx is a champ at serving static files, and I have it proxy all requests upstream to Apache (and use mod_wsgi because the majority of what I work with are Django apps). Optimizing the DB schema and queries have had the most positive performance increases by far, followed by Apache tweaks, and then finally Nginx config changes. But I really love the setup I use for how easy it is to get a Django app spun up.
clemeshaabout 14 years ago
If your app uses a database, you've got bigger problems than optimizing Nginx for high traffic loads.<p>That said, I absolutely love Nginx because it's so damn lightweight, and easy to setup and maintain.
评论 #2502043 未加载
评论 #2502005 未加载
brendoncrawfordabout 14 years ago
<i>&#62; The biggest optimization happened when you decided to use Nginx and ran that apt-get install...</i><p>I recommend against doing this on Ubuntu Lucid without first installing the unofficial nginx PPA, unless you want to get stuck with v0.7.65.
评论 #2503233 未加载
评论 #2502509 未加载
评论 #2502038 未加载
originalgeekabout 14 years ago
I think he's got a little math problem. Many browsers will open up to 4 connections (possibly more, if config tweaked) to overlap requests for content, so you might want to consider this when configuring your worker_connections.
评论 #2502786 未加载
评论 #2502454 未加载
anto1neabout 14 years ago
too bad there's not so much said about optimizing latency, serving a lot of traffic is not that difficult, but getting the best latency to serve your files 50ms faster can make a big difference
评论 #2502751 未加载
knownabout 14 years ago
Optimizing == Customizing as per your business needs