RailsConf Recap III: Hosting and the Woes 0

Posted by timgoh
on Sunday, June 15

This is third in a series of (very late1) RailsConf notes.

Previous recaps:
  1. Custom Nginx modules
  2. Fuzed

Hosting and the Woes

Speakers: Ezra Zygmuntowicz, Jamie van Dyke, Tom Mornini, Taylor Weibley of Engineyard

Primary Materials:
  • Annotated slides (pdf) here
  • Slideshare version here
Additional Resources:
  • eycap gem : $ sudo gem install eycap --source http://gems.engineyard.com
  • Drew Blas’s summary of the same talk

Rating2: A. Pretty much. Yes for B, C, D.

Jamie’s annotated slides pretty much pre-empt any of the notes I took, so that’s what you should be reading for the talk proper. The value-add I have is that of notes for Q&A. I had difficulty noting down the questions verbatim, but I’ve tried to capture as much of their intent as possible.

Q: Memory footprint between ebb/thin/mongrel?

A: Ebb is very fast, but not production ready. Thin, being evented, doesn’t work as well with long actions3. That said, the differences between the 3 servers are trivially insignificant compared to app code: caching, architecture, etc.

“Choice of application server does not determine your scalability”

In the real world, expect around 13% performance increase.

More than 4 cpus/core is wasted, and needing more RAM for mongrels is a common misconception.

“There is no reason to run more than 3 mongrels”

Q: Why no mention of nginx?

A:

“This talk was about woes encountered with hosting. We haven’t really had any problems with nginx.”

“I have seen nginx serve 40mb of static images a second and not show up in top”

(Thanks to Giles Bowkett for refreshing my memory on the second quote—I did not have it verbatim in my notes.)

Q: How best to handle static files

A: EY uses RedHat’s Global File System against SAN-mapped storage. Sharing static files allows cached files and uploads to be available to the entire cluster immediately.

Q: How best to handle asynchronous processing

A: Originally EY used BackrounDrb (natively developed by Ezra). Now they’re using BackgroundJob , or BJ. According to EY,

“BJ is pleasurable”

I don’t think anyone can argue with that!

Q: HTTP1.1 Keep-Alive with Nginx

A: Browsers should make multiple requests, if they do, practically no difference between HTTP 1.0 and HTTP 1.1

My notes for this question and its answer are rather different from Drew Blas’s, and I can’t remember in enough detail to decide between the two. That and my notes for this are very sketchy. Maybe if someone else who attended the talk chimed in?

Q: How is load distributed across servers in server farm?

A: It is basically a mapping of physical load balancing to virtual load balancing. You quickly forget about the virtualization except when you need it in a virtualized environment with very high I/O throughput. One service per host is not ideal application architecture—you should have more than one of everything on each slice (nginx, mongrels, etc)

Q: Does EngineYard have an SLA?

A: Actually instead of the answer I’m going to bait and switch, substituting it with a mini-rant. This is exactly the kind of question you should not ask in a public venue. There are a lot of people who can answer that question besides the panelists from EY. It is an FAQ type question. It is a question that can be answered by anyone at the huge EY booth. So please, if you have a chance to ask questions at conferences, ask yourself: (a) is this useful for anyone else on the floor? (b) is this something I can easily find out from somewhere else?

And that’s it for the Q&A.

There probably isn’t any conflict of interest in this post, but for completeness I should disclose that my company uses EngineYard for various client projects, including 3 of the top 100 Rails sites (traffic-wise). Working with EY has been a great experience—plus there’s lots that can be learned about sysadmin and Ruby-related deployments just by looking at the way they organize things.


1 I’ve had two severe bouts of clientitis in the weeks following RailsConf.

2 See first recap for explanation of ratings

3 Ebb and Thin currently both have ways of dealing with long running requests. See Ezra’s post for details.