那些大家常忽略的 Cache-Control

kewang

Funliday CTO

對各種前後端技術均有涉獵,擅長領域為 Java、HBase (Hadoop ecosystem)、Android、Node.js、PHP

目前喜歡鑽研 Git workflow、CI/CD、DevOps、資料分析等軟技術

大家在開發完一個網路服務之後,所謂的效能最佳化常常就是畫面調整、資料庫反正規化、讀寫分離、業務分離、加 MQ、加 Redis......不計其數的各種最佳化手段。但對於 HTTP 規範中的 Cache-Control 就比較常忽略。

Cache-Control 可以幫助 client 減少發送不必要的 request,也可以幫助 server 減少不必要的資料庫存取。有效提高 server 的 throughput。

這個 talk 除了介紹 Cache-Control 的運作原理外,也會展示如何利用常見的 framework 整合 Cache-Control 及 in-memory store 提高你的 server 效能。

也會分享如何利用 ZooKeeper 來解決多台 server 在 invalidate cache 之後,in-memory store 不一致的同步問題。

#http #cache #cachecontrol #zookeeper #curator

1. 本場次為中文