yagikota / study

0 stars 0 forks source link

Investigate Amazon Aurora #5

Closed yagikota closed 5 days ago

yagikota commented 1 week ago

What do you do?

I wanna investigate Amazon Aurora concept and architecture

TODO

yagikota commented 6 days ago

Pick up articles or documents

yagikota commented 6 days ago

Questions

Here are 10 questions about Amazon Aurora from an SRE perspective:

1. How does Aurora handle database failovers?

Key points to consider:

2. What are the main differences between Aurora and traditional MySQL/PostgreSQL?

Key points:

3. How does Aurora handle storage scaling?

Key considerations:

4. What monitoring and alerting options are available for Aurora?

Important points:

5. How does Aurora handle backups and disaster recovery?

Key aspects:

6. What are the implications of using Aurora Serverless?

Considerations:

7. How does Aurora handle connection pooling and load balancing?

Important factors:

8. What are the security best practices for Aurora deployments?

Key points:

9. How does Aurora handle schema changes and migrations?

Considerations:

10. What are the trade-offs between Aurora and other database services like DynamoDB?

Key comparisons:

These questions cover important aspects of Aurora from an SRE perspective, focusing on reliability, performance, scalability, security, and operational considerations.

Citations: [1] https://aws.amazon.com/rds/aurora/customers/ [2] https://www.reddit.com/r/aws/comments/j3opqz/aws_aurora_what_issues_have_you_had/ [3] https://www.remoterocketship.com/advice/guide/site-reliability-engineer/infrastructure-sre-interview-questions-and-answers [4] https://aws.amazon.com/rds/aurora/faqs/ [5] https://intellipaat.com/blog/interview-question/amazon-aws-interview-questions/ [6] https://aws.amazon.com/blogs/database/part-2-10-amazon-aurora-tips-for-application-developers/ [7] https://www.youtube.com/watch?v=sdcuI3c6HCI [8] https://www.youtube.com/watch?v=je6GCOZ22lI [9] https://aws.amazon.com/rds/aurora/ [10] https://collin-smith.medium.com/passing-the-aws-certified-sysops-administrator-associate-certification-in-2023-a1e5f08d1b12

yagikota commented 6 days ago

Key Points

→MySQLやPostgreSQLより、パフォーマンスいい image

yagikota commented 6 days ago
Q. S3との関係は? Amazon Auroraでは、**Amazon S3**(Simple Storage Service)を利用して、以下の2つの重要な役割を果たしています。 1. **継続的なバックアップ** Auroraは、データベースのストレージ内容を継続的にS3にバックアップしています。これは、S3が非常に耐久性が高く、データを安全に保存できるためです。具体的には、データベースのトランザクションログやスナップショットが定期的にS3に保存され、データの永続性を確保します。 - **バックアップの特長**: S3へのバックアップは非同期に行われ、Auroraのパフォーマンスに影響を与えません。また、バックアップは増分形式で行われるため、効率的です。 2. **リストア(復元)機能** Auroraでは、S3に保存されたスナップショットやログを使用して、データベースを特定の時点に復元することが可能です。これにより、障害が発生した場合や誤ってデータが削除された場合でも、S3からのバックアップデータを使って迅速にデータベースをリストアできます。
Q. どのタイミングで共有ストレージに転送される?その時のデータ単位は?

Amazon Auroraでは、データベースにおける書き込みは**共有分散ストレージ**に転送されます。この共有ストレージは、3つの異なるアベイラビリティゾーン(AZ)にわたって分散されています。具体的な転送タイミングとデータ単位は以下の通りです。 1. **タイミング** データが書き込まれるタイミングは、アプリケーションがデータベースに対して書き込み要求を行ったときです。データはAuroraの共有ストレージに**非同期かつ並列**で書き込まれます。Auroraは、トランザクションがコミットされた段階で、まずログレコード(REDOログ)を共有ストレージに送ります。このため、トランザクションの完了と同時にデータは共有ストレージに転送されます。 2. **データ単位** Auroraでは、データは**10GBのプロテクショングループ**という単位で管理されています。データが共有ストレージに書き込まれる際、まずこの10GB単位のブロックに分割され、それぞれが3つのAZに分散されます。それぞれのAZには2つのコピーが作成され、合計で6つのコピーが保持されます【9†source】。また、クォーラムモデルに基づき、書き込みは6つのノード中4つが成功すれば完了とみなされます。 この仕組みにより、Auroraは耐障害性と高可用性を実現しつつ、効率的にデータを保存しています。

yagikota commented 6 days ago

他のDBからのmigration

image

もうちょい詳しく知りたい。

yagikota commented 6 days ago

Youtube

詳しく解説されている。

Aurora関連ブログ

論文 Amazon Aurora: Design Considerations for High Throughput Cloud-Native Relational Databases

yagikota commented 5 days ago

クラスターエンドポイント→マスターに行くの? --> yes

yagikota commented 5 days ago

Next Step

MySQL -> Aurora(MYSQL)のmigrationについて調査