調整 php-fpm & nginx 參數,讓 Server 可以承受更大的流量
因為準備上線的系統有可能遇到大流量的情境,所以上線前先用 Apache Bench 來做測試;不測還好,一測發現在連線數 100、request 數量 10000 的條件下 Call POST API,居然有 50% 的 request fail,如果把這樣的系統上線肯定會出包,所以來研究如何調校 php-fpm & nginx 的參數,讓 Server 在硬體不升級的狀態下盡可能承受最大的流量。
如果對壓力測試不熟悉的朋友,可以參考筆者先前分享的文章:「Apac…