varnish-cache:高效能反向 Proxy快取服務器和http加速器

來源:互聯網
上載者:User

標籤:varnish cache http

寫在前面:如果此文有幸被某位朋友看見並發現有錯的地方,希望批評指正。如有不明白的地方,願可一起探討。


varnish工作原理

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/4A/56/wKiom1QkQ-GBDNqHAAEEoemP03Q686.jpg" title="圖1" alt="wKiom1QkQ-GBDNqHAAEEoemP03Q686.jpg" />

如所示:varnish與一般伺服器軟體相似,分為master進程和child進程。master進程讀取儲存設定檔,調用合適的儲存類型,然後建立/讀入相應大小的快取檔案,接著master初始化管理該儲存空間的結構體,然後fork並監控child進程。child進程在主線程的初始化過程中,將前面開啟的隱藏檔整個mmap到記憶體中,此時建立並初始化空間結構體,掛到儲存管理結構體,以待分配。child進程分配若干線程進行工作,主要包括一些管理線程和多個worker線程。


varnish工作流程圖

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/4A/59/wKioL1QkR0CiEotsAAUy3oMCLMA694.jpg" title="圖2" alt="wKioL1QkR0CiEotsAAUy3oMCLMA694.jpg" />



簡單的varnish應用架構拓撲圖

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/4A/58/wKiom1QkTszRjaMnAAGn4OZpyuM876.jpg" title="圖3" alt="wKiom1QkTszRjaMnAAGn4OZpyuM876.jpg" />

待續...

varnish-cache:高效能反向 Proxy快取服務器和http加速器

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.