Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

SQL Server on AWS

336 visualizaciones

Publicado el

by Darin Briskman, Technical Evangelist, AWS

Microsoft SQL Server is a commonly-used commercial relational database, especially for organizations that use Microsoft development tools. We’ll look at how to run SQL Server on the AWS Cloud, with examples of organizations using it.

  • Sé el primero en comentar

SQL Server on AWS

  1. 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pop-up Loft SQL Server on AWS
  2. 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved • Consider RDS first • Focus on: – Business value tasks – High-level tuning tasks – Schema optimization • No in-house database expertise • Need control over: – DB instance & OS – Backups, Replication – Clustering – sysadmin role • Use features, size or performance options not available in Amazon RDS • S Q L S E R V E R o n A M A Z O N E C 2• A M A Z O N R D S S Q L S E R V E R WHICH OPTION IS RIGHT FOR YOU?
  3. 3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved • AWS Managed Service • Managed deployment, patching, Multi-AZ automatic HA, backups and point in time restore • Auditable centralized engine parameter tuning • No direct instance or file system access • Some features are restricted • Self-Managed Solution • Always on Availability Groups for HA • Maintenance Plans for backups • Administrator access to instance and DBs • Custom monitoring agents • Run SSRS, SSIS, SSAS on instance • Hybrid Architectures • legacy versions (self-install) • S Q L S E R V E R o n A M A Z O N E C 2• A M A Z O N R D S S Q L S E R V E R THE DIFFERENCES
  4. 4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved SQL SERVER ON AMAZON EC2
  5. 5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved • Storage I/O contention is one of the main causes for poor SQL Server performance • Use EBS Optimized EC2 Instances • Match storage technology with I/O pattern of workload components • Match instance type to IOPS and throughput needs of workload • Create a single volume for data and logs SQL Server Example Volume Layout C: Boot on General Purpose SSD EBS Volume D: Data and logs on Provisioned IOPS EBS Volume K: Backups on Magnetic ST1 or SC1 EBS Volumes Z: Tempdb on instance storage (if available) SQL SERVER STORAGE OPTIMIZATION
  6. 6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved EBS OPTIMIZATION & VOLUMES • Plan for EC2 Instance EBS Optimized Throughput and IOPS capacity • Plan for EBS Volume Throughput and IOPS capacity • Stripe EBS PIOPS volumes for more than 20,000 IOPS or 320MB/s
  7. 7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved EBS OPTIMIZATION AND VOLUMES • Plan for EC2 Instance EBS Optimized Throughput and IOPS capacity • Plan for EBS Volume Throughput and IOPS capacity • Stripe EBS PIOPS volumes for more than 20,000 IOPS or 320MB/s r4 family r4.large 2 vCPUs/15.25 GiB RAM Max EBS bandwidth: 425 Mbps Max IOPS (16KB): 3,000 Expected throughput: 53 MB/s … or ~1250 IOPS @ 44KB IO size r4.16xlarge 64 vCPUs/488 GiB RAM Max EBS bandwidth: 14k Mbps Max IOPS (16KB): 75,000 Expected throughput: 1,750 MB/s … or ~40,700 IOPS @ 44KB IO size 1TB GP2 Volume Max. IOPS (16KB): 3,000 Max. throughput: 160 MB/s 4 x 1TB PIOPS @ 20k IOPS Expected IOPS (16KB): 80k Max. throughput: 1,280 MB/s
  8. 8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved TEMPDB OPTIMIZATION • Consider: • Using multiple tempdb files (1:1 mapping with CPUs, up to 8) • Striping multiple instance storage disks together for higher I/O • Changing SQL Server service startup to Automatic (Delayed Start) to allow instance storage to provision • Scripting/automating configuration on instance boot • Striping solution by consulting partner IFM Ltd. • http://www.ifm.net.nz/cookbooks/amazon-sql-tempdb/index.html
  9. 9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved SQL SERVER HA AND DR ON AMAZON EC2 • Use multiple Availability Zones • Instance-level and AZ-level failure tolerance • Synchronous replication • Options • Enterprise Edition: Always On Availability Groups • Standard Edition: • Basic Always On Availability Groups (2016+) • Failover cluster instances using partner block-level replication solution
  10. 10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved ALWAYS ON AVAILABILITY GROUPS (AG)
  11. 11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved MULTI-REGION ALWAYS ON AG
  12. 12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved FAILOVER CLUSTER INSTANCES ON EC2 SIOS DataKeeper Cluster Edition
  13. 13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved AMAZON RDS FOR SQL SERVER
  14. 14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved STORAGE PERFORMANCE PLANNING Scalable Storage • Maximum storage: 16TB • Maximum IOPS: 20,000 • Amazon RDS storage throughput depends on DB instance class (see equivalent EC2 EBS Optimized instance type) Monitoring I/O efficiency: • CloudWatch Metric Average Queue Depth - I/O requests waiting to be serviced
  15. 15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved RDS FOR SQL SERVER HIGH AVAILABILITY Amazon RDS for SQL Server Multi-AZ • Principal and secondary DB nodes in different Availability Zones (AZ) • Witness in a 3rd AZ • Leverages SQL Server DB mirroring • Automatic failover (typically, 1-2 minute) • Consider mirroring impact on change heavy workloads
  16. 16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved AMAZON RDS MULTI-AZ IN DEPTH Failure scenarios mitigated: • Loss of availability in primary AZ • Loss of network connectivity to principal DB node • Compute unit or storage failure on principal DB node • Failover process: • Implement retry logic at the application layer – trigger manual failover to test Mirroring stopped Address apply debt Promote to master Change DNS endpoint Provision new secondary
  17. 17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved • Centralized management of DB engine parameters • Ability to consistently apply configurations to DB instances • Auditability of configuration • Sensible defaults work for most use cases • Ability to create custom parameter groups • Used for enabling additional features • Ability to create custom option groups • Supported options: • Transparent Data Encryption (TDE) in Enterprise Edition only • S3 Backup & Restore • O P T I O N G R O U P S• P A R A M E T E R G R O U P S CENTRALIZED DB ENGINE CONFIGURATION
  18. 18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved RDS FOR SQL SERVER DATA MOVEMENT .BAK File Import and Export Leverages SQL Server’s native backup functionality AWS Database Migration Service Now supports Change Data Capture from RDS SQL Server DB instances AWS Marketplace Third-party data import and export tools and solutions 1 3 4 Database Publishing Wizard, Import/Export, Bulk Copy Use bcp; export to T-SQL files & load using sqlcmd 2
  19. 19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved SQL SERVER 2017 • Available for EC2 and RDS (incl. Multi-AZ) • SQL Server 2017 Linux supported on Amazon EC2, RHEL license-included • Cluster & cluster-less Availability Groups (WSFC, Pacemaker, None) • Cross database transactions supported by Always On AG • Automatic plan correction • Graph database capabilities • Linux: • System DBs fixed to /var/opt/mssql/data • One SQL Server instance per server (default instance only)
  20. 20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pop-up Loft aws.amazon.com/activate Everything and Anything Startups Need to Get Started on AWS

×