Node @ Flipkart 
Abhinav Rastogi 
@_abhinavrastogi
!jQuery 
If you think jQuery is the answer, 
you lose a cookie and get an F grade!
Picking one is difficult! 
Plus its never exactly what you need
How we built a web stack 
in Node... 
It’s really not that difficult
Node in Production 
Now this is a different story altogether
Philosophy 
A web stack to build rich UIs for the next generation, 
embracing progressive enhancement.
Request 
Session API 
JSON 
Rendering 
Templates 
Response 
Cart API 
Search API 
Product API 
Promises 
HTML
Why Node? 
And that too in production? :O
Parallel, Async 
Huge benefit right there over conventional stacks
Light weight 
Best available JS execution env
Good community 
Buzzing like a beehive
“There’s a module 
for that” 
No, there really is.
Challenges we faced 
(So many of them!)
Code Maintainability 
What does it really mean?
Klass, Lodash 
For classy code B-)
High Availability 
As they say, 99.99% uptime guaranteed! 
But is it really?
Keep that process running 
Forever 
PM2 
Shell Script!
Testability 
Ugh… test cases :(
Test it! 
Mocha, Chai, Istanbul
Performance 
So much to do… so little time
Profile it. 
Look, DTrace, Event Loop
Code Reusability 
Not just modules, but so much more now
Components 
CommonJS
Templating 
Jade, Handlebars, Underscore
ReactJS 
Does all that, and more
Write once, 
run anywhere! 
Sh*t... that sounds like Java
Rendering on Server 
Cacheable 
Reliable 
SEO friendly 
Optimised First Paint
Rendering on Client 
Less load on server 
Perceived Performance 
Rich UIs
Whoa.. easy there 
Logging 
Env specific code 
External HTTP requests
Responsiveness 
Useful? Needed? Required? 
Or just a fancy fad?
Cross-device/browser 
IE? Android 2.3? Cloud browsers? 
K.I.S.S!
Fanboyism? 
Close, but no :P
Why not Node? 
The other side of the story
Relatively new 
Many unsolved problems
“There’s a module 
for that” 
Its an Android Play Store… 
Not an Apple App Store
</3 
Not for the weak-hearted
Productionizing Node 
Screw best practices. Whatever works is best.
Monitor and Alert! 
Nagios, Monit
Log it. 
Bunyan, Winston
Server Health and 
Rotation Status 
Keep the difference in mind!
QPS vs Concurrency 
Wait, aren’t they the same?
Recap
Node in Production 
Isomorphism 
Useful tools and modules
Thank you 
@_abhinavrastogi

Node @ flipkart