SlideShare a Scribd company logo
1 of 24
Scalable Social Architectures Think Early, Think Often, Think Through birengandhi http://unhub.com/biren
Scalability by the numbers source: developeranalytics.com (as of Dec 1, 2010) Scalable Social Architectures
Scalability by the numbers 500M active users, 50% log-in  EVERY DAY source: hitwise.com Scalable Social Architectures
Isn’t that great? Exponential Growth  is  AWESOME  or PAINFUL   Scalable Social Architectures
Scaling Challenges Scalable Social Architectures Think Early Think Often Think Through
Scaling Challenges And the biggest challenge is … One Size Does NOT Fit All Scalable Social Architectures
Social Web Architectures Scalable Social Architectures Firewall Caching Web and App Tier Public Network LB/Proxy DB Tier Platform API Calls “Social” Part
Social Game Architectures Scalable Social Architectures Not  “nice to have”, but  “must have” CDN Upload/Miss Firewall Caching Web and App Tier Public Network LB/Proxy DB Tier Platform API Calls
Gaming Stack Summary Scalable Social Architectures
Obvious Challenges  Persistence Caching Web Server Client Perception Data Scalable Social Architectures
Persistence RDBMS (mysql) Data modeling De-normalization is your friend  Slaving Sharding NoSQL Hbase, Cassandra, MongoDB, Redis, … Membase Graph Databases Neo4j, InfiniteGraph, … Traffic Patterns Read/Write Mix Consistency Models Scalable Social Architectures
MysqlSharding Example App Tier App Tier M0 M1 M0 M1 Master S0 S1 S0 S1 S2 S3 Slave S’0 S’1 S’2 S’3
Caching In-process (MMO) Java vs. Scripting Languages APC Mostly read-only global data Priming after releases Serialization  Memcache Functional (vertical) Sharding Statistical (horizontal) Sharding Granularity & Compression of Stored Objects Scalable Social Architectures
Memcached Example Key Format: <function>:<version>:value (e.g. user:1:123 or better u:1:123) Scalable Social Architectures Horizontal Sharding Vertical Sharding
Memcached Example Key Format: <function>:<version>:value (e.g. user:1:123 or better u:1:123) Scalable Social Architectures Horizontal Sharding Vertical Sharding uid % n feature?
Web Tier Easy to Scale (Stateless) Cloud-friendly auto-grow policies Sticky sessions? H/W or S/W Load Balancers HAProxy, Zeus for Cloud environments DNS could be a bottleneck Round Robin DNS Tech Choices Apache, Nginx + FastCGI Node.js on the server side Scalable Social Architectures
Client Tier CDN Static assets (images, JS, CSS etc.) Invalidation/update schemes (versioning) UGC might be little challenging Flash (or Graphic Engines) Watch out for frame rates Users’ machines are not as powerful JavaScript Frameworks (jQuery, Prototype, etc.) Tons of great advice on minifying, compressing, obfuscating Scalable Social Architectures
Data Versioning Coexistence of old and new data Rollback during catastrophic events Integrity Checksum (costly) Field-level Validation (not cheap either) Gaming Content Lightweight CMS (integrated in art pipeline) Scalable Social Architectures
Not-so-obvious Challenges Data Center vs. Cloud Network Port Saturation CPU Utilization Connection Bloat Runtime Configuration Programming Models Deployment Discipline Scalable Social Architectures
Not-so-obvious Challenges Data Center vs. Cloud Virtualization is good, but slow Little control over optimization  High failure rates Network Saturation Traffic going across (DB/Memcache boxes) CPU Utilization One core is overworked  Scalable Social Architectures Cloud Perf.  1/5 to 1/8 of Data Center
Not-so-obvious Challenges Connection Bloat Database/Memcached Persistent Connections Proxies (mysql-proxy, moxi, memagent etc.) Runtime Configuration Controlled rollout of features Fire-fighting defense Home-grown, Apache ZooKeeper, …  Scalable Social Architectures
Not-so-obvious Challenges Programming Models External platform APIs Failure semantics Make async, as much as possible Graceful subsystem failures Organize all users data into same shards Things WILL fail when you least expect them to Constant Performance Evaluation Profiling Tools (xhprof, xdebug etc. for PHP) HipHop Compiler PHP Extensions for Common Code Heterogeneous languages for subcomponents  Scalable Social Architectures
Deployment Disciplines Tools  Hudson/Bamboo (deployment) Munin/Nagios (monitoring) Staging environment As close to production as possible User Downtime 404 Pages Transparent Handling Cache Priming DB failures after every deployment Deployment Time 1000+ servers P2P solutions Scalable Social Architectures
Summary Metrics-driven Optimizations You can’t improve something you can’t measure Every smart person has an ‘opinion’ Leverage automated monitoring tools Let machines work while humans rest Any system is only as robust as its weakest link It’s an ONGOING process – a journey … better get used to it  Think Early, Think Often, Think Through Scalable Social Architectures

