際際滷

際際滷Share a Scribd company logo
- KIRAN NARASAREDDY
CO-FOUNDER, DIRECTOR TECHNOLOGY
@AMURATECH
BUILDING FOR SCALE
95M+
DOCUMENTS
2.5M+
DAILY
TRANSACTIONS
Building for Scale!
AUDITION YOUR MODELS!
AUDITION YOUR MODELS!
OPTIMISE YOUR SCHEMA FOR MOST
FREQUENT USE CASES
AUDITION YOUR MODELS!
LARGE NUMBER OF COLLECTIONS
AUDITION YOUR MODELS!
DO STI FOR THE RIGHT REASONS
AUDITION YOUR MODELS!
KEEP AN EYE ON DOCUMENTS SIZE
Building for Scale!
ITS OKAY NOT TO BE
NORMALISED)
ITS OKAY NOT TO BE
NORMALISED)
ITS OKAY NOT TO BE
NORMALISED
DO JOINS ON WRITE, NOT ON READ.
ITS OKAY NOT TO BE
NORMALISED
DON'T FEAR TO EMBED YOUR KID.
BUT..
SOMETIMES, ITS OKAY TO BE
NORMALISED TOO!
READ PERFORMANCE VS DATA DUPLICATION
SOMETIMES, ITS OKAY TO BE
NORMALISED TOO!
COMPLEX MODELLING / HIERARCHY
Building for Scale!
GET YOUR
PRIORITIES RIGHT!
MONGODB <= 2.4 / MONGOID < 4.1
MONGODB >= 2.6 / MONGOID >= 4.1
Building for Scale!
PLEASE EXPLAIN!
PLEASE EXPLAIN!
User
.where(email:"***")
.where(phone:"***")
PLEASE EXPLAIN!
User
.where(email:"***")
.where(phone:"***")
.explain()
Building for Scale!
Building for Scale!
PLEASE EXPLAIN!
OMIT FIELDS IF FILTRATION< 90%
PLEASE EXPLAIN!
COVER YOUR QUERIES
Building for Scale!
(SIDE)KIQ'D
(SIDE)KIQ'D
SIDEKIQ'D
SIDEKIQ'D
SIDEKIQ'D
SIDEKIQ'D
LOAD BALANCER... CAUSE WE ARE LAZY!
SIDEKIQ'D
 MANAGE LATENCY
 WORKER LOAD
Building for Scale!
MAY THE FORCE BE WITH YOU
KIRAN NARASAREDDY
http://kco.re / @_kcore

More Related Content

Building for Scale!