Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Scalability In a Nutshell

Scalability In a Nutshell

Learn the buzzwords and lingo concerning scalability and what it means to scale up vs. out. This presentation should help put your head in "the cloud" and wet your appetite to learn more about scaling your apps and processes.

This presentation was originally given at the August 2013 meetup of the Seattle PHP User Group. It was updated and given at Desert Code Camp 2016. I recommend you also check out https://12factor.net/ for information complementary to this presentation.

Jeremy Lindblom

August 09, 2013
Tweet

More Decks by Jeremy Lindblom

Other Decks in Technology

Transcript

  1. Buzzwords! The Cloud! Scalability! IaaS! Big Data! HPC! NoSQL! Caching!

    Data Science! PaaS! Load Balancer! SOA! SaaS! Cluster! Sharding! Queue! APIs! Distributed! Proxy! Containers! DevOps! Microservices! Web Services! Virtualization! CDN!
  2. Scalability! The ability of a system to adapt to an

    increase in demands.! ! Availability! Elasticity! Reliability! !
  3. What happens when…! •  Your overall traffic greatly increases?! • 

    You have traffic spikes?! •  You run out of disk space?! •  Your hard drive crashes?! •  The power goes out?! •  Your server or data center is damaged?! I <3 LAMP ?
  4. How to Scale! •  Optimize your current system! •  Vertical

    hardware scaling! •  Horizontal hardware scaling!
  5. Optimization Examples! •  Database index/query optimization! •  Update server software

    (e.g. PHP 5 -> PHP 7)! •  Use alternate software (e.g., nginx vs apache)! •  Fine tune Linux/Windows configuration! •  Minify/compress static assets! •  Cache results of intense operations!
  6. Vertical Scalability! •  Disk space! •  Disk Type (e.g., SSD)!

    •  Memory! •  CPU! •  IOPS! •  etc.! ( Scale Up )!
  7. Vertical Scalability! PROS! •  No changes to application code! • 

    No changes to operations processes! CONS! •  Typically requires downtime! •  Doesn’t solve availability issues! •  Have to pay for hardware required by peak time!
  8. Horizontal Scalability! PROS! •  Can improve availability! •  Auto-scaling solutions

    can optimize costs! CONS! •  Requires changes to code and operations! •  Complicated!
  9. Tradeoffs! •  Scalability! •  Cost! •  Difficulty! •  Performance! • 

    Regionalization! •  Deadlines! •  Support! •  Etc.!
  10. Sessions! •  Databases / Cache! (MySQL, Redis, Memcache, etc.)! • 

    Sticky Sessions (via Load Balancer)! •  Distributed File System (DFS)! •  Encrypted Cookies! •  JWT Tokens!
  11. File Uploads / Storage! •  Cloud Storage (e.g., Amazon S3)!

    •  Distributed File System (DFS)! •  Other Blob Storage!
  12. Deployments! •  CI: Jenkins, TravisCI, CircleCI! •  Puppet / Chef

    / Salt / Ansible! •  Docker, Kubernetes! •  PaaS-specific offerings! •  Cloud offerings (e.g. CodeDeploy)!
  13. So won't this cost me a lot of money to

    get all of that hardware?!
  14. "The Cloud"! Cloud computing! is the use of computing resources

    delivered as a service on an as! needed basis.!
  15. Why Cloud?! 1.  No upfront investment! 2.  Reduce overall IT

    costs (pay as you go)! 3.  Flexible capacity (scaling up and down)! 4.  Speed and agility! 5.  Focus on business, not hardware! 6.  Global reach (Cloud providers have data centers all over the world)!
  16. Later! •  Content Distribution Networks (CDN)! •  NoSQL (Neo4j, Cassandra,

    etc.)! •  Queues / Notifications / Eventing! •  Microservices! •  Docker + Containerization! •  Data Warehousing + Analytics! •  And much more!