Successfully reported this slideshow.
Your SlideShare is downloading. ×

Building for Scale!

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 38 Ad

Building for Scale!

Download to read offline

We all know it doesn’t take much to code up a simple application in Rails with mongo. But what happens when your app is a hit with your users? Simple things which were working just fine start behaving weirdly and the next thing you know your app is sluggish, crashing every few hours when the load spikes. This talk is a summary of all the things that i have encountered while taking our product from 0 to 5000+ users handling more than a million transactions on a daily basis. It covers simple rails patterns that scale, ones that fail, design patterns and system architecture that will help have a peaceful sleep at nights, designing your datastore for scale, better background processing with sidekiq, monitoring. Attendees can learn about all the ways their can fail so that they plan ahead for them.

We all know it doesn’t take much to code up a simple application in Rails with mongo. But what happens when your app is a hit with your users? Simple things which were working just fine start behaving weirdly and the next thing you know your app is sluggish, crashing every few hours when the load spikes. This talk is a summary of all the things that i have encountered while taking our product from 0 to 5000+ users handling more than a million transactions on a daily basis. It covers simple rails patterns that scale, ones that fail, design patterns and system architecture that will help have a peaceful sleep at nights, designing your datastore for scale, better background processing with sidekiq, monitoring. Attendees can learn about all the ways their can fail so that they plan ahead for them.

Advertisement
Advertisement

More Related Content

Recently uploaded (20)

Advertisement

Building for Scale!

  1. 1. - KIRAN NARASAREDDY CO-FOUNDER, DIRECTOR TECHNOLOGY @AMURATECH BUILDING FOR SCALE
  2. 2. 95M+ DOCUMENTS 2.5M+ DAILY TRANSACTIONS
  3. 3. AUDITION YOUR MODELS!
  4. 4. AUDITION YOUR MODELS! OPTIMISE YOUR SCHEMA FOR MOST FREQUENT USE CASES
  5. 5. AUDITION YOUR MODELS! LARGE NUMBER OF COLLECTIONS
  6. 6. AUDITION YOUR MODELS! DO STI FOR THE RIGHT REASONS
  7. 7. AUDITION YOUR MODELS! KEEP AN EYE ON DOCUMENTS SIZE
  8. 8. ITS OKAY NOT TO BE NORMALISED)
  9. 9. ITS OKAY NOT TO BE NORMALISED)
  10. 10. ITS OKAY NOT TO BE NORMALISED DO JOINS ON WRITE, NOT ON READ.
  11. 11. ITS OKAY NOT TO BE NORMALISED DON'T FEAR TO EMBED YOUR KID.
  12. 12. BUT..
  13. 13. SOMETIMES, ITS OKAY TO BE NORMALISED TOO! READ PERFORMANCE VS DATA DUPLICATION
  14. 14. SOMETIMES, ITS OKAY TO BE NORMALISED TOO! COMPLEX MODELLING / HIERARCHY
  15. 15. GET YOUR PRIORITIES RIGHT!
  16. 16. MONGODB <= 2.4 / MONGOID < 4.1
  17. 17. MONGODB >= 2.6 / MONGOID >= 4.1
  18. 18. PLEASE EXPLAIN!
  19. 19. PLEASE EXPLAIN! User .where(email:"***") .where(phone:"***")
  20. 20. PLEASE EXPLAIN! User .where(email:"***") .where(phone:"***") .explain()
  21. 21. PLEASE EXPLAIN! OMIT FIELDS IF FILTRATION< 90%
  22. 22. PLEASE EXPLAIN! COVER YOUR QUERIES
  23. 23. (SIDE)KIQ'D
  24. 24. (SIDE)KIQ'D
  25. 25. SIDEKIQ'D
  26. 26. SIDEKIQ'D
  27. 27. SIDEKIQ'D
  28. 28. SIDEKIQ'D LOAD BALANCER... CAUSE WE ARE LAZY!
  29. 29. SIDEKIQ'D ‣ MANAGE LATENCY ‣ WORKER LOAD
  30. 30. MAY THE FORCE BE WITH YOU KIRAN NARASAREDDY http://kco.re / @_kcore

×