- Ability to handle increasing amount of work gracefully - Dimensions:
- Load
- Handling increasing load by adding resources
- Geographic
- Maintain performance in case of geographically distributed systems
- Functional
- Adding new features using minimum effort
- Vertical: Scaling Up - Horizontal: Scaling Out - Tradeoff between the two: Price difference; Scale up - Virtualization
YouTube
- One Billion Views per day: More than 11,000 views per second - Video Serving
- Upload once, view thousands of times - Streaming of videos
- Offline processing
Wikipedia
- Content Serving and editing - Reads outweigh writes - between 25,000 and 60,000 page requests per second
Twitter, Facebook News Feed
- Messaging - Broadcasting of messages
- Propagating messages to friends - Lots of asynchronous processing
Components
- Load balancers: routing; could be in multi-layer; hard/soft ware
- Reverse proxy
- Software load balancing - Caching static data: Images, Java script, Read only pages - Operate out of memory - Squid, HAProxy, Varnish
- Web server
- Session state - Cookies - Blocking connections to other tiers
- Application Server
- "shared nothing architecture" - Deals with “business logic” - Get data from DB, do some operation, send to user - Get request from user, do some operation, store into DB
- Messaging Software
- Becoming popular among web 2.0 sites for queuing offline tasks - Asynchronous - Publish-Subscribe - eg: JMS, RabbitMQ, Amazon SQS
- Caching Software
- What is to be cached?
- News sites : Generated web pages - Session state - Static objects - Database rows - Any information that is expensive to read from disk, and may be accessed frequently