将 cgi 更改为 Fastcgi
将 C/C++ cgi 应用程序更改为 Fastcgi 的可行性如何? 这只需要更改代码吗? 或者是否需要更改 apache 服务器的设置?
变革将带来哪些明显的好处? 从 cgi 到 Fastcgi 的改变是否值得带来这些好处?
How feasible is to change a C/C++ cgi application to Fastcgi? Does this require only change in code? Or will it require a change in the setup of apache server?
What will be the obvious benefits of the change? Is the change from cgi to Fastcgi worth the benefits?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
切换到 FastCGI 的主要好处是您的应用程序将在后台持续运行,而不是针对每个请求启动。 如果您的应用程序有大量初始化,那么通过减少这些时间您可以看到速度的大幅提升。
它需要重新配置Apache,但这并不复杂。 它应该需要更改您的应用程序,因为现在每个服务器只有一个实例,而不是每个请求一个实例。 你必须自己决定这种改变是否可行; 这实际上取决于您的代码的结构。
The major benefit of switching to FastCGI is that your application will run continuously in the background, instead of being started for each request. If your app has a lot of initialization, you could see a big speed boost by cutting out that time.
It will require reconfiguring Apache, but it's not complex. And it should require changing your app, because now there's only one instance per server, not one instance per request. You'll have to decide for yourself if that change is feasible; it really depends on how your code is structured.