How to set up IIS request mirroring to staging environment?

别来无恙 提交于 2021-02-10 09:38:05

问题


I would like to have all HTTP requests made to my production environment be also automatically made against my testing environment. E.g. if anything makes a request to http://production.site.example.com/api/users/12345 then I want the same request to also be made against http://staging.site.example.com/api/users/12345 by some internal entity that sees the first request.

Is there an easy way to set this up in IIS without having to create a custom module or similar? If not, what is the best approach to take when creating such a module, so this does not cause any extra load on the production instance of my app?


回答1:


Not sure what specifically you're trying to achieve here but you might try with something simple such as implementing redirect in OnUnload event handler (I'm assuming you're using ASP.NET) that will redirect traffic to your test environment.

This way you get everything processed in your production environment and once that is completed you redirect request to test env. Again, not sure what specifically you're trying to do but I'd first try something simple like this using different redirects.



来源:https://stackoverflow.com/questions/14620883/how-to-set-up-iis-request-mirroring-to-staging-environment

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