# Switching from Webrick-\>Mongrel (not rails)

**URL:** <https://www.ruby-forum.com/t/switching-from-webrick-mongrel-not-rails/147156>\
**Category:** Ruby\
**Created:** [August 28, 2008, 9:50pm UTC](https://www.ruby-forum.com/t/switching-from-webrick-mongrel-not-rails/147156 "2008-08-28T21:50:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnpetterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/41988e/32.png) [@johnpetterson](https://www.ruby-forum.com/u/johnpetterson)\
**Post date:** [August 28, 2008, 9:50pm UTC](https://www.ruby-forum.com/t/switching-from-webrick-mongrel-not-rails/147156/1 "2008-08-28T21:50:13Z")

</div>

Hi,

For performance reason, I’m thinking of migrating my webapp (not rails)  
from Webrick-\>Mongrel. Couple of questions if anybody could quickly  
answer them !

1. Do I really have to re-write my Servlets ? - the examples given on  
webrick and Mongrel site seem to have different APIs?

2. The Webrick site has a nice small example of starting up a webserver  
and mounting a couple of servlets: so does the Mongrel site. The Webrick  
version contains a ‘trap’ (so you can ‘CTRL-C’ to stop it): the Mongrel  
version doesn’t (and the ‘trap’ code doesn’t translate…)

Anybody got a simple example of a Mongrel.rb file to start up a server  
and to make it interruptible with a ‘CTRL-C’ (etc) ?

Thanks !

John

---

<div class="post-metadata">

**Author:** ![johnpetterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/41988e/32.png) [@johnpetterson](https://www.ruby-forum.com/u/johnpetterson)\
**Post date:** [August 29, 2008, 8:35am UTC](https://www.ruby-forum.com/t/switching-from-webrick-mongrel-not-rails/147156/2 "2008-08-29T08:35:10Z")

</div>

> Anybody got a simple example of a Mongrel.rb file to start up a server  
> and to make it interruptible with a ‘CTRL-C’ (etc) ?

Check out the mongrel docs and example files–I think there’s one in  
there.  
-=R
