Weitere ähnliche Inhalte Ähnlich wie 윈도우 서버가 아닌 곳에서 SQL Server를 만나다! - 박주연 :: AWS Database Modernization Day 온라인 (20) Mehr von Amazon Web Services Korea (20) 윈도우 서버가 아닌 곳에서 SQL Server를 만나다! - 박주연 :: AWS Database Modernization Day 온라인1. © 2020, Amazon Web Services, Inc. or its Affiliates.
AWS Databases Modernization Day
Specialist Solutions Architect, Microsoft Workloads
Windows Server가 아닌 곳에서
SQL Server를 만나다!
JuYeon Park
2. © 2020, Amazon Web Services, Inc. or its Affiliates.
강연 중 질문하는 방법
Go to Webinar “Chat/채팅” 창에 자신이 질문한
내역이 표시됩니다. 기본적으로 모든 질문은
공개로 답변 됩니다만 본인만 답변을 받고 싶으면
(비공개)라고 하고 질문해 주시면 됩니다.
본 컨텐츠는 고객의 편의를 위해 AWS 서비스 설명을 위해 온라인 세미나용으로 별도로 제작, 제공된 것입니다. 만약 AWS
사이트와 컨텐츠 상에서 차이나 불일치가 있을 경우, AWS 사이트(aws.amazon.com)가 우선합니다. 또한 AWS 사이트
상에서 한글 번역문과 영어 원문에 차이나 불일치가 있을 경우(번역의 지체로 인한 경우 등 포함), 영어 원문이 우선합니다.
AWS는 본 컨텐츠에 포함되거나 컨텐츠를 통하여 고객에게 제공된 일체의 정보, 콘텐츠, 자료, 제품(소프트웨어 포함) 또는 서비스를 이용함으로 인하여 발생하는 여하한 종류의 손해에
대하여 어떠한 책임도 지지 아니하며, 이는 직접 손해, 간접 손해, 부수적 손해, 징벌적 손해 및 결과적 손해를 포함하되 이에 한정되지 아니합니다.
고지 사항(Disclaimer)
3. © 2020, Amazon Web Services, Inc. or its Affiliates.© 2020, Amazon Web Services, Inc. or its Affiliates.
Microsoft on AWS
4. Amazon Elastic Container Service
for Kubernetes for Windows
CustomerAdoption
SQL 2017 AMI AL2/Ubuntu
SQL Server 2008 R2
Amazon Relational Database Service adds SQL Server
SQL Server 2017
SQL Server 2012
SQL Server 2008 R2
SQL Server 2016
SQL Server Performance and
2008 Upgrade
2008
Visual Studio Toolkit
Microsoft SCOM plugin release
Microsoft SharePoint 2016 (AWS Marketplace)
Microsoft SCVMM Plugin
SAP instance on Windows 2012
AWS Trusted Advisor checks for Windows
Hyper-V support in AWS SMS
Windows for Amazon Lightsail
Application-consistent snapshots through VSS
AWS Directory Service
Sessions Manager
Dedicated Host enhancement tag-on
EC2 Dedicated Hosts (BYOL)
AWS Systems Manager Run Command
Amazon Systems Manager
EC2 Dedicated
Instances (BYOL)
EC2 Windows on Bare Metal/Hyper-V AMI
WS 2008 and SQL Server 2008
Windows Server 2008 R2
Windows Server 2012
Windows Server 2016
Windows Server 1803
Windows Server 2003
AWS License Manager
Application migration using AWS Server Migration Service
Azure to AWS migration tool
Amazon FSx for Windows File Server Active Directory cross-VPC
support
2010 2012 2014 2016 2018 Today
Windows Server and EC2
SQL Server
.NET
Application modernization
.NET Core and Powershell on AL2/Ubuntu
Windows Deep Learning AMI
.NET Core 2.1 on Linux AMIs
AWS Lambda support for PowerShell Core
Amazon Elastic Container Service for Windows containers
AWS Tools for Windows PowerShell
.NET SDK
Amazon DynamoDB Accelerator SDK for .NET
.NET on AWS Lambda and AWS
CodeBuild
.NET Core 2.1 Support with AWS Lambda and AWS X-Ray
AWS X-Ray .NET SDK
.NET Developer Hub
AWS X-Ray .NET Core support
.NET Developer
Amazon CloudWatch application insights for .NET and SQL
Server
Amazon FSx for Windows
Windows Server 2019
10여 년간의 진화: Microsoft Workloads on AWS
150+
Instance types60+
Different AMIs for
Windows
workloads
30+
Instance families
5. © 2020, Amazon Web Services, Inc. or its Affiliates.
클라우드로 가는 길
출처) https://www.devopsgroup.com/blog/simplifying-options-cloud-migration/
6. Microsoft Workloads on AWS
Lift and shift
Retire technical debt and
increase reliability
Optimize SQL
Server and Active
Directory
Increase performance and
resilience
Modernize .NET
applications
Deploy faster and save
money
Innovate
Drive digital
transformation
Breadth, depth, and
global reach
Flexibility, choice, and
a number of options
Easy to get started
Many integration
points
Better performance
SQL Server on Amazon
EC2 or Amazon RDS
Access to new
technologies
Innovate
Hess case study
Options to manage
Active Directory
services
Move towards a
DevOps model
Business agility
7. © 2020, Amazon Web Services, Inc. or its Affiliates.
SQL Server on AWS
Re-host
SQL Server on
Amazon EC2
Re-platform
SQL Server on
Amazon RDS
Re-factor
Adopting cloud-
native services
• Amazon EC2와 EBS를
이용 직접 설치
• 사용자가 직접 OS/SQL
Server 등의 관리 및 그
외의 백업, 고가용성 등도
직접 구현 필요
• 몇 번의 클릭만으로 바로
프로비저닝되어 사용
가능한 관리형 서비스
• 데이터베이스 관리 작업
자동화
• Multi-AZ 배포를 이용한
고가용성
• 다양한 워크로드에 맞는
데이터베이스 이용 가능
• 상용 대비 비용 절감 가능
(i.e Aurora)
• SCT & DMS
8. © 2020, Amazon Web Services, Inc. or its Affiliates.© 2020, Amazon Web Services, Inc. or its Affiliates.
SQL Server on various OS
9. © 2020, Amazon Web Services, Inc. or its Affiliates.
SQL Server 버전
SQL Server 2008 (10)
SQL Server 2012 (11)
SQL Server 2014 (12)
SQL Server 2016 (13)
SQL Server 2017 (14)
SQL Server 2019 (15)
10. © 2020, Amazon Web Services, Inc. or its Affiliates.
Microsoft에서 최초로 Windows Server를 벗어나다
Announcing SQL Server on Linux - March 7, 2016
11. © 2020, Amazon Web Services, Inc. or its Affiliates.
어느 플랫폼이건 원하는 OS에서 이용 가능
Platform Supported version(s)
Red Hat Enterprise Linux 7.3, 7.4, 7.5, 7.6, 8.0
SUSE Linux Enterprise
Server
v12 SP2, SP3, SP4, SP5
Ubuntu 16.04, 18.04
Docker Engine 1.8+
RHEL sudo yum install -y mssql-server
SLES sudo zypper install -y mssql-server
Ubuntu
sudo apt-get update
sudo apt-get install -y mssql-server
12. © 2020, Amazon Web Services, Inc. or its Affiliates.
SQL Server Operating System (SQLOS)
• SQL Server 2005 시작
(이전에는 UMS)
• Non-Preemptive scheduling
• SQL Server내에서의 리소스 관리
및 요청 등은 모두 SQLOS가 관장
• OS 수준(CPU, Memory, Disk IO,
Network, …)의 요청은 SQSOS
API가 커널의 API(i.e. NTDLL.dll
등)를 호출하는 방식
13. © 2020, Amazon Web Services, Inc. or its Affiliates.
SQL Server Linux Architecture
SQL Platform Abstraction Layer
(SQLPAL)
RDBMS IS AS RS
Windows Linux
Windows Host
Ext.
Linux Host
Extension
SQL Platform Abstraction Layer
(SQLPAL)
Host extension mapping to OS system calls
(IO, Memory, CPU scheduling)
Win32-like APIsSQLOS API
SQLOS v2
All other systems
System resource &
latency sensitive code paths
14. © 2020, Amazon Web Services, Inc. or its Affiliates.
SQL Server on Linux를 이용하려면… Default AMI
Windows Linux
3.872 USD 3.136 USD
r5.4xlarge (16 Cores, 128 GB)
Standard Edition
On-demand
15. © 2020, Amazon Web Services, Inc. or its Affiliates.
SQL Server on Linux를 이용하려면…
Dockethub
• https://hub.docker.com/_/microsoft-mssql-server
• https://hub.docker.com/r/microsoft/mssql-server-windows-developer/
16. © 2020, Amazon Web Services, Inc. or its Affiliates.© 2020, Amazon Web Services, Inc. or its Affiliates.
Demo1: Install & Migration
17. © 2020, Amazon Web Services, Inc. or its Affiliates.
SQL on Linux 설치 후 데이터베이스 이동
AWS Cloud
Availability Zone b
SQL Server Native Backup/Restore 이용
Availability Zone a
SQL Server 2016
On Windows Server
Availability Zone c
SQL Server 2019
On Amazon Linux 2
Backup Restore
VPC
18. © 2020, Amazon Web Services, Inc. or its Affiliates.
SQL on Linux 설치 후 데이터베이스 이동
AWS Cloud
SQL Server Native Backup/Restore 이용
Availability Zone a
SQL Server 2016
On Windows Server
Availability Zone c
SQL Server 2019
On Amazon Linux 2
Backup Restore
VPC
Availability Zone b
19. © 2020, Amazon Web Services, Inc. or its Affiliates.© 2020, Amazon Web Services, Inc. or its Affiliates.
HA for SQL Server on Linux
20. © 2020, Amazon Web Services, Inc. or its Affiliates.
HA w/ SQL Server on Linux
Failover Cluster Instance Always On AG Read-Scale Availability
Group
• Pacemaker and Corosync
• Single SQL Server instance
: SQL resource agent
(mssql-server-ha) [1]
• Shared Storage (ISCI, NFS,
SMB)
FSx for Windows Files Server
• CLUSTER_TYPE = EXTERNAL
Auto failover
Pacemaker
SQL resource agent
(mssql-server-ha)
• 3 replicas required
• CLUSTER_TYPE=NONE
No clustering required
Manual or forced failover
Sync or async replicas
Read scale routing
Cross-platform
[1] https://github.com/microsoft/mssql-server-ha
21. © 2020, Amazon Web Services, Inc. or its Affiliates.
Pacemaker Cluster
Always On AG 구성 예시
활용사례1) Replica01에서 백업 및 BI 솔루션 연결, DR용인 Replica02의 경우 Primary, Replica01 보다 작은 사이즈의
인스턴스 적용
활용사례2) Primary, Replica01로 운영하면서, Replica02에서 검색엔진 인덱싱 생성용으로 대량의 주기적 데이터 조회
활용사례3) Replica01, Replica02로 라우팅 구성하여 읽기 요청에 대한 로드 밸런싱
Always On AG
Availability Zone a Availability Zone c
AWS Cloud
Primary
Availability Zone b
Replica01
HA + DR 구성
Replica02
Sync
Async
22. © 2020, Amazon Web Services, Inc. or its Affiliates.
Pacemaker Cluster
Always On AG 구성 예시
활용사례4) 2개의 동기화된 보조 복제본에 대한 가용성 증대
Always On AG
Availability Zone a Availability Zone c
AWS Cloud
Primary
Availability Zone b
Replica01
HA + DR 구성
Replica02
Sync
Async
23. © 2020, Amazon Web Services, Inc. or its Affiliates.
Always On AG on Multi-Platform
Always On AG
Availability Zone a Availability Zone c
AWS Cloud
Primary
(Windows)
Availability Zone b
Replica01
(Windows)
Windows Server – Linux간 Always On AG 구성
Replica02
(Linux)
Auto Failover
Sync
Async
Deploying Always On availability groups between Amazon EC2 Windows and Amazon Linux 2 instances
24. © 2020, Amazon Web Services, Inc. or its Affiliates.
SQL Server 2017/2019 HA in K8s
Persistent Volume Storage
Kubernetes
User
Node
Pod
SQL Server
Node
Load Balancer Service
Node
Pod
SQL Server
Pod
SQL Server
Built-in HADR orchestration with no clustering required
25. © 2020, Amazon Web Services, Inc. or its Affiliates.
SQL Server 2019 Always On AG in K8s
Availability groups on Kubernetes
AG
Node
Pod
Operator
Reporting
app
Primary
app
Node
Pod
SQL Server
primary
AG agent
Kubernetes cluster
Load
balancer
Node
Pod
SQL Server
secondary
AG agent
Node
Pod
SQL Server
secondary
AG agent
SQL Server
primary
SQL Server
secondary
Load
balancer
• SQL Server와 K8s 장애조치의 통합
• Operator 배포
• Always On AG 모든 기능 이용 가능
• Load Balancer for Primary
Replica
• Load Balancer for Secondary
Replica Readers
26. © 2020, Amazon Web Services, Inc. or its Affiliates.© 2020, Amazon Web Services, Inc. or its Affiliates.
Example: SQL Server on EKS
27. © 2020, Amazon Web Services, Inc. or its Affiliates.
Worker nodes
PVS using Portworx
Architecture
AWS Cloud
Availability Zone a Availability Zone c
VPC
Availability Zone b
kubectl
SSMS
28. © 2020, Amazon Web Services, Inc. or its Affiliates.
SQL Server on EKS 생성 과정
Deploy-MSSQLServerOnEKSWithPortworx.ps1
1. EKS 생성에 필요한 IAM Role 생성
2. EKS 클러스터가 동작할 VPC 생성 (CloudFormation)
3. EKS 클러스터 생성 (3 managed master nodes) 및 kubectl 구성
4. Worker node가 될 EC2 생성 후 조인
5. Portworx가 통신할 Etcd 클러스터를 시작
6. DaemonSet을 EKS 클러스터에 적용 (Portworx Cloud Native Storage 자동 설치)
7. Portworx에 대한 스토리지 클래스 생성
8. gp2 EBS 볼륨에 대한 스토리지 클래스를 작성
9. 새로운 영구 볼륨 클레임 (PVC) 작성 - PVC를 통해 Portworx는 Amazon EBS 볼륨이 지원하는 PV (Persistent
Volumes)를 프로비저닝
10. SQL Server 배포 (SQL Server를 실행하는 단일 컨테이너)
11. Pod에 연결할 Load Balancer 생성
12. LB Endpoint로 SSMS에서 연결
30. © 2020, Amazon Web Services, Inc. or its Affiliates.
SQL Server on Container의 장점
1. 구성의 단순화: SQL Server를 설치하거나 장애조치 구성이 필요없다
2. 좀더 세밀한 배포 가능, 유휴 자원 최대 활용 가능
31. © 2020, Amazon Web Services, Inc. or its Affiliates.
SQL Server on Container의 장점
3. 라이선스 비용 감소: 컨테이너별 라이선싱
32. © 2020, Amazon Web Services, Inc. or its Affiliates.© 2020, Amazon Web Services, Inc. or its Affiliates.
오늘의 이야기…
• SQL Server는 Windows Server 외의 다른 OS에서도 운영할 수 있다
(선호하는 OS 쓰면 된다)
• 이용 중이던 데이터베이스를 변경 없이 그대로 이용(백업&복원)할 수 있다
• 컨테이너에서 Frontend 부터 Backend까지의 Full Stack에도 지금까지 써왔던 SQL
Server를 이용할 수 있다
• 컨테이너로 유휴자원을 꼼꼼하게 쓰면 EC2에서 직접 쓰는 것보다 비용을 절감할 수 있다
• Cloud Native로 가는 중간 단계로 다양한 시도를 해 볼 수 있다
33. © 2020, Amazon Web Services, Inc. or its Affiliates.© 2020, Amazon Web Services, Inc. or its Affiliates.
참고 자료
※ 실습
• SQL Server 2017 Linux Always on AG 구성 Lab
• Running highly available Microsoft SQL Server containers in Amazon EKS with
Portworx cloud native storage https://github.com/awslabs/aws-eks-
portworx-sql
※ 블로그 / 백서
• Best Practices for Deploying Microsoft SQL Server on AWS
• How to configure SQL Server 2017 on Amazon Linux 2 and Ubuntu AMIs
34. © 2020, Amazon Web Services, Inc. or its Affiliates.
AWS Database Modernization Day에
참석해주셔서 대단히 감사합니다.
aws-korea-marketing@amazon.com
twitter.com/AWSKorea
facebook.com/amazonwebservices.ko
youtube.com/user/AWSKorea
slideshare.net/awskorea
twitch.tv/aws
저희가 준비한 내용, 어떻게 보셨나요?
더 나은 세미나를 위하여 설문을 꼭 작성해 주시기 바랍니다.