TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Nginx and Lua

61 点作者 transmit101超过 12 年前

7 条评论

Lasher超过 12 年前
Different application area but we implemented Lua into a MUD (online RPG) as the scripting interface for all area builder development and it was probably the single most valuable change we ever made. Check out the 'lua coding' section on Aardwolf.com if you want to see some examples. Over 200,000 lines of lua now, millions of prog executions per hour and still as fast as ever.
评论 #4465641 未加载
jot超过 12 年前
Can you provide us with an idea of how much this improved performance or how many more requests it allowed you to handle? Were there time or cost savings compared to alternative approaches?
评论 #4463860 未加载
评论 #4463992 未加载
slurgfest超过 12 年前
Is there any reason in principle why this has to be done with Lua and not with other interpreted languages?<p>Once you are writing interpreted code which reads request data and interacts with Redis you are not that far from what a normal Ruby or Python web app does anyway.
评论 #4464262 未加载
评论 #4464256 未加载
评论 #4464361 未加载
justincormack超过 12 年前
There is an introductory talk (video and slides) from the London Lua meetup group on Nginx and Lua here <a href="http://www.londonlua.org/scripting_nginx_with_lua/index.html" rel="nofollow">http://www.londonlua.org/scripting_nginx_with_lua/index.html</a>
评论 #4464505 未加载
kyrra超过 12 年前
So the idea is interesting, but I think adding something like this onto Nginx could lead to problems in the future.<p>For what you're trying to do, I feel like implementing your reverse proxy in Go may prove to be less prone to errors. Go has ReverseProxy stuff already built in: <a href="http://golang.org/pkg/net/http/httputil/#ReverseProxy" rel="nofollow">http://golang.org/pkg/net/http/httputil/#ReverseProxy</a><p>Go already has a pretty strong following doing near exactly what you are doing here with Nginx + Lua. But that would require learning a new language and screwing with infrastructure, which always is a giant pain.
评论 #4465532 未加载
评论 #4464341 未加载
评论 #4464352 未加载
rotation1超过 12 年前
Bit off topic but you might want to 301 redirect to the right page instead of just disallowing search engines on your subdomains. This way if someone links to the wrong page you will still get the link juice.<p>I might have misunderstood that first bit though, since it looks like you do redirect anyway.
评论 #4464663 未加载
sciurus超过 12 年前
It's nice to see how tight the lua integration into nginx is. It reminds me of Apache and mod_perl.