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

Web Deploy 3.6: Performance issues behind a firewall

使用 TeamCity 和 WebDeploy,我将网站远程发布到生产服务器。这是一个部署日志示例:

[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)

第一步 "Using ID [guid] for connections to the remote server" 似乎每次都有非常可预测且一致的 15 秒延迟。

使用 NETSTAT,这条信息脱颖而出:

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

在旧机器上,它不会尝试访问此 IP,所以这是意外的。我们将在下一次维护 window 中尝试修复防火墙规则,让它通过,看看是否可行,但 Web Deploy 在这里试图做什么?

打开 Port 80 以允许 msdeploy.exe 给家里打电话(或者它在那里做什么)修复了 15 秒的延迟问题。部署时间现在缩短到之前机器上的水平(每台服务器 2-3 秒)。