More Related Content

Similar to Scalable Social Architectures Think Early Often Through

Enterprise-Ready Private and Hybrid Cloud Computing Today
Enterprise-Ready Private and Hybrid Cloud Computing TodayEnterprise-Ready Private and Hybrid Cloud Computing Today
Enterprise-Ready Private and Hybrid Cloud Computing TodayRightScale
 
2015 06-wso2 coneu-closingkeynote-asanka
2015 06-wso2 coneu-closingkeynote-asanka2015 06-wso2 coneu-closingkeynote-asanka
2015 06-wso2 coneu-closingkeynote-asankaAsanka Abeysinghe
 
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"Daniel Bryant
 
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve PooleDevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve PooleJAXLondon_Conference
 
Web 2.0 and LiveQuotes Presentation
Web 2.0 and LiveQuotes PresentationWeb 2.0 and LiveQuotes Presentation
Web 2.0 and LiveQuotes PresentationJamie Thingelstad
 
Choosing technologies for a big data solution in the cloud
Choosing technologies for a big data solution in the cloudChoosing technologies for a big data solution in the cloud
Choosing technologies for a big data solution in the cloudJames Serra
 
Building the Joomla Platform
Building the Joomla PlatformBuilding the Joomla Platform
Building the Joomla PlatformAndrew Eddie
 
Internet Scale Architecture
Internet Scale ArchitectureInternet Scale Architecture
Internet Scale ArchitectureRightScale
 
Strata SC 2014: Apache Mesos as an SDK for Building Distributed Frameworks
Strata SC 2014: Apache Mesos as an SDK for Building Distributed FrameworksStrata SC 2014: Apache Mesos as an SDK for Building Distributed Frameworks
Strata SC 2014: Apache Mesos as an SDK for Building Distributed FrameworksPaco Nathan
 
Above the cloud joarder kamal
Above the cloud   joarder kamalAbove the cloud   joarder kamal
Above the cloud joarder kamalJoarder Kamal
 
Virtualization 2011 v1
Virtualization 2011 v1Virtualization 2011 v1
Virtualization 2011 v1Pini Cohen
 
Real World Azure - Dev
Real World Azure - DevReal World Azure - Dev
Real World Azure - DevClint Edmonson
 
You Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing It
You Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing ItYou Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing It
You Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing ItAleksandr Yampolskiy
 
What Should I Do? Choosing SQL, NoSQL or Both for Scalable Web Applications
What Should I Do? Choosing SQL, NoSQL or Both for Scalable Web ApplicationsWhat Should I Do? Choosing SQL, NoSQL or Both for Scalable Web Applications
What Should I Do? Choosing SQL, NoSQL or Both for Scalable Web ApplicationsTodd Hoff
 
Building Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and SalesforceBuilding Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and SalesforceRaymond Gao
 
Cloud Computing:An Economic Solution for Libraries
Cloud Computing:An Economic Solution for LibrariesCloud Computing:An Economic Solution for Libraries
Cloud Computing:An Economic Solution for LibrariesAmit Shaw
 
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...Bill Wilder
 
Java EE microservices architecture - evolving the monolith
Java EE microservices architecture - evolving the monolithJava EE microservices architecture - evolving the monolith
Java EE microservices architecture - evolving the monolithMarkus Eisele
 

Similar to Scalable Social Architectures Think Early Often Through (20)

Enterprise-Ready Private and Hybrid Cloud Computing Today
Enterprise-Ready Private and Hybrid Cloud Computing TodayEnterprise-Ready Private and Hybrid Cloud Computing Today
Enterprise-Ready Private and Hybrid Cloud Computing Today
 
