

# PERF 3. 워크로드의 데이터를 어떻게 저장, 관리, 액세스하나요?


 특정 시스템에 대한 최적의 스토리지 솔루션은 데이터 유형의 종류(블록, 파일, 객체), 액세스 패턴(랜덤 또는 순차), 필요한 처리량, 액세스 빈도(온라인, 오프라인, 아카이브), 업데이트 빈도(WORM, 동적) 및 가용성과 내구성 제약 사항에 따라 다릅니다. Well-Architected 워크로드는 용도에 맞게 구축된 데이터 저장소를 사용하므로 다양한 기능을 통해 성능을 개선할 수 있습니다.

**Topics**
+ [

# PERF03-BP01 데이터 액세스 및 스토리지 요구 사항을 가장 잘 지원하는 목적별 데이터 스토어 사용
](perf_data_use_purpose_built_data_store.md)
+ [

# PERF03-BP02 데이터 스토어에 사용 가능한 구성 옵션 평가
](perf_data_evaluate_configuration_options_data_store.md)
+ [

# PERF03-BP03 데이터 스토어 성과 지표 수집 및 기록
](perf_data_collect_record_data_store_performance_metrics.md)
+ [

# PERF03-BP04 데이터 스토어에서 쿼리 성능을 개선하기 위한 전략 구현
](perf_data_implement_strategies_to_improve_query_performance.md)
+ [

# PERF03-BP05 캐싱을 활용하는 데이터 액세스 패턴 구현
](perf_data_access_patterns_caching.md)

# PERF03-BP01 데이터 액세스 및 스토리지 요구 사항을 가장 잘 지원하는 목적별 데이터 스토어 사용
PERF03-BP01 데이터 액세스 및 스토리지 요구 사항을 가장 잘 지원하는 목적별 데이터 스토어 사용

 데이터 특성(공유 가능 여부, 크기, 캐시 크기, 액세스 패턴, 지연 시간, 처리량, 데이터 지속성 등)을 이해하여 워크로드에 적합한 목적별 데이터 스토어(스토리지 또는 데이터베이스)를 선택해야 합니다.

 **일반적인 안티 패턴**: 
+  하나의 특정 데이터베이스 솔루션에 대한 내부 경험과 지식만 갖춘 탓에 하나의 데이터 스토어만 고수합니다.
+  모든 워크로드의 데이터 스토리지 및 액세스 요구 사항이 비슷하다고 가정합니다.
+  데이터 자산의 인벤토리 등록을 위한 데이터 카탈로그를 구현하지 않았습니다.

 **이 모범 사례 확립의 이점:** 데이터 특성과 요구 사항을 파악하면 워크로드 요구 사항을 충족하는 가장 효율적이고 성능이 뛰어난 스토리지 기술을 결정할 수 있습니다.

 **이 모범 사례가 확립되지 않을 경우 노출되는 위험 수준:** 높음 

## 구현 지침
구현 지침

 데이터 스토리지를 선택하고 구현할 때는 쿼리, 규모 조정 및 스토리지 특성이 워크로드 데이터 요구 사항을 지원하는지 확인해야 합니다. AWS는 블록 스토리지, 객체 스토리지, 스트리밍 스토리지, 파일 시스템, 관계형, 키 값, 문서, 인메모리, 그래프, 시계열, 원장 데이터베이스를 포함한 다양한 데이터 스토리지 및 데이터베이스 기술을 제공합니다. 각 데이터 관리 솔루션에는 사용 사례 및 데이터 모델을 지원하는 옵션과 구성이 있습니다. 데이터 특성과 요구 사항을 이해하면 모놀리식 스토리지 기술과 제한적인 획일적 접근 방식에서 벗어나 데이터를 적절하게 관리하는 데 집중할 수 있습니다.

### 구현 단계
구현 단계
+  워크로드에 존재하는 다양한 데이터 유형의 인벤토리를 수행합니다.
+  다음과 같은 데이터 특성 및 요구 사항을 이해하고 문서화합니다.
  +  데이터 형식(비정형, 반정형, 관계형) 
  +  데이터 볼륨 및 증가 
  +  데이터 내구성: 영구, 임시, 일시적 
  +  원자성, 일관성, 격리, 내구성(ACID) 요구 사항 
  +  데이터 액세스 패턴(읽기 중심 또는 쓰기 중심) 
  +  Latency 
  +  처리량 
  +  초당 입출력 연산 수(IOPS) 
  +  데이터 보존 기간 
