Your SlideShare is downloading. ×
  • Like
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply


Published in Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Fail Whale
  • 2. Scaling & RailsYou scale a website, not a framework
  • 3. Scaling SOPsGeneral Things Standard Operating Procedures for website scaling
  • 4. OODA Loop
  • 5. OODA Loop
  • 6. Observe New RelicClient (customers) needs User needs
  • 7. Rumsfeld
  • 8. Rumsfeld Known knowns Known unknownsUnknown unknowns
  • 9. Observe: Known knowns:What do we know that we know about clients?
  • 10. Observe: Known unknownsDo we know that we know at least afew pages users are likely to hit often?
  • 11. Observe: Known unknownsWe know users will use some features more than others.We dont know which ones they will be.
  • 12. Observe: Known unknownsWe know which devices they will be consuming the site with.We dont know the percentages for sure.
  • 13. Observe: Unknown unknownsWhat assumptions do we bring, and which of them may be wrong?
  • 14. OrientFocus on the known knowns
  • 15. OrientWe know the strategies:
  • 16. Orient Page CachingFragment Caching Action CachingDatabase Caching
  • 17. Decide Por ejemplo:To cache the landing page, or articles, or products Or All of the above
  • 18. Actclass ProductsController < ApplicationController caches_page :index, :show def index @products =[:page]).per_page(10) end def show @product = Product.find(params[:id]) end # Other actions omitted.end
  • 19. Actclass ProductSweeper < ActionController::Caching::Sweeper observe Product def after_update(product) expire_page products_path expire_page product_path(product) expire_page "/" FileUtils.rm_fr "#{page_cache_directory}/products/page" endend
  • 20. Iterate
  • 21. ObserveWhat do we learn from Httperf + Browsermob + Apache Bench + user feedback?
  • 22. ObserveWhat have we learned about our SOPs?
  • 23. ObserveWhich known unknowns have become Known knowns?
  • 24. ObserveWhich Unknown unknowns have become Known unknowns?
  • 25. OrientWhich techniques can be used to solve the known knowns?
  • 26. Iterate
  • 27. Mise en place
  • 28. [Miz on plas] Mise en place (pronounced [miz on plas],literally "putting in place") is a French phrase defined by the Culinary Institute of America as "everything in place", as in set up. It is used in professional kitchens to refer to organizing and arranging the ingredients (e.g., cuts of meat, relishes, sauces, par-cooked items, spices, freshly chopped vegetables, and other components) that a cook will require for the menu items that he or she expects to prepare during his/her shift.[1]
  • 29. GT mise en placeWhat might our developer kitchen look like? Our staging kitchen? Our production kitchen?
  • 30. Development kitchen Livereload Rspec Cucumber Caching is turned off
  • 31. Development kitchen Should we turn it on?
  • 32. Development kitchen Should we turn it on?
  • 33. Development kitchen HTTPerf & friends:Allow us to do load testing
  • 34. Development kitchen Apache bench$ ab -n 5 -c 5 requests is the number of requests-c concurrency is the number of multiple requests
  • 35. Development kitchen HTTPerf$ brew install httperf$ httperf --num-conns=20 --rate=10 --timeout=5--server=localhost --port=3000 --uri=/articles
  • 36. Development kitchen Autobench:Allows us to measure load testing On local machines
  • 37. Development kitchen Should each developer explicitlytest with caching turned on before pushing to master?
  • 38. Development kitchenOr is this inefficient and confusing?
  • 39. Development kitchen(Discuss, decide, act, observe, orient, iterate)
  • 40. Staging KitchenCI server runs test suite twice:
  • 41. Staging kitchenFirst Jenkins runs with caching off
  • 42. Staging kitchenThen Jenkins runs with caching turned on
  • 43. Staging kitchenThen code gets pushed to staging
  • 44. Staging kitchenShould features be accepted if they only pass with caching off?
  • 45. Staging kitchenIf so, we need a second environment,similar to staging, where caching is turned on.
  • 46. Staging kitchen(Discuss, decide, act, observe, orient, iterate)
  • 47. Production kitchenWhat process do we have in place to get user feedback?
  • 48. Production kitchenDo we rely on our tools?
  • 49. Production kitchenHow do we get user feedback?
  • 50. Production kitchenDo we get it from our clients, who are not our users?
  • 51. Production kitchenOr do we get it directly (somehow?)
  • 52. To be answered:1) Do we turn caching on indevelopment?2) Do we run tests against cachingbefore pushing?3) Do we accept features thathavent passed caching?
  • 53. Discuss