2015 06-wso2 coneu-closingkeynote-asanka
2015 06-wso2 coneu-closingkeynote-asanka2015 06-wso2 coneu-closingkeynote-asanka
2015 06-wso2 coneu-closingkeynote-asanka
 
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
 
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve PooleDevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
 
Web 2.0 and LiveQuotes Presentation
Web 2.0 and LiveQuotes PresentationWeb 2.0 and LiveQuotes Presentation
Web 2.0 and LiveQuotes Presentation
 
Choosing technologies for a big data solution in the cloud
Choosing technologies for a big data solution in the cloudChoosing technologies for a big data solution in the cloud
Choosing technologies for a big data solution in the cloud
 
RavenDB overview
RavenDB overviewRavenDB overview
RavenDB overview
 
Building the Joomla Platform
Building the Joomla PlatformBuilding the Joomla Platform
Building the Joomla Platform
 
Internet Scale Architecture
Internet Scale ArchitectureInternet Scale Architecture
Internet Scale Architecture
 
Strata SC 2014: Apache Mesos as an SDK for Building Distributed Frameworks
Strata SC 2014: Apache Mesos as an SDK for Building Distributed FrameworksStrata SC 2014: Apache Mesos as an SDK for Building Distributed Frameworks
Strata SC 2014: Apache Mesos as an SDK for Building Distributed Frameworks
 
Above the cloud joarder kamal
Above the cloud   joarder kamalAbove the cloud   joarder kamal
Above the cloud joarder kamal
 
Virtualization 2011 v1
Virtualization 2011 v1Virtualization 2011 v1
Virtualization 2011 v1
 
Real World Azure - Dev
Real World Azure - DevReal World Azure - Dev
Real World Azure - Dev
 
NoSQL Basics - a quick tour
NoSQL Basics - a quick tourNoSQL Basics - a quick tour
NoSQL Basics - a quick tour
 
You Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing It
You Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing ItYou Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing It
You Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing It
 
What Should I Do? Choosing SQL, NoSQL or Both for Scalable Web Applications
What Should I Do? Choosing SQL, NoSQL or Both for Scalable Web ApplicationsWhat Should I Do? Choosing SQL, NoSQL or Both for Scalable Web Applications
What Should I Do? Choosing SQL, NoSQL or Both for Scalable Web Applications
 
Building Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and SalesforceBuilding Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and Salesforce
 
Cloud Computing:An Economic Solution for Libraries
Cloud Computing:An Economic Solution for LibrariesCloud Computing:An Economic Solution for Libraries
Cloud Computing:An Economic Solution for Libraries
 
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
 
Java EE microservices architecture - evolving the monolith
Java EE microservices architecture - evolving the monolithJava EE microservices architecture - evolving the monolith
Java EE microservices architecture - evolving the monolith
 

More from Biren Gandhi

InterDrone 2017 Las Vegas - Keynote Address
InterDrone 2017 Las Vegas - Keynote AddressInterDrone 2017 Las Vegas - Keynote Address
InterDrone 2017 Las Vegas - Keynote AddressBiren Gandhi
 
Tamaso Ma Jyotirgamaya - From Darkness to Light
Tamaso Ma Jyotirgamaya - From Darkness to LightTamaso Ma Jyotirgamaya - From Darkness to Light
Tamaso Ma Jyotirgamaya - From Darkness to LightBiren Gandhi
 
Winning the Digital Disruption Game by Biren Gandhi
Winning the Digital Disruption Game by Biren GandhiWinning the Digital Disruption Game by Biren Gandhi
Winning the Digital Disruption Game by Biren GandhiBiren Gandhi
 
Drones and Fog Computing - New Frontiers of IoT and Digital Transformation -...
Drones and Fog Computing  - New Frontiers of IoT and Digital Transformation -...Drones and Fog Computing  - New Frontiers of IoT and Digital Transformation -...
Drones and Fog Computing - New Frontiers of IoT and Digital Transformation -...Biren Gandhi
 
UAVs (drones) for Humanitarian Efforts
UAVs (drones) for Humanitarian EffortsUAVs (drones) for Humanitarian Efforts
UAVs (drones) for Humanitarian EffortsBiren Gandhi
 
Get Cloud Resources to the IoT Edge with Fog Computing
Get Cloud Resources to the IoT Edge with Fog ComputingGet Cloud Resources to the IoT Edge with Fog Computing
Get Cloud Resources to the IoT Edge with Fog ComputingBiren Gandhi
 
