简体   繁体   中英

Understanding iis routing with ARR and Url Rewrite

I know how to configure IIS using URL Rewrite in combination with Application Request Routing in order to share an URL between different services running on different ports on one machine. Or rather I usually get it working after some tweaking. However I don't really understand and am unable to explain why it works that way. For example, I don't understand why ARR is needed in addition to Rewrite.

I can't find either ARR or Rewrite between the list of Handlers, but I guess they hook in at a higher level (before any handler is reached). ARR is only available at root level, while rewrite can also be done on a site node, so I assume that ARR is the first to receive a request?

I do find many resources on how to set it up, but nothing explaining how or why it works. Could someone explain the flow? Which module (Rewrite or ARR) gets the request first, and how does it flow through the system? When would one use only one of these modules separately?

As the acronym of ARR indicates, it's all about routing the requests. Typically, you can have ARR server(s) as a first entry point for all the requests coming to your company. ARR will then either redirect or route them to the right server farm. For applying this logic, ARR provides usage of regular expressions, back-references, you can also make use of conditions and all of this is structured in rules.

In my opinion, this is a much more powerful system developed to handle this kind of large-scale environment. Rewrite module is - I think - much simpler and only a subset of all we can do in ARR ; the goal is probably not the same.

I hope it helps. At least it's what I've seen from my own experience with ARR, mainly.

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