Web部署3.6:防火墙后的性能问题

问题描述:

使用TeamCity和WebDeploy,我将网站远程发布到生产服务器。这里有一个部署的例子日志:Web部署3.6:防火墙后的性能问题

[15:48:24][Step 11/18] Deploying to Web Server 1 (2s) 
[15:48:24][Deploying to Web Server 1] Deploying to Web Server 1: 
[15:48:24][Deploying to Web Server 1] Info: Using ID 'e7a113e6-5dbd-4ed4-887a-156af88f7403' for connections to the remote server. 
[15:48:25][Deploying to Web Server 1] Info: Using ID 'ad9a7a1a-0adb-45f6-bdde-e4d7157b4eb1' for connections to the remote server. 
[15:48:26][Deploying to Web Server 1] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied) 
[15:48:26][Step 11/18] Deploying to Web Server 2 (3s) 
[15:48:26][Deploying to Web Server 2] Deploying to Web Server 2: 
[15:48:26][Deploying to Web Server 2] Info: Using ID 'b8218d7a-5fa0-4152-8e6b-c467ee86267e' for connections to the remote server. 
[15:48:28][Deploying to Web Server 2] Info: Using ID '2f02aa87-5e5c-4305-90d5-f82a549ffca3' for connections to the remote server. 
[15:48:29][Deploying to Web Server 2] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied) 
[15:48:29][Step 11/18] Deploying to Web Server 3 (2s) 
[15:48:29][Deploying to Web Server 3] Deploying to Web Server 3: 
[15:48:29][Deploying to Web Server 3] Info: Using ID 'e5457237-4632-46da-a7b6-3cb1a7d5078e' for connections to the remote server. 
[15:48:31][Deploying to Web Server 3] Info: Using ID '28b3725e-00e6-43b4-a014-523279678d9b' for connections to the remote server. 
[15:48:32][Deploying to Web Server 3] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied) 

我们感动我们的部署代理到一个新的机器,但现在有运行WebDeploy在我们所有的网站巨大的延迟,即使它(有效)部署了什么:

[15:46:53][Step 11/18] Deploying to Web Server 1 (17s) 
[15:46:53][Deploying to Web Server 1] Deploying to Web Server 1: 
[15:46:54][Deploying to Web Server 1] Info: Using ID 'e55ed14a-0557-4300-b25d-3fbb39907b3b' for connections to the remote server. 
[15:47:10][Deploying to Web Server 1] Info: Using ID '0cdfb2b4-e435-492a-9157-caee13b27962' for connections to the remote server. 
[15:47:11][Deploying to Web Server 1] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied) 
[15:47:11][Step 11/18] Deploying to Web Server 2 (18s) 
[15:47:11][Deploying to Web Server 2] Deploying to Web Server 2: 
[15:47:12][Deploying to Web Server 2] Info: Using ID '53691c36-9c65-4ce4-aad9-3f8e52fefd87' for connections to the remote server. 
[15:47:28][Deploying to Web Server 2] Info: Using ID 'afccf558-e1f4-4abf-90c6-c1bbef6c4434' for connections to the remote server. 
[15:47:29][Deploying to Web Server 2] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied) 
[15:47:29][Step 11/18] Deploying to Web Server 3 (18s) 
[15:47:29][Deploying to Web Server 3] Deploying to Web Server 3: 
[15:47:30][Deploying to Web Server 3] Info: Using ID '35a92c74-ac2b-4d02-af1d-6eac7a53405a' for connections to the remote server. 
[15:47:46][Deploying to Web Server 3] Info: Using ID '0e73566a-8692-4849-9a79-3c4afec7089b' for connections to the remote server. 
[15:47:47][Deploying to Web Server 3] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied) 

首先,“使​​用ID [guid]连接到远程服务器”步骤似乎每次都有非常可预测和一致的15秒延迟。

用netstat,这条信息站了出来:

TCP 192.168.XXX.XXX:58265 23.47.144.26:80  SYN_SENT 
[msdeploy.exe] 

在旧机器,它不会尝试访问该IP,所以这是出乎意料的。我们将尝试在我们的下一个维护时段修复防火墙规则,让它通过以查看是否可行,但Web Deploy尝试在此处做什么?

开放Port 80允许msdeploy.exe给家里打个电话(或者是在那里做什么)修复了15秒的延迟问题。部署时间现在降到前一台机器上所见的时间(每台服务器2-3秒)。