Fog Computing Reality Check: Real World Applications and Architectures
Fog Computing Reality Check: Real World Applications and ArchitecturesFog Computing Reality Check: Real World Applications and Architectures
Fog Computing Reality Check: Real World Applications and ArchitecturesBiren Gandhi
 
MongoDB In Enterprise 2.0
MongoDB In Enterprise 2.0MongoDB In Enterprise 2.0
MongoDB In Enterprise 2.0Biren Gandhi
 
Unforgettable Lessons from Facebook & Zynga
Unforgettable Lessons from Facebook & ZyngaUnforgettable Lessons from Facebook & Zynga
Unforgettable Lessons from Facebook & ZyngaBiren Gandhi
 

More from Biren Gandhi (10)

Speak to IoT
Speak to IoTSpeak to IoT
Speak to IoT
 
InterDrone 2017 Las Vegas - Keynote Address
InterDrone 2017 Las Vegas - Keynote AddressInterDrone 2017 Las Vegas - Keynote Address
InterDrone 2017 Las Vegas - Keynote Address
 
Tamaso Ma Jyotirgamaya - From Darkness to Light
Tamaso Ma Jyotirgamaya - From Darkness to LightTamaso Ma Jyotirgamaya - From Darkness to Light
Tamaso Ma Jyotirgamaya - From Darkness to Light
 
Winning the Digital Disruption Game by Biren Gandhi
Winning the Digital Disruption Game by Biren GandhiWinning the Digital Disruption Game by Biren Gandhi
Winning the Digital Disruption Game by Biren Gandhi
 
Drones and Fog Computing - New Frontiers of IoT and Digital Transformation -...
Drones and Fog Computing  - New Frontiers of IoT and Digital Transformation -...Drones and Fog Computing  - New Frontiers of IoT and Digital Transformation -...
Drones and Fog Computing - New Frontiers of IoT and Digital Transformation -...
 
UAVs (drones) for Humanitarian Efforts
UAVs (drones) for Humanitarian EffortsUAVs (drones) for Humanitarian Efforts
UAVs (drones) for Humanitarian Efforts
 
Get Cloud Resources to the IoT Edge with Fog Computing
Get Cloud Resources to the IoT Edge with Fog ComputingGet Cloud Resources to the IoT Edge with Fog Computing
Get Cloud Resources to the IoT Edge with Fog Computing
 
Fog Computing Reality Check: Real World Applications and Architectures
Fog Computing Reality Check: Real World Applications and ArchitecturesFog Computing Reality Check: Real World Applications and Architectures
Fog Computing Reality Check: Real World Applications and Architectures
 
MongoDB In Enterprise 2.0
MongoDB In Enterprise 2.0MongoDB In Enterprise 2.0
MongoDB In Enterprise 2.0
 
Unforgettable Lessons from Facebook & Zynga
Unforgettable Lessons from Facebook & ZyngaUnforgettable Lessons from Facebook & Zynga
Unforgettable Lessons from Facebook & Zynga
 

