

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# SaaS 애플리케이션의 데이터베이스 선택
<a name="db-selection"></a>

많은 다중 테넌트 SaaS 애플리케이션의 경우 운영 데이터베이스를 선택하여 관계형 데이터베이스와 비관계형 데이터베이스 또는 둘의 조합 중에서 선택할 수 있습니다. 결정을 내리려면 다음과 같은 높은 수준의 애플리케이션 데이터 요구 사항 및 특성을 고려하세요.
+ 애플리케이션의 데이터 모델
+ 데이터에 대한 액세스 패턴
+ 데이터베이스 지연 시간 요구 사항
+ 데이터 무결성 및 트랜잭션 무결성 요구 사항(원자성, 일관성, 격리 및 내구성 또는 ACID)
+ 리전 간 가용성 및 복구 요구 사항

다음 표에는 애플리케이션 데이터 요구 사항 및 특성이 나열되어 있으며, Aurora PostgreSQL 호환 및 Amazon RDS for PostgreSQL(관계형) 및 Amazon DynamoDB(비관계형) AWS 데이터베이스 제공의 맥락에서 이에 대해 설명합니다. 관계형 운영 데이터베이스 오퍼링과 비관계형 운영 데이터베이스 오퍼링을 결정하려고 할 때이 매트릭스를 참조할 수 있습니다.


****  

| 
| 
| **데이터베이스** | **SaaS 애플리케이션 데이터 요구 사항 및 특성** | 
| --- |--- |
| **데이터 모델** | **액세스 패턴** | **지연 시간 요구 사항** | **데이터 및 트랜잭션 무결성** | **리전 간 가용성 및 복구** | 
| --- |--- |--- |--- |--- |
| **관계형** (Aurora PostgreSQL 호환 및 Amazon RDS for PostgreSQL)  | Relational or highly normalized. | Doesn’t have to be thoroughly planned beforehand. | Preferably higher latency tolerance; can achieve lower latencies by default with Aurora and by implementing read replicas, caching, and similar features. | High data and transactional integrity maintained by default. | In Amazon RDS, you can create a read replica for cross-Region scaling and failover. [Aurora는 대부분이 프로세스를 자동화합니다.](https://aws.amazon.com/blogs/database/aurora-postgresql-disaster-recovery-solutions-using-amazon-aurora-global-database/). For active-active configurations across multiple AWS 리전, you can use [쓰기 전달](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-write-forwarding.html) in conjunction with [Aurora Global Database](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html).  | 
| **비관계형** (Amazon DynamoDB)  | Usually denormalized. These databases take advantage of patterns for modeling [many-to-many 관계](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-adjacency-graphs.html), [대용량 항목](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-use-s3-too.html), and [시계열 데이터](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-time-series.html). | All access patterns (queries) for data must be thoroughly understood before a data model is produced. | Very low latency with options such as Amazon DynamoDB Accelerator (DAX) able to improve performance even further. | Optional transactional integrity at the cost of performance. Data integrity concerns are shifted to the application. | Easy cross-Region recovery and active-active configuration with global tables. (ACID compliance is achievable only in a single AWS Region.) | 

일부 다중 테넌트 SaaS 애플리케이션에는 이전 표에 포함되지 않은 데이터베이스에서 더 잘 제공되는 고유한 데이터 모델 또는 특수 상황이 있을 수 있습니다. 예를 들어 시계열 데이터 세트, 고도로 연결된 데이터 세트 또는 중앙 집중식 트랜잭션 원장을 유지 관리하려면 다른 유형의 데이터베이스를 사용해야 할 수 있습니다. 모든 가능성을 분석하는 것은이 가이드의 범위를 벗어납니다. AWS 데이터베이스 상품의 포괄적인 목록과 다양한 사용 사례를 높은 수준에서 이행하는 방법은 *Amazon Web Services 개요* 백서의 [데이터베이스](https://docs.aws.amazon.com/whitepapers/latest/aws-overview/database.html) 섹션을 참조하세요.

이 설명서의 나머지 부분에서는 PostgreSQL을 지원하는 AWS 관계형 데이터베이스 서비스인 Amazon RDS 및 Aurora PostgreSQL 호환에 중점을 둡니다. DynamoDB는 SaaS 애플리케이션을 최적화하기 위해 다른 접근 방식이 필요하며, 이는이 가이드의 범위를 벗어납니다. DynamoDB에 대한 자세한 내용은 블로그 AWS 게시물 [Amazon DynamoDB를 사용하여 풀링된 다중 테넌트 SaaS 데이터 분할을 참조하세요](https://aws.amazon.com/blogs/apn/partitioning-pooled-multi-tenant-saas-data-with-amazon-dynamodb/).

## Amazon RDS와 Aurora 중에서 선택
<a name="relational"></a>

대부분의 경우 Amazon RDS for PostgreSQL에서 Aurora PostgreSQL 호환을 사용하는 것이 좋습니다. 다음 표에는이 두 옵션 중에서 결정할 때 고려해야 할 요소가 나와 있습니다.


****  

| **DBMS 구성 요소** | **Amazon RDS for PostgreSQL** | **Aurora PostgreSQL 호환** | 
| --- | --- | --- | 
| 확장성 | 복제 지연 시간 분, 최대 5개의 읽기 전용 복제본 | 1분 미만의 복제 지연(일반적으로 글로벌 데이터베이스의 경우 1초 미만), 최대 15개의 읽기 전용 복제본 | 
| 충돌 복구 | 체크포인트 5분 간격(기본값), 데이터베이스 성능 저하 가능 | 빠른 복구를 위해 병렬 스레드를 사용한 비동기 복구 | 
| 장애 조치 | 충돌 복구 시간 외에 60\$1120초 | 일반적으로 약 30초(충돌 복구 포함) | 
| 스토리지 | 최대 IOPS 256,000 | Aurora 인스턴스 크기 및 용량에 의해서만 제한되는 IOPS | 
| 고가용성 및 재해 복구 | 대기 인스턴스가 있는 두 개의 가용 영역, 읽기 전용 복제본 또는 복사된 백업에 대한 리전 간 장애 조치 | 기본적으로 3개의 가용 영역, Aurora 글로벌 데이터베이스를 사용한 리전 간 장애 조치, 활성-활성 구성을 AWS 리전 위해를 통한 [쓰기 전달](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-write-forwarding.html)  | 
| 백업 | 백업 기간 동안는 성능에 영향을 미칠 수 있습니다. | 자동 증분 백업, 성능 영향 없음 | 
| 데이터베이스 인스턴스 클래스 | [Amazon RDS 인스턴스 클래스 목록](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) 참조 | [Aurora 인스턴스 클래스 목록](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.DBInstanceClass.html) 참조 | 

이전 표에 설명된 모든 범주에서 Aurora PostgreSQL 호환이 일반적으로 더 나은 옵션입니다. 그러나 Amazon RDS for PostgreSQL은 Aurora의 보다 강력한 기능 세트를 희생하면서 보다 비용 효율적인 옵션을 제공할 수 있는 인스턴스 클래스를 더 많이 선택하므로 중소 규모의 워크로드에도 여전히 적합할 수 있습니다.