6. do we need to scale?
$ siege -t 60s list_of_urls.txt
** SIEGE 2.72
** Preparing 15 concurrent users for battle.
The server is now under siege...
pay attention to:
● transaction rate
● throughput
● concurrency
13. ActionController::ConditionalGet
class DooHickeyController < ApplicationController
def show_something
expires_in 1.day
@doo_hickey = DooHickey.find(params[:id])
if stale?(:etag => @doo_hickey,
:last_modified => @doo_hickey.updated_at
)
@doo_hickories = @doo_hickey.children # expensive
repond_to do |format|
# etc...
end
end
end
end
15. getting out of the static asset
hosting business
S3 is an infinite disk that is plugged in to the
internet
can pretend you're not on S3 if you set up DNS
appropriately
currently migrating all property images on to S3
16. you can do with with Rails too!
use jammit-s3 to compile/load your assets into
S3
paperclip will let you upload into S3
dragonfly support resizing with S3 caching
17. scaling lessons learned
simpler is easier to scale than complex
particularly if you can separate the reading/writing parts of
your app
when in doubt - test
you do TDD right? scaling shouldn't be different
18. scaling lessons learned
the fastest request is the one you never make
CDNs are awesome
provided their edge nodes match the distribution of your
users
19. the cloud is coming to AU
rackspace is building a DC in Sydney
opening ~late 2012
CDN and Route53 available in Sydney
more on the way?