Recently uploaded

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Recently uploaded (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

Scalable Social Architectures Think Early Often Through

  • 1. Scalable Social Architectures Think Early, Think Often, Think Through birengandhi http://unhub.com/biren
  • 2. Scalability by the numbers source: developeranalytics.com (as of Dec 1, 2010) Scalable Social Architectures
  • 3. Scalability by the numbers 500M active users, 50% log-in EVERY DAY source: hitwise.com Scalable Social Architectures
  • 4. Isn’t that great? Exponential Growth is AWESOME  or PAINFUL  Scalable Social Architectures
  • 5. Scaling Challenges Scalable Social Architectures Think Early Think Often Think Through
  • 6. Scaling Challenges And the biggest challenge is … One Size Does NOT Fit All Scalable Social Architectures
  • 7. Social Web Architectures Scalable Social Architectures Firewall Caching Web and App Tier Public Network LB/Proxy DB Tier Platform API Calls “Social” Part
  • 8. Social Game Architectures Scalable Social Architectures Not “nice to have”, but “must have” CDN Upload/Miss Firewall Caching Web and App Tier Public Network LB/Proxy DB Tier Platform API Calls
  • 9. Gaming Stack Summary Scalable Social Architectures
  • 10. Obvious Challenges Persistence Caching Web Server Client Perception Data Scalable Social Architectures
  • 11. Persistence RDBMS (mysql) Data modeling De-normalization is your friend Slaving Sharding NoSQL Hbase, Cassandra, MongoDB, Redis, … Membase Graph Databases Neo4j, InfiniteGraph, … Traffic Patterns Read/Write Mix Consistency Models Scalable Social Architectures
  • 12. MysqlSharding Example App Tier App Tier M0 M1 M0 M1 Master S0 S1 S0 S1 S2 S3 Slave S’0 S’1 S’2 S’3
  • 13. Caching In-process (MMO) Java vs. Scripting Languages APC Mostly read-only global data Priming after releases Serialization Memcache Functional (vertical) Sharding Statistical (horizontal) Sharding Granularity & Compression of Stored Objects Scalable Social Architectures
  • 14. Memcached Example Key Format: <function>:<version>:value (e.g. user:1:123 or better u:1:123) Scalable Social Architectures Horizontal Sharding Vertical Sharding
  • 15. Memcached Example Key Format: <function>:<version>:value (e.g. user:1:123 or better u:1:123) Scalable Social Architectures Horizontal Sharding Vertical Sharding uid % n feature?
  • 16. Web Tier Easy to Scale (Stateless) Cloud-friendly auto-grow policies Sticky sessions? H/W or S/W Load Balancers HAProxy, Zeus for Cloud environments DNS could be a bottleneck Round Robin DNS Tech Choices Apache, Nginx + FastCGI Node.js on the server side Scalable Social Architectures
  • 17. Client Tier CDN Static assets (images, JS, CSS etc.) Invalidation/update schemes (versioning) UGC might be little challenging Flash (or Graphic Engines) Watch out for frame rates Users’ machines are not as powerful JavaScript Frameworks (jQuery, Prototype, etc.) Tons of great advice on minifying, compressing, obfuscating Scalable Social Architectures
  • 18. Data Versioning Coexistence of old and new data Rollback during catastrophic events Integrity Checksum (costly) Field-level Validation (not cheap either) Gaming Content Lightweight CMS (integrated in art pipeline) Scalable Social Architectures
  • 19. Not-so-obvious Challenges Data Center vs. Cloud Network Port Saturation CPU Utilization Connection Bloat Runtime Configuration Programming Models Deployment Discipline Scalable Social Architectures
  • 20. Not-so-obvious Challenges Data Center vs. Cloud Virtualization is good, but slow Little control over optimization High failure rates Network Saturation Traffic going across (DB/Memcache boxes) CPU Utilization One core is overworked Scalable Social Architectures Cloud Perf. 1/5 to 1/8 of Data Center
  • 21. Not-so-obvious Challenges Connection Bloat Database/Memcached Persistent Connections Proxies (mysql-proxy, moxi, memagent etc.) Runtime Configuration Controlled rollout of features Fire-fighting defense Home-grown, Apache ZooKeeper, … Scalable Social Architectures
  • 22. Not-so-obvious Challenges Programming Models External platform APIs Failure semantics Make async, as much as possible Graceful subsystem failures Organize all users data into same shards Things WILL fail when you least expect them to Constant Performance Evaluation Profiling Tools (xhprof, xdebug etc. for PHP) HipHop Compiler PHP Extensions for Common Code Heterogeneous languages for subcomponents Scalable Social Architectures
  • 23. Deployment Disciplines Tools Hudson/Bamboo (deployment) Munin/Nagios (monitoring) Staging environment As close to production as possible User Downtime 404 Pages Transparent Handling Cache Priming DB failures after every deployment Deployment Time 1000+ servers P2P solutions Scalable Social Architectures
  • 24. Summary Metrics-driven Optimizations You can’t improve something you can’t measure Every smart person has an ‘opinion’ Leverage automated monitoring tools Let machines work while humans rest Any system is only as robust as its weakest link It’s an ONGOING process – a journey … better get used to it  Think Early, Think Often, Think Through Scalable Social Architectures
  • 25. Questions? biren.gandhi@gmail.com http://www.facebook.com/birengandhi http://www.linkedin.com/in/birengandhi http://twitter.com/birengandhi http://scalingchallenges.posterous.com/ Thank You Scalable Social Architectures