天天看點

Nginx sendfileNginx-sendfile

Nginx-sendfile

Nginx處理靜态檔案是非常有優勢的,因為sendfile原因

1、原來HTTP Server服務采用什麼機制傳輸檔案?

Nginx sendfileNginx-sendfile

每次傳輸檔案都需要經過User space。

2、現在HTTP Server服務采用什麼機制傳輸檔案?

Nginx sendfileNginx-sendfile

靜态檔案其實不需要過多的經過User space的邏輯

Linux在2.2版本出來的零拷貝技術模式

在檔案的傳輸隻通過Kernel space,然後到Socket,最後響應給使用者

Nginx在處理靜态檔案時候的性能要比其他web服務高很多

Nginx下一小節:Nginx 快速安裝

繼續閱讀