Bootstrapping Session 4 - Building Web Scale Applications

30,558 views
30,403 views

Published on

AWS provides a platform that is ideally suited for deploying highly available and reliable systems that can scale with a minimal amount of human interaction. This presentation describes a set of architectural patterns that support highly available services that are also scalable, low cost, low latency and allow for agile development practices. We walk through the various architectural decisions taken for each tier and explain our choices for appropriate AWS services and building blocks to ensure the security, scale, availability and reliability of the application.

Glen Robinson, Manager, Solution Architecture, AWS
Oliver Burns, Technical Architecture Team Lead, Total Jobs

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
30,558
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
81
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Bootstrapping Session 4 - Building Web Scale Applications

  1. 1. Building Web-ScaleApplications with AWSGlen Robinson, Manager Solution ArchitectureRyan Shuttleworth, Technical Evangelist
  2. 2. What are we going to cover? What’s a web scale application? Three principles to build upon Layering the cake: Data Application Total Jobs Group – their story
  3. 3. What’s a web scale application?
  4. 4. Some web scale apps you can hear from today…
  5. 5. What do they have in common?
  6. 6. Elastic capacity No need to guess capacity requirements and over-provision Elastic Capacity Demand Actual demand Customer dissatisfaction Predicted demand Waste Time
  7. 7. Elastic capacity No need to guess capacity requirements and over-provision Elastic Capacity Demand Elastic capacity Time
  8. 8. Built on a global footprintBuilt across regional availability zones9 Regions25 Availability ZonesContinuous Expansion
  9. 9. Architected using services Relational Database ServiceUse RDS for databases Database-as-a-Service No need to install or manage database instances Scalable and fault tolerant configurations DynamoDB Use DynamoDB for Provisioned throughput NoSQL database high performance key- Fast, predictable performance value DB Fully distributed, fault tolerant architecture
  10. 10. Architected using services Amazon SQS Reliable messageProcessing results Reliable, highly scalable, queue service queuing without for storing messages as they travel Amazon SQS between instances additional software 1 Processing task/processing trigger 2Push inter-process Simple Workflow Task Aworkflows into the Reliably coordinate processing steps Task B 3 across applicationscloud with SWF (Auto-scaling) Integrate AWS and non-AWS resources Manage distributed state in complex systems Task C
  11. 11. Architected using services Document Cloud Search ServerDon’t install search Elastic search engine based uponsoftware, use Amazon A9 search engine Fully managed service withCloudSearch sophisticated feature set Search Scales automatically Server Results Elastic MapReduce Elastic Hadoop cluster Process large volumes Integrates with S3 & DynamoDB of data cost effectively Leverage Hive & Pig analytics scripts with EMR Integrates with instance types such as spot
  12. 12. Three principles to build upon…
  13. 13. Scale 1
  14. 14. Elasticity Scale 1
  15. 15. ElasticityState Data Scale 1
  16. 16. Elasticity State Data Scale 2Security
  17. 17. Elasticity State Data ScaleInherent 2 Security
  18. 18. Elasticity State Data Scale VPCInherent 2 Security Groups
  19. 19. Elasticity State Data Scale VPCInherent 3 Failure Security Groups
  20. 20. Elasticity State Data Scale VPCInherent 3 Failure Expected Security Groups
  21. 21. Elasticity State Data Scale VPCInherent 3 Failure Automation Expected Security Groups Testing
  22. 22. Elasticity State Data Scale VPC AutomationInherent Security Failure Expected Groups Testing
  23. 23. Layering the cake
  24. 24. Web scale data Object storageData
  25. 25. Highly scalable web access to objects You put it in S3 AWS stores with 99.999999999% durabilityData Multiple redundant copies in a region
  26. 26. Highly scalable data storage A web store, not a file system Access via APIs What is S3? Fast EconomicalData Highly available & durable
  27. 27. Data
  28. 28. Web scale data Object storageData
  29. 29. Web scale data Object storage Relational dataData
  30. 30. Master/Slave Horizontal Scaling Reasonably simple to implement Leverage PIOPs for raw performance Easy to change instances sizes Has an upper limitData
  31. 31. Sharded Horizontal Scaling More complex at the application layer No practical limit on scalability Operation complexity/sophistication Shard by function or key space RDBMS or NoSQL A D hash ring C BData
  32. 32. Web scale data Object storage Relational dataData
  33. 33. Web scale data Object storage Relational data NoSQLData
  34. 34. Horizontal Scaling - Fully Managed DynamoDB Provisioned throughput NoSQL database Fast, predictable performance Fully distributed, fault tolerant architecture Considerations for non-uniform dataData
  35. 35. DynamoDB Provisioned read/write performance per table Predictable high performance scaled via console or API Dial it upData
  36. 36. Low provisioned throughput Table Partition SSD Data RegionIllustrative diagram only
  37. 37. Increased provisioned throughput Table Table Table Table Table Partition Partition Partition Partition Partition SS SS SS SS SS D D D D D Table Table Table Table Table Partition Partition Partition Partition Partition SS SS SS SS SS D D D D D Data RegionIllustrative diagram only
  38. 38. High provisioned throughput Table Table Table Table Table Table Table Table Table Table Partition Partition Partition Partition Partition Partition Partition Partition Partition Partition Table Table Table Table Table Table Table Table Table Table Partition Partition Partition Partition Partition Partition Partition Partition Partition Partition Table Table Table Table Table Table Table Table Table Table Partition Partition Partition Partition Partition Partition Partition Partition Partition Partition Table Table Table Table Table Table Table Table Table Table Partition Partition Partition Partition Partition Partition Partition Partition Partition Partition Data RegionIllustrative diagram only
  39. 39. Loose coupling sets you free! The looser theyre coupled, the bigger they scale Independent components Design everything as a black boxApplication Decouple interactions Load-balance clusters Data
  40. 40. Amazon SQS Reliable, highly scalable, queue service for storing messages as they travel between instances Processing results Amazon SQSApplication Data Processing task/processing trigger
  41. 41. Tight Coupling Controller A Controller B Controller CApplication Data
  42. 42. Tight Coupling Controller A Controller B Controller C Q Q QApplication Controller A Controller B Controller C Data Loose Coupling
  43. 43. Trigger auto- scaling policy Auto Scaling Automatic resizing of compute clusters based on demandApplication Feature Details Control Define minimum and maximum instance pool sizes and when scaling and cool down occurs. Integrated to Use metrics gathered by CloudWatch to drive Data Amazon scaling. CloudWatch Instance types Run Auto Scaling for On-Demand and Spot Instances. Compatible with VPC.
  44. 44. Where does stateApplication reside? Data
  45. 45. Browser Framework cookies session handler Where does stateApplication reside? Memory session Session manager database Data
  46. 46. State store should be: Performant ScalableApplication Data Reliable
  47. 47. Where should state reside? Trigger auto- scaling policyApplication Data
  48. 48. Where should state reside? Trigger auto- scaling policyApplication Not here Data
  49. 49. Where should state reside? Trigger auto- scaling policyApplication Not here Data State must reside OUTSIDE the Session state scope of the elements you wish to service scale
  50. 50. Performant Where should state reside?ScalableReliable Application Data
  51. 51. Elastic Load Balancing Create highly scalable applications Distribute load across EC2 instances in multiple availability zonesLoad Balancing Feature Details Application Available Load balance across instances in multiple Availability Zones Health checks Automatically checks health of instances and takes them in or out of service Session stickiness Route requests to the same instance Data Secure sockets layer Supports SSL offload from web and application servers with flexible cipher support Monitoring Publishes metrics to CloudWatch
  52. 52. Route53 Global DNS service Request Route53 Distribution Route53Load Balancing Region Region A B Application Data
  53. 53. Route53 Global DNS service Request Route53 Distribution Route53 16ms 92msLoad Balancing Region Region A B Application Data
  54. 54. Route53 Global DNS service Request Route53 Distribution Route53 16ms 92msLoad Balancing Region Region A B Application Data
  55. 55. Route53 Global DNS service Request Route53 Distribution Region A DNS entry Route53 16ms 92msLoad Balancing Region Region A B Application Data
  56. 56. CloudFront World-wide content distribution Distribution network 3 Served from S3 /images/*Load Balancing Application London 2 Served from EC2 *.php Data Paris 1 Single CNAME NY www.mysite.com
  57. 57. CloudFront World-wide content distribution Distribution network No CDN CDN for CDN for Static Static &Load Balancing Content Dynamic Content Application Response Time Response Time Response Time Server Load Server Server Load Load Data
  58. 58. Management DistributionLoad Balancing Application Data
  59. 59. Management Distribution 10 instancesLoad Balancing manageable Application Data
  60. 60. Management Distribution 100 instancesLoad Balancing at a push Application Data
  61. 61. Management Distribution 1,000 instancesLoad Balancing not a chance Application Data
  62. 62. Management Distribution Automation &Load Balancing management Web scale enabler Application Data
  63. 63. Management CloudFormation EC2 DistributionLoad Balancing Application Data OpsWorks Elastic Beanstalk
  64. 64. Management control CloudFormation EC2 DistributionLoad Balancing Application Data OpsWorks Elastic Beanstalk convenience
  65. 65. SummarySummary Use these techniques (and many others) as appropriate Awareness of the options is the first step to good design Scaling is the ability to move the bottlenecks around to the least expensive part of the architecture AWS makes this easier – so your application is not a victim of its own success
  66. 66. From theory to practice a real story
  67. 67. Scale in AWSOliver Burns – Lead Architect 23 April 2013
  68. 68. Who are we …
  69. 69. Facts and Figures…• Founded in 1999• Largest job board company in the UK• 450 staff• 200K jobs• 7 million job seekers a month• 3.5 million page views per day• 6.7 million searchable CVs• 4 million job applications per month• 3.5 million daily email job alerts
  70. 70. The Challenge Before the end of 2012
  71. 71. www.totaljobs.com Akamai www.origin.totaljobs.comAvailability Zone 1 Availability Zone 2 Route53 ELB DNS Replication Active Peer to Peer Passive Replication
  72. 72. TechnologyService Data Centre AWSWeb Servers Virtual Machines (VMWare) m1.xlarge (15GB, 4 cores)(IIS)DB Servers Blades cc2.8xlarge (60GB, 32 cores)(SQL Server 2012)Storage SAN Elastic Block Store (EBS) standard + high iopsLoad Balancing Cisco Load Balancer + Elastic Load Balancing Cisco Global Site SelectorBackup Tape zManda, using Simple Storage Service (S3)Security Hardware IPS Akamai WAFEmail Cisco IronPorts powerMTA
  73. 73. Financials• Estimated like for like data centre costs: £730,000 p/a• Projected AWS costs: £450,000 p/a
  74. 74. Cost savings
  75. 75. Scaling
  76. 76. Scaling• Lots of commodity servers – Resiliency – Smaller granularity cost increases – Auto scaling
  77. 77. So…. Does AWS live up to its promises?
  78. 78. Benefits• Lower, flat, running costs• Flexible provisioning• Capacity and new technology opportunities => performance
  79. 79. Thank you

×