IIS Staging and Production swap

落爺英雄遲暮 提交于 2021-02-08 21:01:10

问题


I'm researching a way to integrate a staging environment on our IIS Server, where it is possible to warm up the application before swapping it with the production environment.

The only real solution I can find is:

  1. Swapping directory settings

    • Which to me sounds like a slow process, because the IIS will have to compile and warmup the new dir after the swap. ( Am I assuming this correctly?)
  2. Have two sites, and swap the bindings, after staging has been warmed up.

  3. Having a load balancer, and swapping between two sites. This just seems to be overkill, since both websites would be on the same server.

The two first scenarios seem hacky, and error prone.

Obviously there must be something I am missing. So I turn to you, the experts!

Ps. We are on Windows Server 2012, IIS v8.0


回答1:


Options 1 and 2 are going to cause the iis app pool to recycle. This might or might not be a big deal depending on the type of business you run, how you handle sessions etc.

Option 3 seems like the more graceful option and gives you some flexibility if you ever want to scale out and add additional machines. And it's the easiest to explain to future developers already familiar with the pattern.

http://martinfowler.com/bliki/BlueGreenDeployment.html

It does however require you to access your load balance via Powershell or whatever integration tool you are using which might be tricky.



来源:https://stackoverflow.com/questions/39102207/iis-staging-and-production-swap

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