+  데이터 특성에 맞는 AWS의 워크로드에 사용할 수 있는 다양한 데이터 스토어([스토리지](https://docs.aws.amazon.com/whitepapers/latest/aws-overview/storage-services.html) 및 [데이터베이스](https://docs.aws.amazon.com/whitepapers/latest/aws-overview/database.html) 서비스)에 대해 알아봅니다([PERF01-BP01 사용 가능한 클라우드 서비스 및 기능 학습 및 이해](perf_architecture_understand_cloud_services_and_features.md) 참조). 다음은 AWS 스토리지 기술의 몇 가지 예와 주요 특성입니다.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/wellarchitected/latest/framework/perf_data_use_purpose_built_data_store.html)
+  데이터 플랫폼을 구축하는 경우 AWS의 [최신 데이터 아키텍처](https://aws.amazon.com/big-data/datalakes-and-analytics/modern-data-architecture/)를 활용하여 데이터 레이크, 데이터 웨어하우스, 목적별 데이터 스토어를 통합합니다.
+  워크로드에 맞는 데이터 스토어를 선택할 때 고려해야 할 주요 질문은 다음과 같습니다.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/wellarchitected/latest/framework/perf_data_use_purpose_built_data_store.html)
+  비프로덕션 환경에서 실험 및 벤치마킹을 수행하여 워크로드 요구 사항을 가장 잘 해결할 수 있는 데이터 스토어를 파악합니다.

## 리소스
리소스

 **관련 문서:** 
+  [Amazon EBS 볼륨 유형](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) 
+  [Amazon EC2 스토리지](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Storage.html) 
+  [Amazon EFS: Amazon EFS Performance](https://docs.aws.amazon.com/efs/latest/ug/performance.html) 
+  [Amazon FSx for Lustre Performance](https://docs.aws.amazon.com/fsx/latest/LustreGuide/performance.html) 
+  [Amazon FSx for Windows File Server Performance](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/performance.html) 
+  [Amazon Glacier: Amazon Glacier 설명서](https://docs.aws.amazon.com/amazonglacier/latest/dev/introduction.html) 
+  [Amazon S3: 요청 속도 및 성능 고려 사항](https://docs.aws.amazon.com/AmazonS3/latest/dev/request-rate-perf-considerations.html) 
+  [AWS 기반 클라우드 스토리지](https://aws.amazon.com/products/storage/) 
+  [Amazon EBS I/O Characteristics](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-io-characteristics.html) 
+  [AWS 클라우드 데이터베이스](https://aws.amazon.com/products/databases/?ref=wellarchitected) 
+  [AWS Database Caching](https://aws.amazon.com/caching/database-caching/?ref=wellarchitected) 
+  [DynamoDB Accelerator](https://aws.amazon.com/dynamodb/dax/?ref=wellarchitected) 
+  [Amazon Aurora 모범 사례](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.BestPractices.html?ref=wellarchitected) 
+  [Amazon Redshift 성능](https://docs.aws.amazon.com/redshift/latest/dg/c_challenges_achieving_high_performance_queries.html?ref=wellarchitected) 
+  [Amazon Athena top 10 performance tips](https://aws.amazon.com/blogs/big-data/top-10-performance-tuning-tips-for-amazon-athena/?ref=wellarchitected) 
+  [Amazon Redshift Spectrum best practices](https://aws.amazon.com/blogs/big-data/10-best-practices-for-amazon-redshift-spectrum/?ref=wellarchitected) 
+  [Amazon DynamoDB 모범 사례](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/BestPractices.html?ref=wellarchitected) 
+  [Choose between Amazon EC2 and Amazon RDS](https://docs.aws.amazon.com/prescriptive-guidance/latest/migration-sql-server/comparison.html) 
+ [ Best Practices for Implementing Amazon ElastiCache ](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/BestPractices.html)

 **관련 비디오:** 
+  [AWS re:Invent 2023: Improve Amazon Elastic Block Store efficiency and be more cost-efficient](https://www.youtube.com/watch?v=7-CB02rqiuw) 
+  [AWS re:Invent 2023: Optimizing storage price and performance with Amazon Simple Storage Service](https://www.youtube.com/watch?v=RxgYNrXPOLw) 
+  [AWS re:Invent 2023: Building and optimizing a data lake on Amazon Simple Storage Service](https://www.youtube.com/watch?v=mpQa_Zm1xW8) 
+  [AWS re:Invent 2022: Building modern data architectures on AWS](https://www.youtube.com/watch?v=Uk2CqEt5f0o) 
+  [AWS re:Invent 2022: Building data mesh architectures on AWS](https://www.youtube.com/watch?v=nGRvlobeM_U) 
+  [AWS re:Invent 2023: Deep dive into Amazon Aurora and its innovations](https://www.youtube.com/watch?v=je6GCOZ22lI) 
+  [AWS re:Invent 2023: Advanced data modeling with Amazon DynamoDB](https://www.youtube.com/watch?v=PVUofrFiS_A) 
+ [AWS re:Invent 2022: Modernize apps with purpose-built databases](https://www.youtube.com/watch?v=V-DiplATdi0)
+ [ Amazon DynamoDB deep dive: Advanced design patterns ](https://www.youtube.com/watch?v=6yqfmXiZTlM)

 **관련 예제:** 
+  [AWS Purpose Built Databases 워크숍](https://catalog.us-east-1.prod.workshops.aws/workshops/93f64257-52be-4c12-a95b-c0a1ff3b7e2b/en-US) 
+  [Databases for Developers](https://catalog.workshops.aws/db4devs/en-US) 
+  [AWS Modern Data Architecture Immersion Day](https://catalog.us-east-1.prod.workshops.aws/workshops/32f3e732-d67d-4c63-b967-c8c5eabd9ebf/en-US) 
+  [Build a data mesh on AWS](https://catalog.us-east-1.prod.workshops.aws/workshops/23e6326b-58ee-4ab0-9bc7-3c8d730eb851/en-US) 
+  [ Amazon S3 Examples](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/s3-examples.html) 
+  [Optimize Data Pattern using Amazon Redshift Data Sharing](https://wellarchitectedlabs.com/sustainability/300_labs/300_optimize_data_pattern_using_redshift_data_sharing/) 
+  [Database Migrations](https://github.com/aws-samples/aws-database-migration-samples) 
+  [MS SQL Server - AWS Database Migration Service (AWS DMS) Replication Demo](https://github.com/aws-samples/aws-dms-sql-server) 
+  [Database Modernization Hands On 워크숍](https://github.com/aws-samples/amazon-rds-purpose-built-workshop) 
+  [Amazon Neptune Samples](https://github.com/aws-samples/amazon-neptune-samples) 

# PERF03-BP02 데이터 스토어에 사용 가능한 구성 옵션 평가
PERF03-BP02 데이터 스토어에 사용 가능한 구성 옵션 평가

 데이터 스토어에 사용할 수 있는 다양한 기능과 구성 옵션을 이해하고 평가하여 워크로드에 맞는 스토리지 공간과 성능을 최적화하세요.

 **일반적인 안티 패턴**: 
+  모든 워크로드에 Amazon EBS와 같은 하나의 스토리지 유형만 사용합니다.
+  모든 스토리지 계층을 기준으로 한 실제 테스트 없이 워크로드 전체에 프로비저닝된 IOPS를 사용합니다.
+  선택한 데이터 관리 솔루션의 구성 옵션을 알지 못합니다.
+  다른 사용 가능한 구성 옵션을 고려하지 않고 인스턴스 크기만 늘립니다.
+  데이터 스토어의 규모 조정 특성을 테스트하고 있지 않습니다.

 **이 모범 사례 확립의 이점:** 데이터 스토어 구성을 탐색하고 실험하여 인프라 비용을 절감하고, 성능을 개선하며, 워크로드를 유지하는 데 들여야 하는 수고를 줄일 수 있습니다.

 **이 모범 사례가 확립되지 않을 경우 노출되는 위험 수준:** 중간 

## 구현 지침
구현 지침

 워크로드에는 데이터 스토리지 및 액세스 요구 사항에 따라 하나 이상의 데이터 스토어가 사용될 수 있습니다. 성능 효율성과 비용을 최적화하려면 데이터 액세스 패턴을 평가하여 적절한 데이터 스토어 구성을 결정해야 합니다. 데이터 스토어 옵션을 탐색하는 동안 스토리지 옵션, 메모리, 컴퓨팅, 읽기 복제본, 일관성 요구 사항, 연결 풀링 및 캐싱 옵션과 같은 다양한 측면을 고려하세요. 이러한 다양한 구성 옵션을 실험하여 성능 효율성 지표를 개선해 보세요.

### 구현 단계
구현 단계
+  데이터 스토어의 현재 구성(인스턴스 유형, 스토리지 크기, 데이터베이스 엔진 버전 등)을 파악합니다.
+  AWS 설명서 및 모범 사례를 검토하여 데이터 스토어의 성능을 개선하는 데 도움이 되는 권장 구성 옵션에 대해 알아보세요. 다음과 같은 주요 데이터 스토어 옵션을 고려해야 합니다.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/wellarchitected/latest/framework/perf_data_evaluate_configuration_options_data_store.html)
+  비프로덕션 환경에서 실험 및 벤치마킹을 수행하여 워크로드 요구 사항을 해결할 수 있는 구성 옵션을 파악합니다.
+  실험을 마친 후에는 마이그레이션을 계획하고 성과 지표를 검증합니다.
+  AWS 모니터링(예: [Amazon CloudWatch](https://aws.amazon.com/cloudwatch/)) 및 최적화(예: [Amazon S3 Storage Lens](https://aws.amazon.com/s3/storage-lens/)) 도구를 활용하고 실제 사용 패턴에 기반하여 데이터 스토어를 지속적으로 최적화합니다.

## 리소스
리소스

 **관련 문서**: 
+  [AWS 기반 클라우드 스토리지](https://aws.amazon.com/products/storage/?ref=wellarchitected) 
+  [Amazon EBS 볼륨 유형](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) 
+  [Amazon EC2 스토리지](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Storage.html) 
+  [Amazon EFS: Amazon EFS Performance](https://docs.aws.amazon.com/efs/latest/ug/performance.html) 
+  [Amazon FSx for Lustre Performance](https://docs.aws.amazon.com/fsx/latest/LustreGuide/performance.html) 
+  [Amazon FSx for Windows File Server Performance](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/performance.html) 
+  [Amazon Glacier: Amazon Glacier 설명서](https://docs.aws.amazon.com/amazonglacier/latest/dev/introduction.html) 
+  [Amazon S3: 요청 속도 및 성능 고려 사항](https://docs.aws.amazon.com/AmazonS3/latest/dev/request-rate-perf-considerations.html) 
+  [Amazon EBS I/O Characteristics](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-io-characteristics.html) 
+  [ 클라우드 데이터베이스AWS](https://aws.amazon.com/products/databases/?ref=wellarchitected) 
+  [AWS Database Caching](https://aws.amazon.com/caching/database-caching/?ref=wellarchitected) 
+  [DynamoDB Accelerator](https://aws.amazon.com/dynamodb/dax/?ref=wellarchitected) 
+  [Amazon Aurora 모범 사례](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.BestPractices.html?ref=wellarchitected) 
+  [Amazon Redshift 성능](https://docs.aws.amazon.com/redshift/latest/dg/c_challenges_achieving_high_performance_queries.html?ref=wellarchitected) 
+  [Amazon Athena top 10 performance tips](https://aws.amazon.com/blogs/big-data/top-10-performance-tuning-tips-for-amazon-athena/?ref=wellarchitected) 
+  [Amazon Redshift Spectrum best practices](https://aws.amazon.com/blogs/big-data/10-best-practices-for-amazon-redshift-spectrum/?ref=wellarchitected) 
+  [Amazon DynamoDB 모범 사례](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/BestPractices.html?ref=wellarchitected) 

 **관련 비디오:** 
+  [AWS re:Invent 2023: Improve Amazon Elastic Block Store efficiency and be more cost-efficient](https://www.youtube.com/watch?v=7-CB02rqiuw) 
+  [AWS re:Invent 2023: Optimize storage price and performance with Amazon Simple Storage Service](https://www.youtube.com/watch?v=RxgYNrXPOLw) 
+  [AWS re:Invent 2023: Building and optimizing a data lake on Amazon Simple Storage Service](https://www.youtube.com/watch?v=mpQa_Zm1xW8) 
+  [AWS re:Invent 2023: What's new with AWS file storage](https://www.youtube.com/watch?v=yXIeIKlTFV0) 
+  [AWS re:Invent 2023: Dive deep into Amazon DynamoDB](https://www.youtube.com/watch?v=ld-xoehkJuU) 

 **관련 예제:** 
+  [AWS Purpose Built Databases 워크숍](https://catalog.us-east-1.prod.workshops.aws/workshops/93f64257-52be-4c12-a95b-c0a1ff3b7e2b/en-US) 
+  [Databases for Developers](https://catalog.workshops.aws/db4devs/en-US) 
+  [AWS Modern Data Architecture Immersion Day](https://catalog.us-east-1.prod.workshops.aws/workshops/32f3e732-d67d-4c63-b967-c8c5eabd9ebf/en-US) 
+  [Amazon EBS Autoscale](https://github.com/awslabs/amazon-ebs-autoscale) 
+  [ Amazon S3 Examples](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/s3-examples.html) 
+  [Amazon DynamoDB Examples](https://github.com/aws-samples/aws-dynamodb-examples) 
+  [AWS Database migration samples](https://github.com/aws-samples/aws-database-migration-samples) 
+  [Database Modernization 워크숍](https://github.com/aws-samples/amazon-rds-purpose-built-workshop) 
+  [Working with parameters on your Amazon RDS for Postgress DB](https://github.com/awsdocs/amazon-rds-user-guide/blob/main/doc_source/Appendix.PostgreSQL.CommonDBATasks.Parameters.md) 

# PERF03-BP03 데이터 스토어 성과 지표 수집 및 기록
PERF03-BP03 데이터 스토어 성과 지표 수집 및 기록

 데이터 스토어에 대한 관련 성과 지표를 추적하고 기록하여 데이터 관리 솔루션의 성능을 파악할 수 있습니다. 이러한 지표는 데이터 스토어를 최적화하고, 워크로드 요구 사항이 충족되는지 확인하며, 워크로드 성능에 대한 명확한 개요를 제공하는 데 도움이 될 수 있습니다.

 **일반적인 안티 패턴**: 
+  지표에 대해 수동 로그 파일 검색만 사용합니다.
+  팀에서 사용하는 내부 도구에만 지표를 게시하고 워크로드를 종합적으로 바라보고 있지 않습니다.
+  선택한 모니터링 소프트웨어에서 기록한 기본 지표만 사용합니다.
+  문제가 발생한 경우에만 지표를 검토합니다.
+  시스템 수준 지표만 모니터링하며 데이터 액세스나 사용량 지표는 캡처하지 않습니다.

 **이 모범 사례 확립의 이점:** 성능 기준선을 설정하면 워크로드의 정상적인 동작과 요구 사항을 이해하는 데 도움이 됩니다. 비정상적인 패턴을 더 빨리 식별하고 디버깅할 수 있어 데이터 스토어의 성능과 신뢰성이 향상됩니다.

 **이 모범 사례가 확립되지 않을 경우 노출되는 위험 수준:** 높음 

## 구현 지침
구현 지침

 데이터 스토어의 성능을 모니터링하려면 일정 기간에 걸쳐 여러 성과 지표를 기록해야 합니다. 이를 통해 이상 징후를 탐지할 수 있을뿐더러 비즈니스 지표를 기준으로 성능을 측정하여 워크로드 요구 사항을 충족하는지 확인할 수 있습니다.

 지표에는 데이터 스토어를 지원하는 기본 시스템과 데이터베이스 지표가 모두 포함되어야 합니다. 기본 시스템 지표에는 CPU 사용률, 메모리, 사용 가능한 디스크 스토리지, 디스크 I/O, 캐시 적중률, 네트워크 인바운드 및 아웃바운드 지표가 포함될 수 있습니다. 데이터베이스 지표는 초당 트랜잭션, 상위 쿼리, 평균 쿼리 속도, 응답 시간, 인덱스 사용량, 테이블 잠금, 쿼리 시간 초과 및 열린 연결 수로 구성 가능합니다. 이 데이터는 워크로드의 성능과 데이터 관리 솔루션의 사용 방법을 이해하는 데 중요합니다. 이러한 지표를 데이터 중심 전략에 포함시켜 워크로드의 리소스를 조정하고 최적화할 수 있습니다.  

 데이터베이스 성능과 관련된 성능 측정값을 기록하는 도구, 라이브러리 및 시스템을 사용합니다.

## 구현 단계
구현 단계
+  추적할 데이터 스토어의 주요 성과 지표를 식별하세요.
  +  [Amazon S3 지표 및 차원](https://docs.aws.amazon.com/AmazonS3/latest/userguide/metrics-dimensions.html) 
  +  [Amazon RDS 인스턴스에서 지표 모니터링](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Monitoring.html) 
  +  [Amazon RDS의 성능 개선 도우미로 DB 로드 모니터링](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) 
  +  [Enhanced Monitoring 개요](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.overview.html) 
  +  [DynamoDB 지표 및 차원](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/metrics-dimensions.html) 
  +  [Monitoring DynamoDB Accelerator](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.Monitoring.html) 
  +  [Monitoring Amazon MemoryDB with Amazon CloudWatch](https://docs.aws.amazon.com/memorydb/latest/devguide/monitoring-cloudwatch.html) 
  +  [어떤 지표를 모니터링해야 합니까?](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.WhichShouldIMonitor.html)
  +  [Amazon Redshift 클러스터 성능 모니터링](https://docs.aws.amazon.com/redshift/latest/mgmt/metrics.html) 
  +  [Timestream metrics and dimensions](https://docs.aws.amazon.com/timestream/latest/developerguide/metrics-dimensions.html) 
  +  [Amazon Aurora에 대한 Amazon CloudWatch 지표](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.AuroraMonitoring.Metrics.html) 
  +  [Logging and monitoring in Amazon Keyspaces (for Apache Cassandra)](https://docs.aws.amazon.com/keyspaces/latest/devguide/monitoring.html) 
  +  [Monitoring Amazon Neptune Resources](https://docs.aws.amazon.com/neptune/latest/userguide/monitoring.html) 
+  승인된 로깅 및 모니터링 솔루션을 사용하여 이러한 지표를 수집합니다. [Amazon CloudWatch](https://aws.amazon.com/cloudwatch/)는 아키텍처의 리소스 전반에서 지표를 수집할 수 있습니다. 또한 사용자 지정 지표를 수집하고 게시하여 비즈니스 또는 파생 지표를 파악할 수도 있습니다. CloudWatch 또는 서드파티 솔루션을 사용하여 임곗값 위반 시점을 나타내는 경보를 설정합니다.
+  데이터 스토어 모니터링에 성능 이상을 탐지하는 기계 학습 솔루션의 이점을 활용할 수 있는지 확인합니다.
  +  [Amazon RDS에 대한 Amazon DevOps Guru](https://docs.aws.amazon.com/devops-guru/latest/userguide/working-with-rds.overview.how-it-works.html)에서는 성능 문제에 대한 가시성을 제공하고 권장 수정 조치를 제안합니다.
+  보안 및 운영 목표에 맞게 모니터링 및 로깅 솔루션에서 데이터 보존을 구성합니다.
  +  [CloudWatch 지표에 대한 기본 데이터 보존](https://aws.amazon.com/cloudwatch/faqs/#AWS_resource_.26_custom_metrics_monitoring) 
  +  [CloudWatch Logs에 대한 기본 데이터 보존](https://aws.amazon.com/cloudwatch/faqs/#Log_management) 

## 리소스
리소스

 **관련 문서**: 
+  [AWS Database Caching](https://aws.amazon.com/caching/database-caching/) 
+  [Amazon Athena top 10 performance tips](https://aws.amazon.com/blogs/big-data/top-10-performance-tuning-tips-for-amazon-athena/) 
+  [Amazon Aurora 모범 사례](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.BestPractices.html) 
+  [DynamoDB Accelerator](https://aws.amazon.com/dynamodb/dax/) 
+  [Amazon DynamoDB 모범 사례](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/BestPractices.html) 
+  [Amazon Redshift Spectrum best practices](https://aws.amazon.com/blogs/big-data/10-best-practices-for-amazon-redshift-spectrum/) 
+  [Amazon Redshift 성능](https://docs.aws.amazon.com/redshift/latest/dg/c_challenges_achieving_high_performance_queries.html) 
+  [AWS 클라우드 데이터베이스](https://aws.amazon.com/products/databases/) 
+  [Amazon RDS Performance Insights](https://aws.amazon.com/rds/performance-insights/) 

 **관련 비디오:** 
+ [AWS re:Invent 2022 - Performance monitoring with Amazon RDS and Aurora, featuring Autodesk ](https://www.youtube.com/watch?v=wokRbwK4YLo)
+ [ Database Performance Monitoring and Tuning with Amazon DevOps Guru for Amazon RDS ](https://www.youtube.com/watch?v=cHKuVH7YGBE)
+ [AWS re:Invent 2023 - What’s new with AWS file storage ](https://www.youtube.com/watch?v=yXIeIKlTFV0)
+ [AWS re:Invent 2023 - Dive deep into Amazon DynamoDB ](https://www.youtube.com/watch?v=ld-xoehkJuU)
+ [AWS re:Invent 2023 - Building and optimizing a data lake on Amazon S3 ](https://www.youtube.com/watch?v=mpQa_Zm1xW8)
+ [AWS re:Invent 2023 - What’s new with AWS file storage ](https://www.youtube.com/watch?v=yXIeIKlTFV0)
+ [AWS re:Invent 2023 - Dive deep into Amazon DynamoDB ](https://www.youtube.com/watch?v=ld-xoehkJuU)
+  [Best Practices for Monitoring Redis Workloads on Amazon ElastiCache](https://www.youtube.com/watch?v=c-hTMLN35BY&ab_channel=AWSOnlineTechTalks) 

 **관련 예제:** 
+  [AWS Dataset Ingestion Metrics Collection Framework](https://github.com/awslabs/aws-dataset-ingestion-metrics-collection-framework) 
+  [Amazon RDS Monitoring 워크숍](https://www.workshops.aws/?tag=Enhanced%20Monitoring) 
+ [AWS Purpose Built Databases 워크숍 ](https://catalog.us-east-1.prod.workshops.aws/workshops/93f64257-52be-4c12-a95b-c0a1ff3b7e2b/en-US)

# PERF03-BP04 데이터 스토어에서 쿼리 성능을 개선하기 위한 전략 구현
PERF03-BP04 데이터 스토어에서 쿼리 성능을 개선하기 위한 전략 구현

 데이터를 최적화하고 데이터 쿼리를 개선하는 전략을 구현하여 워크로드에 대한 확장성과 효율적인 성능을 향상할 수 있습니다.

 **일반적인 안티 패턴**: 
+  데이터 스토어에서는 데이터를 파티션하지 않습니다.
+  데이터 스토어에 하나의 파일 형식으로만 데이터를 저장합니다.
+  데이터 스토어에서 인덱스를 사용하지 않습니다.

 **이 모범 사례 확립의 이점:** 데이터 및 쿼리 성능을 최적화하면 효율성이 향상되고 비용이 절감되며 사용자 경험이 향상됩니다.

 **이 모범 사례가 확립되지 않을 경우 노출되는 위험 수준:** 중간 

## 구현 지침
구현 지침

데이터 최적화 및 쿼리 튜닝은 전체 클라우드 워크로드의 성능과 응답성에 영향을 미치기 때문에 데이터 스토어의 성능 효율성에 있어 매우 중요한 측면입니다. 쿼리가 최적화되지 않으면 리소스 사용량과 병목 현상이 증가하여 데이터 스토어의 전반적인 효율성이 저하될 수 있습니다.

데이터 최적화는 효율적인 데이터 스토리지와 액세스를 위한 여러 기술을 포함합니다. 또한 데이터 저장소의 쿼리 성능을 개선하는 데도 도움이 됩니다. 주요 전략에는 데이터 파티셔닝, 데이터 압축, 데이터 비정규화가 포함되며, 이는 스토리지와 액세스 모두에 대해 데이터를 최적화하는 데 도움이 됩니다.

### 구현 단계
구현 단계
+  데이터 스토어에서 수행되는 중요한 데이터 쿼리를 이해하고 분석합니다.
+  데이터 스토어에서 느린 쿼리를 식별하고 쿼리 계획을 사용하여 현재 상태를 파악합니다.
  +  [Amazon Redshift에서 쿼리 계획 분석](https://docs.aws.amazon.com/redshift/latest/dg/c-analyzing-the-query-plan.html) 
  +  [Athena에서 EXPLAIN 및 EXPLAIN ANALYZE 사용](https://docs.aws.amazon.com/athena/latest/ug/athena-explain-statement.html) 
+  쿼리 성능을 개선하기 위한 전략을 구현합니다. 몇 가지 주요 전략은 다음과 같습니다.
  +  [열 파일 형식](https://docs.aws.amazon.com/athena/latest/ug/columnar-storage.html)(예: Parquet 또는 ORC)을 사용합니다.
  + 스토리지 공간 및 I/O 작업을 줄이기 위해 데이터 스토어의 데이터 압축.
  +  데이터를 더 작은 부분으로 분할하고 데이터 스캔 시간을 줄이기 위한 데이터 파티셔닝.
    + [ Athena에서 데이터 분할 ](https://docs.aws.amazon.com/athena/latest/ug/partitions.html)
    + [ 파티션 및 데이터 배포 ](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.Partitions.html)
  +  쿼리의 공통 열에서 데이터 인덱싱.
  +  빈번하게 사용되는 쿼리에는 구체화된 뷰를 사용하세요.
    + [ Understanding materialized views ](https://docs.aws.amazon.com/prescriptive-guidance/latest/materialized-views-redshift/understanding-materialized-views.html)
    + [ Amazon Redshift에서 구체화된 뷰 생성 ](https://docs.aws.amazon.com/redshift/latest/dg/materialized-view-overview.html)
  +  쿼리에 적합한 조인 작업을 선택합니다. 두 테이블을 조인하는 경우 조인 왼쪽에 큰 테이블을 지정하고 조인 오른쪽에 작은 테이블을 지정합니다.
  +  지연 시간을 개선하고 데이터베이스 I/O 작업 횟수를 줄이기 위한 분산 캐싱 솔루션.
  +  [정리](https://docs.aws.amazon.com/prescriptive-guidance/latest/postgresql-maintenance-rds-aurora/autovacuum.html), 리인덱싱, [통계 실행](https://docs.aws.amazon.com/redshift/latest/dg/t_Analyzing_tables.html)과 같은 정기적 유지 관리.
+  비운영 환경에서의 실험 및 테스트 전략.

## 리소스
리소스

 **관련 문서**: 
+  [Amazon Aurora 모범 사례](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.BestPractices.html?ref=wellarchitected) 
+  [Amazon Redshift 성능](https://docs.aws.amazon.com/redshift/latest/dg/c_challenges_achieving_high_performance_queries.html?ref=wellarchitected) 
+  [Amazon Athena top 10 performance tips](https://aws.amazon.com/blogs/big-data/top-10-performance-tuning-tips-for-amazon-athena/?ref=wellarchitected) 
+  [AWS Database Caching](https://aws.amazon.com/caching/database-caching/?ref=wellarchitected) 
+  [Best Practices for Implementing Amazon ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/BestPractices.html) 
+  [ Athena에서 데이터 분할](https://docs.aws.amazon.com/athena/latest/ug/partitions.html) 

 **관련 비디오:** 
+ [AWS re:Invent 2023 - AWS storage cost-optimization best practices ](https://www.youtube.com/watch?v=8LVKNHcA6RY)
+ [AWS re:Invent 2022 - Performance monitoring with Amazon RDS and Aurora, featuring Autodesk ](https://www.youtube.com/watch?v=wokRbwK4YLo)
+  [Optimize Amazon Athena Queries with New Query Analysis Tools ](https://www.youtube.com/watch?v=7JUyTqglmNU&ab_channel=AmazonWebServices) 

 **관련 예제:** 
+ [AWS Purpose Built Databases 워크숍 ](https://catalog.us-east-1.prod.workshops.aws/workshops/93f64257-52be-4c12-a95b-c0a1ff3b7e2b/en-US)

# PERF03-BP05 캐싱을 활용하는 데이터 액세스 패턴 구현
PERF03-BP05 캐싱을 활용하는 데이터 액세스 패턴 구현

 자주 액세스하는 데이터를 빠르게 검색하기 위해 데이터를 캐싱하여 이점을 얻을 수 있는 액세스 패턴을 구현하세요.

 **일반적인 안티 패턴**: 
+  자주 변경되는 데이터를 캐시합니다.
+  캐시된 데이터가 마치 영구적으로 저장되고 항상 사용 가능한 것처럼 의존합니다.
+  캐시된 데이터의 일관성은 고려하지 않습니다.
+  캐싱 구현의 효율성을 모니터링하지 않습니다.

 **이 모범 사례 확립의 이점:** 캐시에 데이터를 저장하면 읽기 지연 시간, 읽기 처리량, 사용자 경험 및 전반적인 효율성을 개선하고 비용을 절감할 수 있습니다.

 **이 모범 사례가 확립되지 않을 경우 노출되는 위험 수준:** 중간 

## 구현 지침
구현 지침

 캐시는 동일한 데이터에 대한 향후 요청을 더 빠르고 효율적으로 처리할 수 있도록 데이터를 저장하는 것을 목적으로 하는 소프트웨어 또는 하드웨어 구성 요소입니다. 캐시에 저장된 데이터는 이전 계산을 반복하거나 다른 데이터 저장소에서 가져와서 손실된 경우 재구성할 수 있습니다.

 데이터 캐싱은 전체 애플리케이션 성능을 개선하고 기본 데이터 소스의 부담을 줄이는 가장 효과적인 전략 중 하나가 될 수 있습니다. 데이터를 원격 직접 호출을 수행하는 애플리케이션 내에서(*클라이언트 측 캐싱*이라고 함) 또는 빠른 보조 서비스를 사용하여 데이터를 저장하는 등(*원격 캐싱*이라고 함) 애플리케이션의 여러 수준에서 데이터를 캐싱할 수 있습니다.

 **클라이언트 측 캐싱** 

 클라이언트측 캐싱을 사용하면 각 클라이언트(백엔드 데이터 스토어를 쿼리하는 애플리케이션 또는 서비스)가 고유한 쿼리 결과를 지정된 시간 동안 로컬에 저장할 수 있습니다. 이렇게 하면 로컬 클라이언트 캐시를 먼저 확인하여 네트워크를 통해 데이터 스토어에 대한 요청 수를 줄일 수 있습니다. 결과가 없는 경우 애플리케이션은 데이터 스토어를 쿼리하고 해당 결과를 로컬에 저장할 수 있습니다. 이 패턴을 사용하면 각 클라이언트가 가능한 가장 가까운 위치(클라이언트 자체)에 데이터를 저장할 수 있으므로 지연 시간을 최소화할 수 있습니다. 또한 클라이언트는 백엔드 데이터 스토어를 사용할 수 없는 경우에도 일부 쿼리를 계속 제공하여 전체 시스템의 가용성을 높일 수 있습니다.

 이 접근 방식의 한 가지 단점은 여러 클라이언트가 관련된 경우 동일한 캐시된 데이터를 로컬에 저장할 수 있다는 것입니다. 이로 인해 클라이언트 간에 중복 스토리지 사용과 데이터 불일치가 모두 발생합니다. 한 클라이언트가 쿼리 결과를 캐시하고 1분 후에 다른 클라이언트가 동일한 쿼리를 실행하여 다른 결과를 얻을 수 있습니다.

 **원격 캐싱** 

 클라이언트 간 데이터 중복 문제를 해결하기 위해 빠른 외부 서비스 또는 *원격 캐시*를 사용하여 쿼리된 데이터를 저장할 수 있습니다. 각 클라이언트는 로컬 데이터스토어를 확인하는 대신 백엔드 데이터스토어를 쿼리하기 전에 원격 캐시를 확인합니다. 이 전략을 사용하면 클라이언트와 독립적으로 스토리지 공간이 확장되므로 클라이언트 간 응답 일관성이 향상되고 저장된 데이터의 효율성이 향상되며 캐시된 데이터의 볼륨이 커집니다.

 원격 캐시의 단점은 원격 캐시를 확인하기 위해 추가 네트워크 홉이 필요하기 때문에 전체 시스템의 지연 시간이 더 길어질 수 있다는 것입니다. 클라이언트 측 캐싱은 다중 레벨 캐싱을 위한 원격 캐싱과 함께 사용하여 지연 시간을 개선할 수 있습니다.

### 구현 단계
구현 단계
+  캐싱의 이점을 누릴 수 있는 데이터베이스, API 및 네트워크 서비스를 식별합니다. 읽기 워크로드가 많거나 쓰기 대 읽기 비율이 높거나 규모 조정 비용이 많이 드는 서비스는 캐싱의 대상입니다.
  +  [Database Caching](https://aws.amazon.com/caching/database-caching/) 
  +  [응답성 향상을 위한 API 캐싱 활성화](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html) 
+  액세스 패턴에 가장 적합한 유형의 캐싱 전략을 식별하세요.
  +  [캐싱 전략](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Strategies.html) 
  +  [AWS Caching Solutions](https://aws.amazon.com/caching/aws-caching/) 
+  데이터 스토어에 대한 [Caching Best Practices](https://aws.amazon.com/caching/best-practices/)를 따릅니다.
+  데이터의 최신 상태를 유지하고 백엔드 데이터스토어에 대한 부담을 줄이는 모든 데이터에 대해 Time-To-Live(TTL)와 같은 캐시 무효화 전략을 구성하세요.
+  자동 연결 재시도, 지수 백오프, 클라이언트 측 시간 제한, 연결 풀링과 같은 기능을 클라이언트에서 활성화하여 성능과 신뢰성을 개선할 수 있습니다.
  +  [Best practices: Redis clients and Amazon ElastiCache (Redis OSS)](https://aws.amazon.com/blogs/database/best-practices-redis-clients-and-amazon-elasticache-for-redis/) 
+  모니터 캐시 적중률을 80% 이상 목표로 합니다. 값이 낮으면 캐시 크기가 충분하지 않거나 액세스 패턴이 캐싱의 이점을 얻지 못한다는 의미일 수 있습니다.
  +  [Which metrics should I monitor?](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.WhichShouldIMonitor.html)
  +  [Best practices for monitoring Redis workloads on Amazon ElastiCache](https://www.youtube.com/watch?v=c-hTMLN35BY) 
  +  [Monitoring best practices with Amazon ElastiCache (Redis OSS) using Amazon CloudWatch](https://aws.amazon.com/blogs/database/monitoring-best-practices-with-amazon-elasticache-for-redis-using-amazon-cloudwatch/) 
+  [데이터 복제](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Replication.Redis.Groups.html)를 구현하여 여러 인스턴스로 읽기를 오프로드하고 데이터 읽기 성능과 가용성을 개선합니다.

## 리소스
리소스

 **관련 문서**: 
+  [Using the Amazon ElastiCache Well-Architected Lens](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WellArchitechtedLens.html) 
+  [Monitoring best practices with Amazon ElastiCache (Redis OSS) using Amazon CloudWatch](https://aws.amazon.com/blogs/database/monitoring-best-practices-with-amazon-elasticache-for-redis-using-amazon-cloudwatch/) 
+  [어떤 지표를 모니터링해야 합니까?](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.WhichShouldIMonitor.html)
+  [Performance at Scale with Amazon ElastiCache 백서](https://docs.aws.amazon.com/whitepapers/latest/scale-performance-elasticache/scale-performance-elasticache.html) 
+  [캐싱 관련 당면 과제 및 전략](https://aws.amazon.com/builders-library/caching-challenges-and-strategies/) 

 **관련 비디오:** 
+  [Amazon ElastiCache Learning Path](https://pages.awscloud.com/GLB-WBNR-AWS-OTT-2021_LP_0003-DAT_AmazonElastiCache.html) 
+  [Design for success with Amazon ElastiCache best practices](https://youtu.be/_4SkEy6r-C4) 
+ [AWS re:Invent 2020 - Design for success with Amazon ElastiCache best practices ](https://www.youtube.com/watch?v=_4SkEy6r-C4)
+ [AWS re:Invent 2023 - [LAUNCH] Introducing Amazon ElastiCache Serverless ](https://www.youtube.com/watch?v=YYStP97pbXo)
+ [AWS re:Invent 2022 - 5 great ways to reimagine your data layer with Redis ](https://www.youtube.com/watch?v=CD1kvauvKII)
+ [AWS re:Invent 2021 - Deep dive on Amazon ElastiCache (Redis OSS) ](https://www.youtube.com/watch?v=QEKDpToureQ)

 **관련 예제:** 
+  [Boosting MySQL database performance with Amazon ElastiCache (Redis OSS)](https://aws.amazon.com/getting-started/hands-on/boosting-mysql-database-performance-with-amazon-elasticache-for-redis/) 