Your SlideShare is downloading. ×

Scaling @ REA

128
views

Published on

Learn how realestate.com.au scales through horizontal/vertical scaling, and judicious use of HTTP caching and CDNs.

Learn how realestate.com.au scales through horizontal/vertical scaling, and judicious use of HTTP caching and CDNs.

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
128
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Scaling @ REA Geoffrey Giesemann
  • 2. scaling aint easyno silver bullet, no secret sauce
  • 3. but Rails *can* scale!our first ever Rails app
  • 4. 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
  • 5. Vertical Scalin aka more RAMs plz
  • 6. HTTP Caching
  • 7. HTTP Caching 101Expiration:Cache-Control: public, max-age=60Validation:ETag: 1234567890abcdefLast-Modified: Thu, 30 Aug 2012 14:03:49 EST
  • 8. realestate.com.au/buyEmpty cache:Non-empty cache:
  • 9. ActionController::ConditionalGetclass 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 endend
  • 10. Content Distribution Networks (and S3 asset hosting)
  • 11. getting out of the static asset hosting business S3 is an infinite disk that is plugged in to the internetcan pretend youre not on S3 if you set up DNS appropriatelycurrently migrating all property images on to S3
  • 12. you can do with with Rails too!use jammit-s3 to compile/load your assets intoS3paperclip will let you upload into S3dragonfly support resizing with S3 caching
  • 13. scaling lessons learned simpler is easier to scale than complexparticularly if you can separate the reading/writing parts of your app when in doubt - test you do TDD right? scaling shouldnt be different
  • 14. scaling lessons learnedthe fastest request is the one you never make CDNs are awesomeprovided their edge nodes match the distribution of your users
  • 15. the cloud is coming to AUrackspace is building a DC in Sydney opening ~late 2012CDN and Route53 available in Sydney more on the way?
  • 16. Questions?