SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Building Scalable Web Apps
 http://www.shaolintiger.com
 @ShaolinTiger on Twitter
So who am I? Mindvalley CTO etc.
- Also Sys Admin
- DevOps Guy
- Technical Architect
Pulse Check
- Familiar with at least 1 of these technologies?
- Setup/used one of these technologies?
- Could debate the pros of nginx over Apache?
This Talk
- Intro to scaling
- 5 Points to consider
- 5 Things you can do
Scalability vs Performance
- Scalability can bring performance, but not vice-versa
“Performance measures the speed with
which a single request can be
executed, while scalability measures
the ability of a request to maintain its
performance under increasing load.” –
Steven Haines
Understand Scaling
Scaling up (Vertical)
Scaling out (Horizontal)
Scaling up vs Scaling up
Scaling up
- Can become very costly
- Single point of failure (SPOF)
- Less complex to manage
- Has a Finite limit
Scaling out
- Cheaper now with cloud/vms/commodity h/w
- Increases availability
- Management can become very complex
- Deployment can become slow
Points to consider 1) Logging
- Logging can get OUT OF CONTROL
- Use a centralized log management system
- Check out Loggly or Papertrail (we use this)
Points to consider 2) User Sessions
- Centralize your user sessions
- Use a fast in memory store
- Remember to invalidate/clear cache
- Check out Redis (or just use Memcache if you
already have it as part of your architecture)
Points to consider 3) Monitoring
- Monitor EVERYTHING
- Make data driven decisions
- Check out Munin (my favourite)
Points to consider 4) Bottlenecks
- Usually the database/datastore
- Can also possibly be the filesystem (caused by
logging, heavy static file delivery etc)
- Also possible to saturate network bandwidth
Points to consider 5) Traffic Profile
- Spiky traffic is a lot harder to deal with than
linear growth (you have to build differently)
- Even tools that ‘autoscale’ take time
Things you can do 1) CACHE!
- You should really by trying to cache everything
you can:
- - Objects
- - User Sessions
- - API Requests
- - Page Cache
- - Partials Caching (In Rails)
Things you can do 2) Understand
- Know your tools/stack (or hire someone who does)
- AKA MySQL query_cache? What’s that?
- Optimize but don’t overdo it (and not too early)
- Build for scale, but don’t get complex without reason
Things you can do 3) Use Queues
- There are great tools out there for this (RabbitMQ etc)
- Makes it much less necessary to scale your database
- Takes the burden of spiky loads without downtime
Things you can do 4) Ditch Search
- This is what happens when you do a full text
search on a database not designed for it.
- Use a specialised data store for search:
- Solr
- Lucene
- Elasticsearch
Things you can do 5) Leverage
- Use a CDN (Like OnApp, CloudFront, Edgecast etc)
- If you can use a specialist host (WPengine/Page.ly)
- Utilise a specialist DNS host (Route 53/UltraDNS)
- Profile your app with NewRelic
The END!
No Questions!
Stalk me @ShaolinTiger
This preso will be on http://slideshare.net/shaolintiger

Weitere ähnliche Inhalte

Was ist angesagt?

Mysql 2007 Tech At Digg V3
Mysql 2007 Tech At Digg V3Mysql 2007 Tech At Digg V3
Mysql 2007 Tech At Digg V3
epee
 
Roshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sitesRoshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sites
wpnepal
 
Scaling wordpress for high traffic
Scaling wordpress for high trafficScaling wordpress for high traffic
Scaling wordpress for high traffic
Roshan Bhattarai
 
Oreilly Webcast Jun17
Oreilly Webcast Jun17Oreilly Webcast Jun17
Oreilly Webcast Jun17
Sean Hull
 
Memcache and Drupal - Vaibhav Jain
Memcache and Drupal - Vaibhav JainMemcache and Drupal - Vaibhav Jain
Memcache and Drupal - Vaibhav Jain
Drupal Camp Delhi
 
Apache
ApacheApache
Apache
jtpond
 

Was ist angesagt? (18)

Intro to MySQL Master Slave Replication
Intro to MySQL Master Slave ReplicationIntro to MySQL Master Slave Replication
Intro to MySQL Master Slave Replication
 
Mysql data replication
Mysql data replicationMysql data replication
Mysql data replication
 
