SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Zealot Zaskoda's Avatar
    Join Date
    Jun 2005
    Location
    Texas
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    speed question regarding Instant Rails

    A co-worker and I recently started examining RoR development. On a recommendation, we installed instant rails to start playing with.

    We've notice that the server is horribly slow to respond, at least with CRUD stuffs.

    Is this Instant Rails related, CRUD related, a fluke, or is Ruby really just that slow?

  2. #2
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If its using WEBrick then it will be slow, but its not designed for production.

    You are better off using lighttpd or mongrel, both of which work great for development as well as in production.

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    Oklahoma
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Zaskoda
    A co-worker and I recently started examining RoR development. On a recommendation, we installed instant rails to start playing with.

    We've notice that the server is horribly slow to respond, at least with CRUD stuffs.

    Is this Instant Rails related, CRUD related, a fluke, or is Ruby really just that slow?
    It depends how you've got Instant Rails configured to run your apps. If it's via WEBrick then yes, it's probably pretty slow. But if you configure the built-in SCGI support, then it should run at a very acceptable speed.

    Or do as Luke suggested and install Mongrel, and use the InstantRails console to start Mongrel as your app server. There are lots of choices, check The InstatRails Wiki for more information.

  4. #4
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are in development mode (a Rails environment variable) Rails will reload your application on every request. This is good for development because you make a lot of changes, but it's slow.

  5. #5
    throw me a bone ... now bonefry's Avatar
    Join Date
    Nov 2004
    Location
    Romania
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've had many stability issues with Lighttpd.
    I really do not recommend it for production environments.

    If you have Apache 1.3, you can use the fastcgi module which is stable on Apache 1.3 but not really recommended on Apache 2.

    Personally I use Apache 2 + mod_proxy + mod_proxy_balancer + 2 or 3 Mongrel instances.
    Worked great up until now.


    PS: if you are using CGI, yes it will be really slow, because Rails was not designed with CGI in mind. But I found that my newest Rails apps are faster than some of my old PHP apps, using the configuration I talked about above.

    So don't worry about it.

  6. #6
    SitePoint Guru 33degrees's Avatar
    Join Date
    May 2005
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mongrel and apache is becoming the prefered way to deploy rails apps, and a fair amount of work is currently being done to make it perform well.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •