# What would it take to have smooth deployment on IIS?

**URL:** <https://www.ruby-forum.com/t/what-would-it-take-to-have-smooth-deployment-on-iis/136700>\
**Category:** Rails\
**Created:** [May 5, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/what-would-it-take-to-have-smooth-deployment-on-iis/136700 "2008-05-05T18:20:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpardee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e47c2d/32.png) [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Post date:** [May 5, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/what-would-it-take-to-have-smooth-deployment-on-iis/136700/1 "2008-05-05T18:20:40Z")

</div>

Hey All,

I’m learning rails in a microsoft shop, where asking for an apache  
install will be controversial. The bits I’ve been reading about how to  
install a rails app on IIS are fairly daunting, and I have this nagging  
feeling that it should be possible to crib something together w/ms’  
HTTPHandler stuff in [asp.net](http://asp.net). Probably this is just foolish, but can  
anybody recommend reading that would lay out some of the issues involved  
in having a rails server like mongrel talk to a web server?

Thanks!

-Roy

Roy P.  
Research Analyst/Programmer  
Group Health Center For Health Studies (Cancer Research Network)  
(206) 287-2078  
Google Talk: rpardee

---

<div class="post-metadata">

**Author:** ![rpardee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e47c2d/32.png) [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Post date:** [May 5, 2008, 6:44pm UTC](https://www.ruby-forum.com/t/what-would-it-take-to-have-smooth-deployment-on-iis/136700/2 "2008-05-05T18:44:38Z")

</div>

I didnt have any issues getting mongrel and IIS to cooperate.

I used [http://www.isapirewrite.com/](http://www.isapirewrite.com/) to rewrite the url to the mongrel  
instance.  
Its pretty similar to apache mod\_rewrite in terms of syntax.

Note that isapi\_rewrite does cost a pretty penny.  
[http://cheeso.members.winisp.net/IIRF.aspx](http://cheeso.members.winisp.net/IIRF.aspx) is a free alternative but I  
havent used it.

- Richard

---

<div class="post-metadata">

**Author:** ![rpardee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e47c2d/32.png) [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Post date:** [May 5, 2008, 6:59pm UTC](https://www.ruby-forum.com/t/what-would-it-take-to-have-smooth-deployment-on-iis/136700/3 "2008-05-05T18:59:06Z")

</div>

Well, I have no idea how to do this, but you need to start by  
researching how to use IIS as a proxy server. Here’s the concept of  
what happens when you use an Apahce/mongrel combo with 2 mongrel  
instances (called a “mongrel\_cluster”).

Request 1 -\> Apache -\> Mongrel 1 # Response -\> Apache -\> User  
Request 2 -\> Apache -\> Mongrel 2 # same  
Request 3 -\> Apache -\> Mongrel 1 # same

It doesn’t work exactly like a round-robin – that’s just for  
demonstration – it uses mod\_proxy\_balancer to balance the requests  
between all the mongrel instances. You can operate a small website  
off of one mongrel, but if you get 2 requests within the same quarter-  
second (or however long it takes mongrel to execute the first request)  
the second request will have to wait until the first finishes.

Also, remember that Apache runs on Windows, too – you’ll probably  
have to compile the appropriate modules, though.

Now for what you know your going to hear: I really don’t recommend  
this. A good Engineer (i.e. a good Software Engineer) chooses the  
right tool for the job. If the job requires Linux and Apache, that’s  
what you ought to use. Likewise, if the job requires IIS, that’s what  
you ought to use. Also, remember that the “right” tool is the one  
that is most efficient (both coding efficiency and running-  
efficiency), most secure, etc. Politics really isn’t a good measure  
of “rightness,” as a matter of fact, politics has a tendency to work  
against rightness.

–  
TekWiz

---

<div class="post-metadata">

**Author:** ![rpardee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e47c2d/32.png) [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Post date:** [May 5, 2008, 8:37pm UTC](https://www.ruby-forum.com/t/what-would-it-take-to-have-smooth-deployment-on-iis/136700/4 "2008-05-05T20:37:27Z")

</div>

Well, that’s promising. Can you say what docs you used to guide your  
setup? Thanks!

Yeah, the cost of isapi\_rewrite was a definite turn-off–kind of kills  
the FOSS buzz behind using ruby and rails (not that IIS doesn’t but at  
least that’s already bought). 😉

Thanks!

-Roy

---

<div class="post-metadata">

**Author:** ![rpardee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e47c2d/32.png) [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Post date:** [May 5, 2008, 8:29pm UTC](https://www.ruby-forum.com/t/what-would-it-take-to-have-smooth-deployment-on-iis/136700/5 "2008-05-05T20:29:47Z")

</div>

Thanks very much–I may try and look into this. I guess the (somewhat)  
tricky bit is to rejigger the URLs in the outgoing HTML stream so that  
they no longer refer to particular Mongrel instances (ports & so on) but  
rather to the IIS “application”. Ooh–and to convey cookies, request  
parameters, user agent strings, etc. from end users to the mongrels…  
Feh, that’s starting to sound like work. 😉

And totally well-taken on the ‘right tool’ stuff. I consider my effort  
an attempt to expand the toolbox here, but I am definitely sympathetic  
to our IT folks’ desire to not have lots of webservers to admin. I  
would really like to be able to tell them a lovely story about how rails  
can fit into our existing infrastructure w/out too much fuss or  
bother…

Thanks!

-Roy

---

<div class="post-metadata">

**Author:** ![rpardee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e47c2d/32.png) [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Post date:** [June 14, 2008, 9:08pm UTC](https://www.ruby-forum.com/t/what-would-it-take-to-have-smooth-deployment-on-iis/136700/6 "2008-06-14T21:08:42Z")

</div>

FYI

IIRF ([http://cheeso.members.winisp.net/IIRF.aspx](http://cheeso.members.winisp.net/IIRF.aspx) ) is an open-source  
project run on Codeplex: [www.codeplex.com/IIRF](http://www.codeplex.com/IIRF).  
There is someone else who used IIRF in a RoR scenario, look for  
[www.codeplex.com/RORIIS](http://www.codeplex.com/RORIIS). I know about IIRF, but not about RORIIS.

---

<div class="post-metadata">

**Author:** ![rpardee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e47c2d/32.png) [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Post date:** [May 5, 2008, 10:10pm UTC](https://www.ruby-forum.com/t/what-would-it-take-to-have-smooth-deployment-on-iis/136700/7 "2008-05-05T22:10:04Z")

</div>

I tried the stealth approach first: fired up a Linux server in VMWare  
on the IIS server. Once it proved it’s worth, it was not hard to get  
buy in for the server to be a full time player in the domain.