Mysql 2007 Tech At Digg V3
Mysql 2007 Tech At Digg V3Mysql 2007 Tech At Digg V3
Mysql 2007 Tech At Digg V3
 
Basic Knowledge on MySql Replication
Basic Knowledge on MySql ReplicationBasic Knowledge on MySql Replication
Basic Knowledge on MySql Replication
 
AEM WITH MONGODB
AEM WITH MONGODBAEM WITH MONGODB
AEM WITH MONGODB
 
WordCamp RVA
WordCamp RVAWordCamp RVA
WordCamp RVA
 
Roshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sitesRoshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sites
 
Scaling wordpress for high traffic
Scaling wordpress for high trafficScaling wordpress for high traffic
Scaling wordpress for high traffic
 
Oreilly Webcast Jun17
Oreilly Webcast Jun17Oreilly Webcast Jun17
Oreilly Webcast Jun17
 
Serve like a boss (part two)
Serve like a boss (part two)Serve like a boss (part two)
Serve like a boss (part two)
 
Memcache and Drupal - Vaibhav Jain
Memcache and Drupal - Vaibhav JainMemcache and Drupal - Vaibhav Jain
Memcache and Drupal - Vaibhav Jain
 
Caching Data For Performance
Caching Data For PerformanceCaching Data For Performance
Caching Data For Performance
 
Steve Corona: Scaling LAMP doesn't have to suck
Steve Corona: Scaling LAMP doesn't have to suckSteve Corona: Scaling LAMP doesn't have to suck
Steve Corona: Scaling LAMP doesn't have to suck
 
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu ServerForget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
 
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
 
WordPress.org & Optimizing Security for your WordPress sites
WordPress.org & Optimizing Security for your WordPress sitesWordPress.org & Optimizing Security for your WordPress sites
WordPress.org & Optimizing Security for your WordPress sites
 
Apache
ApacheApache
Apache
 
Using ZFS file system with MySQL
Using ZFS file system with MySQLUsing ZFS file system with MySQL
Using ZFS file system with MySQL
 

Andere mochten auch

Careers in psychology
Careers in psychologyCareers in psychology
Careers in psychology
pranavik
 
The Lack of Advantages
The Lack of AdvantagesThe Lack of Advantages
The Lack of Advantages
stephanielr
 
Presentation etech 2011 ppt
Presentation etech 2011 pptPresentation etech 2011 ppt
Presentation etech 2011 ppt
sasencio
 
Юзабилити-рейтинг мобильных приложений банков 2015_полная версия
Юзабилити-рейтинг мобильных приложений банков 2015_полная версияЮзабилити-рейтинг мобильных приложений банков 2015_полная версия
Юзабилити-рейтинг мобильных приложений банков 2015_полная версия
Дмитрий Силаев
 
世田谷区・住民基本台帳カード
世田谷区・住民基本台帳カード世田谷区・住民基本台帳カード
世田谷区・住民基本台帳カード
Masato Sano
 

Andere mochten auch (20)

The History Of The Future
The History Of The FutureThe History Of The Future
The History Of The Future
 
Introduction to Information Security
Introduction to Information SecurityIntroduction to Information Security
Introduction to Information Security
 
Юзабилити лаборатория как процесс
Юзабилити лаборатория как процессЮзабилити лаборатория как процесс
Юзабилити лаборатория как процесс
 
Careers in psychology
Careers in psychologyCareers in psychology
Careers in psychology
 
U.s wars
U.s warsU.s wars
U.s wars
 
Btsn 11 12 a
Btsn 11 12 aBtsn 11 12 a
Btsn 11 12 a
 
The Lack of Advantages
The Lack of AdvantagesThe Lack of Advantages
The Lack of Advantages
 
Nalog.ru сравнение эффективности редизайна апр2013-апр-2014
Nalog.ru сравнение эффективности редизайна апр2013-апр-2014Nalog.ru сравнение эффективности редизайна апр2013-апр-2014
Nalog.ru сравнение эффективности редизайна апр2013-апр-2014
 
USABILITYLAB: проектирование сайта ВТБ
USABILITYLAB: проектирование сайта ВТБUSABILITYLAB: проектирование сайта ВТБ
USABILITYLAB: проектирование сайта ВТБ
 
