Slides: EC2, MapReduce, and Distributed Processing (RailsConf Europe 2008)

Posted by Jon
on Tuesday, September 09

Here are the slides from my RailsConf Europe talk on MapReduce and EC2. Not sure how much sense they make without the narration, but at least you can appreciate my fantastic drawing skills!

Attachment_fu timeouts on EC2

Posted by Bruno
on Friday, July 06

Quick note: running into timeouts when uploading photos to S3 using attachment_fu on EC2 (that’s a mouthful)?

I think I tracked down the problem. Actually, I tracked down someone else who tracked down the problem: http://rubyforge.org/pipermail/amazon-s3-dev/2007-April/000072.html

Turns out the default for the aws/s3 library is to use persistent connections, which apparently cause intermittent timeouts.

Solution: use non-persistent connections by doing this in your attachment_fu/backends/s3_backend.rb:

          Base.establish_connection!(
            :access_key_id     => s3_config[:access_key_id],
            :secret_access_key => s3_config[:secret_access_key],
            :server            => s3_config[:server],
            :port              => s3_config[:port],
            :use_ssl           => s3_config[:use_ssl],
            :persistent        => s3_config[:use_persistent]
          )

Then you can add a line to your amazon_s3.yml like this:

production:
  bucket_name: your_app_production
  access_key_id: 'YOUR_ACCESS_KEY_ID'
  secret_access_key: 'YOUR_SECRET_ACCESS_KEY'
  use_persistent: false

Deploying Rails on EC2

Posted by Bruno
on Thursday, April 05

Who is this EC2, and is he related to that robot from Star Wars?

Um … no. EC2 stands for “Elastic Compute Cloud”; it’s a “web service designed to make web-scale computing easier for developers.” Try telling your mom that.

In mom-speak: EC2 is a way to cheaply and quickly set up virtual computers. That means you could set up a virtual machine running Fedora Core with RMagick, LAME, and ffmpeg, and then add 15 more instances at the click of a mouse.

OK, my mom still won’t care, but if you’re building a YouTube MeToo, then you probably will. Why?