building scalable databases on aws - aws summit 2012 - nyc

36
Building Scalable Database Applications on AWS Sundar Raghavan, Amazon Greg Scallan, Architect, Flipboard Eric Weller, Director, Earth Networks Edward Dingels, Technical Lead, Earth Networks

Upload: amazon-web-services

Post on 26-Jan-2015

109 views

Category:

Technology


3 download

DESCRIPTION

 

TRANSCRIPT

  • 1. Building Scalable DatabaseApplications on AWSSundar Raghavan, AmazonGreg Scallan, Architect, FlipboardEric Weller, Director, Earth NetworksEdward Dingels, Technical Lead, Earth Networks

2. Database Services: One Size Does Not Fit All Amazon RDS+DynamoDBElastiCache MySQL, Oracle,MemcachedApps that need Scalable Relational databases Apps that need Massive ScalabilityYesSQLNoSQL 3. Building Database Applications The Old WayDemand Human Layer Stuck with peak capacity Human driven Time consumingQ1 Time 4. What We Hear From Customers Help us focus on applications Shift database maintenance time to more productive application development time Security planningFrequent server upgrades License/doc training Backup rec5% 5%Constant storage upgradesload/unload20% 5%Scripting codingBackup and recoverySoftware upgrade and patching Performance and25%40%tuningHardware failure replacementsInstall, upgrade, patch, migrationDistribution of timeSource: http://www.forrester.com/Events/Content/0,5180,-1110,00.ppt 5. Building Database Applications The New Way Application LayerDemand Elastic capacity App driven Immediate Time 6. Amazon Relational Database ServiceRDS is a fully managed Relational database service that is simple todeploy, easy to scale, reliable and cost-effectiveChoice of Database EnginesFully Managed ServicePush Button Scalability Fault Tolerance with Multi-AZ Works with EC2 & ElastiCacheAmazon Relational Database Service (RDS) 7. High Performance Relational DatabasesAmazon RDS ImproveIncreaseReduceConfiguration Availability Throughput LatencyPush-Button ScalingMulti AZ Read ReplicasElastiCachePush-Button ScalingRead ReplicasElastiCache 8. Push Button ScalingScale up your instanceand storageScale out as your appgrowsAutomatic backupEasy restore 9. Read Scaling with Amazon ElastiCache and Read Replicas Improve performance with ElastiCache Read replica for read scaling Off load BI and reporting from production 10. Reliability For Production Applications 11. High Availability Multi-AZ Deployments Enterprise grade fault tolerance Synchronous replication Automatic failover 12. Amazon RDS Customer Highlights Gaming Web Apps Mobile/Social Media 13. IntroductionYour Social Magazine for Apple Mobile DevicesDelivers relevant articles and photos based on usage andinteractions within your social networksLaunched 6 months after the initial team put togetherOver 5 million users and 2 billion page flips per month 14. Operating in the Cloud : Managing Complex, Real Time Data 6 months to deploy a real-time, socially relevant magazineChallenge Constantly changing user interestsArchitecture Ability to change all hardware and software elastically Frequently changing system requirementsApp needsComplex queries on user and relevancy data Milliseconds count. So, does uptime SolutionHighly performant, reliable, proven database technology Amazon RDS MySQL 15. The Data View of the World Flipboard ApplicationElastiCache Memcache forperformanceReliable andOperationalComplex data,ConfigurationQueriesand State Data SimpleDB RDS MySQL 16. Friends, Magazines anyone relevant to me who published something very recently that I care about seeing Show Me More, Please!A friend who recently shared a photo 17. Amazon RDS Tips For Success1. Leverage the Cloud for what it does best. Dont bring old DC habits.2. Scale up for better performance.3. Use RDS for complex, real-time data.4. Use Read Replicas to augment write heavy databases. They are awesome.5. Leverage existing SQL knowledge and experience.6. Use copies of your database for testing new code. Its trivial and saves time.7. Scale horizontally with sharding. Plan for it before you need it. 18. SQL or NoSQL? 19. Relational Or Non-Relational?Factors Relational (RDS) NoSQL (DynamoDB) Existing database apps New Web scale applicationsApplication type Business process-centric apps Large # of small writes and readsApplication Relational data models, transactions Simple data models, transactionscharacteristics Complex queries, joins and updates Range queries, simple updatesScaling Application or DBA architected Seamless, on-demand scaling Performance developer architected Performance AutomaticQoS Reliability and availability Reliability and availabilitySkillset SQL + Programming languages Web style programmingPossible to use both SQL and NoSQL models in one application 20. The Big Data Scalability Challenge Requirement: predictable,consistent performancePerformance Hardware purchase andprovisioning $! Data shardingData caching Cluster managementReality: performance Fault managementdegrades with scaleScalability 21. Kit, gofasterTransformation 3:From Scaling by Architecture to Scaling By Yes CommandMichael 22. Amazon DynamoDBDynamoDB is a fully managed NoSQL database service that providesextremely fast and predictable performance with seamless scalabilityEasy Administration Low Latency SSDs Reserved CapacityUnlimited Potential Storage and Throughput 23. Amazon DynamoDB NoSQL Database Fast & predictable performance Seamless Scalability ADMIN Easy administrationEven though we have years of experience with large, complexNoSQL architectures, we are happy to be finally out of thebusiness of managing it ourselves. - Don MacAskill, CEO 24. DynamoDB HighlightsLow Latency SSD-based storagenodes Typical latency =Get latencysingle-digitmillisecondsCPU utilization 25. Provisioned Throughput Reserve the IOPS needed for each table Set at table creation Increase / decrease any time via API call Pay for throughput and storage (not instances) $0.01 per hour for every 10 units of Write Capacity $0.01 per hour for every 50 units of Read Capacity $1.00 per GB-month of Storage 26. DynamoDB Customer Highlights 27. Earth Networks Case StudyEric Weller Director of DevelopmentEdward Dingels Technical Lead 28. IntroductionGathers and analyzes atmospheric observations from aglobal sensor network to promote a better understandingof the planetProprietary lightning network output used to pinpointlightning activity - best indicator of dangerous weatherOwner of the WeatherBug brand (mobile, desktop, Web) 29. ProblemGenerate lightning alert notifications, in proximityNeedto the users location, on a mobile device.Geospatial queriesScalableConstraints 6 million existing mobile users 100% YOY mobile growth Severe Weather OutbreaksFast Speed + Accuracy = SafetyReduce Time to MarketCost of Ownership 30. AnalysisProviderProduct Throughput EngineeringCost ofper InstanceCost OwnershipMicrosoftSQL Server 2008MediumLowHighMySQLMySQLMediumHigh*High*Earth Networks In Memory QuadtreeHigh HighMediumAmazon Mem-Cache HighMedium MediumAmazon DynamoDBHigh LowLow* Not currently supported by Earth Networks 31. SolutionGeo-Hash lightning dataBackend Windows service for loading/managementof data inside DynamoDBFront-end web service for encoding/decodingUse geometric instead of trigonometric calculationsClient computes actual range and produces alerts 32. ReflectionDynamoDB Advantages Easy to Provision Built-in Consistency Scalable High AvailabilityDynamoDB Wish List Automated regional DR failover Durability across regions in addition to inside a region Auto-scale down without a throttle on change Item size limit of 64k 33. Lightning Demo 34. Try Amazon DB Services!Amazon RDS Free usage For Details Visit Aws.amazon.com/rdsDynamoDB Free usage For Details Visit Aws.amazon.com/dynamodb