Eelarve ja poliitiline valik. Kuidas poliitilised suundumused kajastuvad eela...
Eelarve ja poliitiline valik. Kuidas poliitilised suundumused kajastuvad eela...Eelarve ja poliitiline valik. Kuidas poliitilised suundumused kajastuvad eela...
Eelarve ja poliitiline valik. Kuidas poliitilised suundumused kajastuvad eela...
 
I wanna hold your hand: Conference mentoring in the Australian LIS sector
I wanna hold your hand: Conference mentoring in the Australian LIS sectorI wanna hold your hand: Conference mentoring in the Australian LIS sector
I wanna hold your hand: Conference mentoring in the Australian LIS sector
 
Wild data: collaborative e-research and university libraries
Wild data: collaborative e-research and university librariesWild data: collaborative e-research and university libraries
Wild data: collaborative e-research and university libraries
 
Historieta tic
Historieta ticHistorieta tic
Historieta tic
 
Mind game
Mind gameMind game
Mind game
 
Milleks meile riik? Alternatiivide võimalikkusest.
Milleks meile riik? Alternatiivide võimalikkusest.Milleks meile riik? Alternatiivide võimalikkusest.
Milleks meile riik? Alternatiivide võimalikkusest.
 
Presentation etech 2011 ppt
Presentation etech 2011 pptPresentation etech 2011 ppt
Presentation etech 2011 ppt
 
Blogs y educación
Blogs y educaciónBlogs y educación
Blogs y educación
 
Юзабилити-рейтинг мобильных приложений банков 2015_полная версия
Юзабилити-рейтинг мобильных приложений банков 2015_полная версияЮзабилити-рейтинг мобильных приложений банков 2015_полная версия
Юзабилити-рейтинг мобильных приложений банков 2015_полная версия
 
Управление пользоватлькими качествами ДБО
Управление пользоватлькими качествами ДБОУправление пользоватлькими качествами ДБО
Управление пользоватлькими качествами ДБО
 
世田谷区・住民基本台帳カード
世田谷区・住民基本台帳カード世田谷区・住民基本台帳カード
世田谷区・住民基本台帳カード
 

Ähnlich wie Building Scalable Web Apps - LVL.UP KL

Storage Systems For Scalable systems
Storage Systems For Scalable systemsStorage Systems For Scalable systems
Storage Systems For Scalable systems
elliando dias
 

Ähnlich wie Building Scalable Web Apps - LVL.UP KL (20)

Scalability Considerations
Scalability ConsiderationsScalability Considerations
Scalability Considerations
 
CI_CONF 2012: Scaling - Chris Miller
CI_CONF 2012: Scaling - Chris MillerCI_CONF 2012: Scaling - Chris Miller
CI_CONF 2012: Scaling - Chris Miller
 
CI_CONF 2012: Scaling
CI_CONF 2012: ScalingCI_CONF 2012: Scaling
CI_CONF 2012: Scaling
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
 
Fundamentals of performance tuning PHP on IBM i
Fundamentals of performance tuning PHP on IBM i  Fundamentals of performance tuning PHP on IBM i
Fundamentals of performance tuning PHP on IBM i
 
10 Tips for Your Journey to the Public Cloud
10 Tips for Your Journey to the Public Cloud10 Tips for Your Journey to the Public Cloud
10 Tips for Your Journey to the Public Cloud
 
Infrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous DeliveryInfrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous Delivery
 
Tech4Africa 2014
Tech4Africa 2014Tech4Africa 2014
Tech4Africa 2014
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
 
Agile data lake? An oxymoron?
Agile data lake? An oxymoron?Agile data lake? An oxymoron?
Agile data lake? An oxymoron?
 
SQL or NoSQL, that is the question!
SQL or NoSQL, that is the question!SQL or NoSQL, that is the question!
SQL or NoSQL, that is the question!
 
UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015
 
Breaking data
Breaking dataBreaking data
Breaking data
 
Powering Interactive Data Analysis at Pinterest by Amazon Redshift
Powering Interactive Data Analysis at Pinterest by Amazon RedshiftPowering Interactive Data Analysis at Pinterest by Amazon Redshift
Powering Interactive Data Analysis at Pinterest by Amazon Redshift
 
Storage Systems For Scalable systems
Storage Systems For Scalable systemsStorage Systems For Scalable systems
Storage Systems For Scalable systems
 
