How to build a back-end for 500,000 users per day
Mark Zubovsky
JavaScript Architect
UI/UX, Peopleware
@ InspiRational
Node.js
- Based on the amazing V8 ( Chrome's JS engine )
- C++ & JS inside
- Created in 2009, almost 6 years of evolution
- Maintained by a dedicated team ( Joyent )
and dozens of contributors - Open-sourced
Node.js
Production & Highload ready
Walmart Mobile, PayPal Mobile,
Linkedin Mobile, Netflix, Uber,
Yahoo Mail, MySpace, Yammer,
Voxer, Trello
and so on...
Good fit for
- API Layer ("Front" Tier)
- RESTful services
- Internet of Things
- E-Commerce
- Payment Processing
- Micro-services
Success Stories
Walmart
Black Friday 2013. 200M visitors. 55% of US traffic — Mobile, handled by Node.js
Yahoo
2M+ requests per minute handled by Node services
PayPal
Node services doubled the number of RPS
Business tenets:
Innovation, Productivity, Developer Joy,
Hiring/Retaining Talent, Cost Saving
Quotes from slides by Joe McCann
Javascript
Past
Slow. Animating snowflakes and other not serious stuff
Present
Fast. Very Optimized. The most popular language on GitHub.
Continiously improved by Google, Mozilla, Apple etc.
Node.js is used by Enterprises. Still has drawbacks and bad parts
Future
ES6+, more optimizations, language improvements
Demo time
Components
- Node.js
- Express.js
- In-memory storage
- Angular for Front-end
Demo Goal
500K * 5 = 2.5M hits / 12 hrs
≈ 208K hits/hr
≈ 3.5K hits/min
≈ 60 RPS (120 in Peak)
≈15M users/mo
Other important parts
- Hardware
- OS Configuration
- Database (Design, Config)
- Reverse Proxy (e.g. nginx), CDN
-
Caching Layer
— Cache everything you can
Thank you!
slides.com/demark
mzubovsky@irtechagency.com
How to build a Backend for 500K daily users
By demark
How to build a Backend for 500K daily users
- 468