简体   繁体   中英

How to set up IIS request mirroring to staging environment?

I would like to have all HTTP requests made to my production environment be also automatically made against my testing environment. Eg 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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM