Is the entire package uploaded to MsDeploy.axd?

旧街凉风 提交于 2019-12-22 04:43:11

问题


Can anyone confirm (preferably with a link to docs) whether MSDeploy packages are uploaded in their entirety before the files are sync'd or does the sync occur between msdeploy.exe and msdeploy.axd (with only modified files being uploaded)?

Or, to put it another way, if I have a 1GB package zip that only contains 1MB worth of changed files will msdeploy upload the entire 1GB package to MsDeploy.axd and perform the sync on the server or will it only upload the 1MB worth of changed files?


回答1:


Is this documentation official enough for you to trust that the behavior you observed is deterministic?

http://www.iis.net/learn/publish/using-web-deploy/introduction-to-web-deploy

Section "How does Web Deploy compare to FTP?", point 1:

Web Deploy is faster than FTP. Web Deploy does not issue a different command for each operation. Instead, it does a comparison at the start of the sync and only transfers changes.




回答2:


Here is an answer from a Microsoft employee on a similar question: http://forums.asp.net/post/4361026.aspx

Also, here is a very helpful writeup that details the process of how the packages are assembled: http://blog.winhost.com/using-msdeploy-to-publish-your-site/




回答3:


Since it's difficult to get MSDeploy to run through a proxy, I've made the process more obvious by simply using a huge file (750MB).

For the Agent Service (http://localhost:80/MsDeployAgentService), I can confirm that it does not upload the entire package. If I remove the file from the server (localhost), the deployment takes ~25 seconds. Once the file is already there, the deployment is almost instantaneous. Given my machines specs, there's no way it transferred 750mb into memory in that time (let alone transferred it over HTTP).

Update I can also confirm the same behavior when deploying to a remote (albeit same network) MsDeploy.axd service. Initial deployment was 50 seconds, next deployment was < 1 second.

Update 2 Kristina Olson of the IIS team confirmed this in her comment:

Web Deploy does its incremental sync in 2 parts, so in 1st part it sends just metadata about the file content in the package to determine which files actually need updating, so that in 2nd part only those incremental update files are sent over the wire. Basically metadata about every file (things like name, size, write-time) is sent over the wire, but the actual file content is not unless the file needs updating



来源:https://stackoverflow.com/questions/12273055/is-the-entire-package-uploaded-to-msdeploy-axd

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!