“kick-off with scale in mind” by yousef wadi
DESCRIPTION
“Kick-off with Scale in Mind” Well begun is half done; this techtalk guides you on how to start your web projects keeping scaling in mind, it describes what you can achieve from an architectural perspective, and discusses how you can build it with the current open source technologies. by: Yousef Wadi- Chief Product Officer and Co-Founder at ArabiaweatherTRANSCRIPT
Kickoff with scale in MindServer/Code Solution Architecture to scale easily as you grow
Yousef Wadi Chief Product Officer / Co-Founder
Arabiaweather Inc.
What is (Ready to Scale)
Ability to grow fast without the need to change your architecture
Should I always thing of Scale?
If you want to grow !
Outline• Server Setup Structure
• QA-1 • Web/API Application Servers
• Scaling using NodeJS • QA-2
• Data Storage • Scaled Storage • QA-3
• Final QA
What is Vertical VS Horizontal Scaling Mean?
Vertical ex: (Grow Server Resources)
Horizontal ex: (Expand into others servers)
Server Setup Structures
Linear
Diamond
Fan-out
Multi-Fans
Linear
Database'Server'1'
Web'Server'Machine'1'X
X
Diamond
Database'Server'1'
Load'Balancer'
Web'Server'1' Web'Server'2' Web'Server'n…'
X
XX
Database'Server'1'
Load'Balancer'
Web'Server'1' Web'Server'2' Web'Server'n…'
Database'Server'2' Database'Server'n…'
Fan-out
X
Database'Server'1'
Load'Balancer'1'
Web'Server'1' Web'Server'2' Web'Server'n…'
Database'Server'2' Database'Server'n…'
Load'Balancer'n…'
DNS'Round'Robin'
✓
Multi-Fans
Why is this Applicable Now?
There was no cloud servers, there was no ability to spin off instances fast!
Q/A - 1
WEB/API Application Server
• ASYNC
• Non-Blocking I/O
• ASYNC Bindings
• Single Threaded Servers
• Cluster Servers
• FAST !
• Best Used as Server Glue
Scaling Using NodeJS
M1(4xC)
NodeJS Code
Port 1000
NodeJS Code
Port 1001
NodeJS Code
Port 1002
NodeJS Code
Port 1003
M2(4xC)
NodeJS Code
Port 1000
NodeJS Code
Port 1001
NodeJS Code
Port 1002
NodeJS Code
Port 1003
Reverse Proxy (nginx, haproxy, ats, etc…) Port 80
Q/A - 2
Data Storage (Reads and Writes)
Availability
Partition Tolerance Consistency
CA MYSQL
Postgres LevelDB
CP MongoDB
Redis SOLR
AP Kasandra CouchDB
DynamoDB SimpleDB
A
C P
Always Available for Reads and Writes
Works Well over Net. Partitions
All Clients always have Same Data
CP ->QUEUE-> CA (For High Write Volume and Speed of Writes)
CA ->INDEX-> CP (For Faster Reads)
CP ->INDEX-> CP (For Faster Reads)
Q/A - 3
Overall Q/A