IST 346 Scalability Agenda Discussion Content Scalability WrapUp
IST 346: Scalability
Agenda • Discussion • Content • Scalability • Wrap-Up
Discussion Questions 1. 2. 3. 4. 5. 6. Explain Master / Slave architecture for redundancy. What is a hot spare? Cold Spare? What is a load balancer? Define scaling for performance vs scaling for resilience? What is the difference between latency and bandwidth? What are the two ways one can test that a service can scale?
Lab Debrief Lab G
What is Scalability? • The capability of a system to handle an increased amount of work. • We see this all the time: • Doing laundry at home versus the laundromat • Cooking for friends versus catering a party for 500 people • Walking to work versus riding a bike versus driving a car • Having friends help you with your wedding invitations versus doing them yourself.
Scaling Services: How do you address growth? Vertical “Scale Up” Horizontal “Scale Out” • Add more resources to an • Run the service over existing system running the multiple systems, and service or split across layers. orchestrate communication between them. • Easier, but limited scale. • Harder, but massive scale. • Single point of failure • Overhead to manage nodes.
Trivial Vertical Scaling • Buy your way out of the problem. • Buy a faster computer • Invest in a faster internet connection • We do this all the time with our phones, etc… • Limited based on available technology.
Vertical Scale Through Layering Clients • We re-design / program the application to support multiple users by breaking up / splitting the layers. Business Logic Data Access Data Business Logic Network + Middleware Scale Up Server Monolithic Presentation Data Access Data
Example Wordpress • We ran the Wordpress Blog/CMS in the lab as an N-tier application. • This was scaled Vertically across 3 containers. • We could have run the entire application from within a single container with all three services competing for resources! Clients Single System NGINX + WORDPRESS + MYSQL Three Systems NGINX WORDPRESS MYSQL
Redundancy != Scalability • Redundancy is not scalability. • Scalability addresses performance of a system to do work • Redundancy addresses availability of a system to do work Clients Three Systems NGINX WORDPRESS MYSQL (Replica)
Horizontal Scalability • Horizontal Scalability or Scaling out always involves sharing load among multiple instances of the same service. • Systems must be designed to scale this way • They also require a system to direct traffic to a specific instance (load balancer) Clients Load Balancer Instance
Balancing Load Who does it? • A Master service of the system to orchestrates load distribution (Hadoop, and most no. SQL database systems work this way). • Another service orchestrates distribution. HAProxy, DNS, Zookeeper, etc. How it is done? • Round Robin / Ring • Request-Based • Location-Based • Based on existing instance load. • Custom / Hybrid
Performance vs Scalability • Is the system slow for a single user? • You have a performance problem. • Is the system fast for an individual user, but slow under high load? • You have a scalability problem.
Check Yourself: Scaling SMTP • Brainstorm ways you can scale the SMTP (Simple mail transport Protocol – the service that sends email) at your large organization. • What might be a strategy to scale this service out and balance the load across 10 SMTP servers?
Group Activity Scaling your life
Details of Group Activity Divide into groups of 3 • Come up with 3 activities you do every day then include solutions for how you can scale those activities to improve output. • Improvements can be time-saving or increasing volume / throughput. • For each solution, identify if it is scale up or scale out? Make sure you can explain / justify.
Your To-Do List What to work on for next class
Exit Ticket Share one thing you learned today that you didn’t know before class!
Questions?
- Slides: 19