Drupal Performance : DrupalCamp North
Drupal Performance : DrupalCamp NorthDrupal Performance : DrupalCamp North
Drupal Performance : DrupalCamp North
 
How to pinpoint and fix sources of performance problems in your SAP BusinessO...
How to pinpoint and fix sources of performance problems in your SAP BusinessO...How to pinpoint and fix sources of performance problems in your SAP BusinessO...
How to pinpoint and fix sources of performance problems in your SAP BusinessO...
 
MySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document StoreMySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document Store
 
BIO IT 15 - Are Your Researchers Paying Too Much for Their Cloud-Based Data B...
BIO IT 15 - Are Your Researchers Paying Too Much for Their Cloud-Based Data B...BIO IT 15 - Are Your Researchers Paying Too Much for Their Cloud-Based Data B...
BIO IT 15 - Are Your Researchers Paying Too Much for Their Cloud-Based Data B...
 
High Performance Mysql
High Performance MysqlHigh Performance Mysql
High Performance Mysql
 

Kürzlich hochgeladen

💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 

Kürzlich hochgeladen (20)

20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
 
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
 

Building Scalable Web Apps - LVL.UP KL

  • 1. Building Scalable Web Apps  http://www.shaolintiger.com  @ShaolinTiger on Twitter
  • 2. So who am I? Mindvalley CTO etc. - Also Sys Admin - DevOps Guy - Technical Architect
  • 3. Pulse Check - Familiar with at least 1 of these technologies? - Setup/used one of these technologies? - Could debate the pros of nginx over Apache?
  • 4. This Talk - Intro to scaling - 5 Points to consider - 5 Things you can do
  • 5. Scalability vs Performance - Scalability can bring performance, but not vice-versa “Performance measures the speed with which a single request can be executed, while scalability measures the ability of a request to maintain its performance under increasing load.” – Steven Haines
  • 6. Understand Scaling Scaling up (Vertical) Scaling out (Horizontal)
  • 7. Scaling up vs Scaling up Scaling up - Can become very costly - Single point of failure (SPOF) - Less complex to manage - Has a Finite limit Scaling out - Cheaper now with cloud/vms/commodity h/w - Increases availability - Management can become very complex - Deployment can become slow
  • 8. Points to consider 1) Logging - Logging can get OUT OF CONTROL - Use a centralized log management system - Check out Loggly or Papertrail (we use this)
  • 9. Points to consider 2) User Sessions - Centralize your user sessions - Use a fast in memory store - Remember to invalidate/clear cache - Check out Redis (or just use Memcache if you already have it as part of your architecture)
  • 10. Points to consider 3) Monitoring - Monitor EVERYTHING - Make data driven decisions - Check out Munin (my favourite)
  • 11. Points to consider 4) Bottlenecks - Usually the database/datastore - Can also possibly be the filesystem (caused by logging, heavy static file delivery etc) - Also possible to saturate network bandwidth
  • 12. Points to consider 5) Traffic Profile - Spiky traffic is a lot harder to deal with than linear growth (you have to build differently) - Even tools that ‘autoscale’ take time
  • 13. Things you can do 1) CACHE! - You should really by trying to cache everything you can: - - Objects - - User Sessions - - API Requests - - Page Cache - - Partials Caching (In Rails)
  • 14. Things you can do 2) Understand - Know your tools/stack (or hire someone who does) - AKA MySQL query_cache? What’s that? - Optimize but don’t overdo it (and not too early) - Build for scale, but don’t get complex without reason
  • 15. Things you can do 3) Use Queues - There are great tools out there for this (RabbitMQ etc) - Makes it much less necessary to scale your database - Takes the burden of spiky loads without downtime
  • 16. Things you can do 4) Ditch Search - This is what happens when you do a full text search on a database not designed for it. - Use a specialised data store for search: - Solr - Lucene - Elasticsearch
  • 17. Things you can do 5) Leverage - Use a CDN (Like OnApp, CloudFront, Edgecast etc) - If you can use a specialist host (WPengine/Page.ly) - Utilise a specialist DNS host (Route 53/UltraDNS) - Profile your app with NewRelic
  • 18. The END! No Questions! Stalk me @ShaolinTiger This preso will be on http://slideshare.net/shaolintiger