Bootstrapping Session 4 - Building Web Scale Applications

  • 27,151 views
Uploaded 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 …

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

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
27,151
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
63
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Building Web-ScaleApplications with AWSGlen Robinson, Manager Solution ArchitectureRyan Shuttleworth, Technical Evangelist
  • 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. What’s a web scale application?
  • 4. Some web scale apps you can hear from today…
  • 5. What do they have in common?
  • 6. Elastic capacity No need to guess capacity requirements and over-provision Elastic Capacity Demand Actual demand Customer dissatisfaction Predicted demand Waste Time
  • 7. Elastic capacity No need to guess capacity requirements and over-provision Elastic Capacity Demand Elastic capacity Time
  • 8. Built on a global footprintBuilt across regional availability zones9 Regions25 Availability ZonesContinuous Expansion
  • 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. 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. 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. Three principles to build upon…
  • 13. Scale 1
  • 14. Elasticity Scale 1
  • 15. ElasticityState Data Scale 1
  • 16. Elasticity State Data Scale 2Security
  • 17. Elasticity State Data ScaleInherent 2 Security
  • 18. Elasticity State Data Scale VPCInherent 2 Security Groups
  • 19. Elasticity State Data Scale VPCInherent 3 Failure Security Groups
  • 20. Elasticity State Data Scale VPCInherent 3 Failure Expected Security Groups
  • 21. Elasticity State Data Scale VPCInherent 3 Failure Automation Expected Security Groups Testing
  • 22. Elasticity State Data Scale VPC AutomationInherent Security Failure Expected Groups Testing
  • 23. Layering the cake
  • 24. Web scale data Object storageData
  • 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. Highly scalable data storage A web store, not a file system Access via APIs What is S3? Fast EconomicalData Highly available & durable
  • 27. Data
  • 28. Web scale data Object storageData
  • 29. Web scale data Object storage Relational dataData
  • 30. Master/Slave Horizontal Scaling Reasonably simple to implement Leverage PIOPs for raw performance Easy to change instances sizes Has an upper limitData
  • 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. Web scale data Object storage Relational dataData
  • 33. Web scale data Object storage Relational data NoSQLData
  • 34. Horizontal Scaling - Fully Managed DynamoDB Provisioned throughput NoSQL database Fast, predictable performance Fully distributed, fault tolerant architecture Considerations for non-uniform dataData
  • 35. DynamoDB Provisioned read/write performance per table Predictable high performance scaled via console or API Dial it upData
  • 36. Low provisioned throughput Table Partition SSD Data RegionIllustrative diagram only
  • 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. 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. 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. 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. Tight Coupling Controller A Controller B Controller CApplication Data
  • 42. Tight Coupling Controller A Controller B Controller C Q Q QApplication Controller A Controller B Controller C Data Loose Coupling
  • 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. Where does stateApplication reside? Data
  • 45. Browser Framework cookies session handler Where does stateApplication reside? Memory session Session manager database Data
  • 46. State store should be: Performant ScalableApplication Data Reliable
  • 47. Where should state reside? Trigger auto- scaling policyApplication Data
  • 48. Where should state reside? Trigger auto- scaling policyApplication Not here Data
  • 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. Performant Where should state reside?ScalableReliable Application Data
  • 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. Route53 Global DNS service Request Route53 Distribution Route53Load Balancing Region Region A B Application Data
  • 53. Route53 Global DNS service Request Route53 Distribution Route53 16ms 92msLoad Balancing Region Region A B Application Data
  • 54. Route53 Global DNS service Request Route53 Distribution Route53 16ms 92msLoad Balancing Region Region A B Application Data
  • 55. Route53 Global DNS service Request Route53 Distribution Region A DNS entry Route53 16ms 92msLoad Balancing Region Region A B Application Data
  • 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. 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. Management DistributionLoad Balancing Application Data
  • 59. Management Distribution 10 instancesLoad Balancing manageable Application Data
  • 60. Management Distribution 100 instancesLoad Balancing at a push Application Data
  • 61. Management Distribution 1,000 instancesLoad Balancing not a chance Application Data
  • 62. Management Distribution Automation &Load Balancing management Web scale enabler Application Data
  • 63. Management CloudFormation EC2 DistributionLoad Balancing Application Data OpsWorks Elastic Beanstalk
  • 64. Management control CloudFormation EC2 DistributionLoad Balancing Application Data OpsWorks Elastic Beanstalk convenience
  • 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. From theory to practice a real story
  • 67. Scale in AWSOliver Burns – Lead Architect 23 April 2013
  • 68. Who are we …
  • 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. The Challenge Before the end of 2012
  • 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. 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. Financials• Estimated like for like data centre costs: £730,000 p/a• Projected AWS costs: £450,000 p/a
  • 74. Cost savings
  • 75. Scaling
  • 76. Scaling• Lots of commodity servers – Resiliency – Smaller granularity cost increases – Auto scaling
  • 77. So…. Does AWS live up to its promises?
  • 78. Benefits• Lower, flat, running costs• Flexible provisioning• Capacity and new technology opportunities => performance
  • 79. Thank you