Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Windows 下實作第 7 層軟負載經驗分享(3)

編輯:Win7 系統基礎知識

部署架構

RealServer1/2 部署返回用戶頭像服務,SoftProxy 部署第 7 層軟負載,TestClient1/2 部署 LoadRunner 測試。

測試模型

300 虛擬用戶,每用戶模擬 1000 客戶端,共 30 萬在線用戶,每 5 秒取一次頭像。

測試預期

SoftProxy 每秒處理 6 萬請求,CPU < 80%,記憶體 < 5GB。

其他問題與設定

  1. 客戶端 IP:RealServer 收到的是 SoftProxy 請求,需在轉發封包加 HTTP Header 傳遞客戶端 IP。
  2. 重導向、驗證、暫時回應、快取:設定 HttpWebRequest 相關屬性關閉不需功能:
httpRequest.ServicePoint.Expect100Continue = false;
httpRequest.ServicePoint.UseNagleAlgorithm = false;
httpRequest.AllowWriteStreamBuffering = false;
httpRequest.AllowAutoRedirect = false;
httpRequest.AuthenticationLevel = AuthenticationLevel.None;
httpRequest.AutomaticDecompression = DecompressionMethods.None;
HttpRequestCachePolicy noCachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore);
httpRequest.CachePolicy = noCachePolicy;
Copyright © Windows教程網 All Rights Reserved