iT邦幫忙

0

FastCGI for Perl

我用Nginx和PHP-FPM, 以多進程fastcgi來跑PHP.
如果一樣用Nginx, 要讓fastcgi來處理Perl, 我找到的選擇有
(1)lighttp的spawn-fcgi, 最新的版本是20090923的1.6.3版, 我剛下載httpd 1.4.30來編譯, 已經沒有spawn-fcgi了, 請問lighttp丟棄了spawn-fcgi了嗎? 只能用2009年的舊版嗎? 還是用以下的方法?

(2)用nginx的ngx_http_fastcgi_module.

(3)用CPAN的fcgi+ FastCGI wrapper

請教Perl專家, 您建議用那一種? 或者有其他的建議?

我喜歡用Nginx, 但是很多人用Apache的fastcgi模組來跑, 可承受高負載嗎? 有沒有人用cherokee跑過?

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

4
wiseguy
iT邦超人 1 級 ‧ 2012-04-03 10:02:41
最佳解答

spawn-fcgi 非但沒有被 lighttpd 捨棄,還被提升為獨立的專案。意即它已經可以獨當一面,而不是 lighttpd 的附屬品而已。
http://redmine.lighttpd.net/projects/spawn-fcgi

如果你喜歡用 NginX,那就搭它的 ngx_http_fastcgi_module.,別的不說,自己搭配的方案一定有經過作者自己的調校。

Simple CGI 是未來可能取代 Fast CGI 的方案,協定更簡潔,所以更快速而穩定。只是問世時間不長,現在支援它的 Web Solution 還不多。

bizpro iT邦大師 1 級 ‧ 2012-04-03 10:33:06 檢舉

謝謝您的回答.

關於spawn-fcgi, 我知道它成了獨立的專案, 但是已經兩年多未更新了.

我會試試用Nginx的Simple CGI先, 謝謝您的提醒, 我初步檢查一下我要用的Web Solution, 剛好更新版用Simple CGI. 不過還是得先試試.

查了google, Ruby也建議用SCGI, 用的是ruby-scgi:
ruby-scgi is a Ruby library for running Ruby on Rails (and possibly other web applications) for high-speed deployment of your applications in production. It is intended as a replacement for the ancient FastCGI code base and bring some big advantages to Rails deployment for production operations.
但也發現scgi不支援socket, 只能用port, 除非是在hosting的環境, 應該沒差別:
One thing that SCGI doesn‘t support is using UNIX Domain sockets in addition to TCP/IP sockets. This isn‘t really needed, but it is handy in a shared hosting situation where you don‘t want others connecting to your processes or if you have to request open ports. Sorry, no UNIX Domain sockets in SCGI.

bizpro iT邦大師 1 級 ‧ 2012-04-03 10:34:21 檢舉

domain sockets

bizpro iT邦大師 1 級 ‧ 2012-04-12 13:31:10 檢舉

經過一週的測試, 最終還是用了spawn-fcgi.

我要發表回答

立即登入回答