- 論壇徽章:
- 2
|
本帖最后由 sophistcxf 于 2015-07-30 21:27 編輯
我弄不清這個(gè)兩個(gè)關(guān)系和區(qū)別。
維基百科說(shuō) FastCGI是一種標(biāo)準(zhǔn),而不是實(shí)現(xiàn)。那么實(shí)現(xiàn)是什么呢?于是搜到了Open Market的FastCGI和spawn-fcgi,Open Market提供的好像是一個(gè)庫(kù),而spawn-fcgi是一個(gè)服務(wù),調(diào)用Open Market的庫(kù)是與nginx交互嗎?nginx的實(shí)現(xiàn)是不是也調(diào)用了Open Market提供的API?
維基百科有這么一句話:Instead of creating a new process for each request, FastCGI uses persistent processes to handle a series of requests. These processes are owned by the FastCGI server, not the web server.
我看了spawn-fcgi的源碼,確實(shí)是fork了子進(jìn)程執(zhí)行cgi程序,與這句描述匹配。那么是不是可以把spawn-fcgi理解為FastCGI server?spanw-fcgi是fastcgi的一個(gè)實(shí)現(xiàn)嗎?
按我的理解,nginx與spawn-fcgi交互,spawn-fcgi與cgi程序交互。
或者是這個(gè)的流程,nginx與spawn-fcgi建立連接,然后spawn-fcgi的子進(jìn)程(cgi程序)都監(jiān)聽此socket,競(jìng)爭(zhēng)響應(yīng)。
另外,nginx和spawn-fcgi配合使用,是不是說(shuō)明nginx本身沒(méi)有實(shí)現(xiàn)fcgi?
不知道我上面的理解對(duì)不對(duì),著實(shí)弄不清這兩個(gè)概念。
多謝。
PS:我沒(méi)權(quán)限發(fā)URL,返回來(lái)后編譯的字全沒(méi)了。。。是我處理的方法不對(duì)么?不會(huì)這么Low吧。。 |
|