scalability aosa presentation

Click here to load reader

Upload: jwong16

Post on 27-Jan-2015

113 views

Category:

Education


0 download

DESCRIPTION

 

TRANSCRIPT

  • 1. Scalable Web Architecture and Distributed Systems Gloria Chow, Jacqui Killow, Peter Moon, Jessica Wong

2. Introduction to Large-Scale Web Systems The design of large-scale web systems is influenced by six key principles: Availability Performance Reliability Scalability Manageability Cost 3. Introduction to Large-Scale Web Systems Four core factors are central to almost all large web applications: Services Redundancy Partitions Failure Handling 4. Core Factors of Large WebSystems Services Increase scalability by separating services so thateach service has its own function Interactions outside of the services context arehandled by an abstract interface This is called Service-Oriented Architecture (SOA) Redundancy The server needs to be able to create redundant copies of data in case of data loss 5. Core Factors of Large WebSystems Partitions When performance degrades, more resourcesshould be added Systems can: scale vertically: add more resources to the server(e.g. increasing capacity) scale horizontally: add more servers Failure Handling System should be able to recover from errors and faults 6. Achieving Fast and Scalable Data Access By providing fast access to data, services also become faster and more scalable. There are many options available for increasing the speed of data access: Caches Proxies Indexes Load Balancers Queues 7. Caches Similar to short-term memory A limited amount of storage space Only contains the most recently-accessed items Faster than accessing the original data source Used in all levels of architecture Most commonly found near the front end Two types of cache: Global vs. Distributed 8. Global Cache Involves adding a server or a file store that isfaster than the original storage and accessibleby all request nodes Request nodes query the cache in the same waythey would query a local storage There are two ways a global cache can be set up 9. Two types of Global Cache: 1. Cache is responsible for retrieval of data.RequestFor ea chI f t he da t a wa s Node r equest , t he not in t he ca che, r equest node t he ca che wil l wil l check t hepul l t he da t aca che f ir st .f r om t he or iginRequesta nd t hen keep it Node f or f ut ur e r equest s.Gl oba l Cache Dat aRequest NodeRequest Node 10. Two types of Global Cache:2. Nodes are responsible for retrieval of data.1. For ea ch r equest , t her equest node wil l 3. When da t a is check t he gl oba lr et r ieved f r omca che f ir st . Gl oba l Ca chet he or igin, it ca nRequestbe a dded t o t he Node ca che.Request NodeDa t aRequest Node 2. I f t he da t a wa s not in t he ca che, t hen t he Request Node wil lRequest r et r ieve it f r om t he or igin. Node 11. Distributed Cache Each node owns Request NodeThe node checks t hepart of the cachedCache A cache based on anit em key obt ained bydatausing a hash al gor it hm and t hen Request Node t he dat a or igin. Uses a hashingfunction so nodes Cache Bcan quickly findDat a Request Nodethe data theyneedCache C Storage space Request Nodecan easily beincreased just by Cache Dadding morenodes 12. Proxies Coordinatesrequests fromRequest A Requestmultiple clients andNoderelays them to thebackend Request A Request A RequestData Can speed up dataNodeaccess bygrouping similarrequests and Request A Request Proxytreating it as oneNode Server(collapsed-forwarding) 13. Indexes A table that stores IndexMemor ythe location of data Locat ion 0 Dat a Locat ion A Stored in memoryor somewhere local A0Locat ion 1 B- par t 1to incomingB- par t 2B 1B- par t 3requests Locat ion 2 Increases speed ofC 2Cdata reads Locat ion 3D 3 Data writes areDslower because theindex must beupdated for eachread 14. Load Balancers Distributes Request Nodeload across a Request ARequest Bset of nodesresponsiblefor handlingRequest BLoad Bal ancer (LB) Request CRequestrequests Node AlgorithmsRequest Cdetermine Request Ahow to todistribute RequestNoderequests 15. Queues Queue Incomingrequests are Task 1added to aRunning Taskqueue and areTask 2 Task 1taken off when Task 3the server has Task 2processed it Task 4 Allows clientsto workTask 5asynchronously 16. Summary The six principles that govern the design of largeweb systems are: availability, performance,reliability, scalability, manageability, and cost. Services, redundancy, partitions, and failurehandling are core factors common in almost alllarge web systems. Caches, Proxies, Indexes, Load Balancers andQueues are all used to increase the speed ofdata access. Multiple methods can be usedtogether in one web system. 17. Questions?