将 cgi 更改为 Fastcgi

发布于 2024-07-06 18:35:41 字数 138 浏览 9 评论 0原文

将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

把梦留给海 2024-07-13 18:35:42

切换到 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文