Module 5: Storage and Databases --- part 2
學習目標
- Storage and Databases 基本概念
- Amazon Elastic Block Store (Amazon EBS) 優點
- Amazon Simple Storage Service (Amazon S3) 優點
- Amazon Elastic File System (Amazon EFS) 優點
- Storage solutions
- Amazon Relational Database Service (Amazon RDS) 優點
- Amazon DynamoDB 優點
- Database services
File Storage
Multiple clients (e.g. users, applications, servers ...) can access data that is stored in shared file folders.
A storage server uses block storage with a local file system to organize files. Clients access data through file paths.
Amazon Elastic File System (Amazon EFS)
A scalable file system used with AWS Cloud services and on-premises resources.
Use cases: Multiple instances can access the same data in EFS at the same time.
Amazon EFS vs. Amazon EBS
Amazon EFS
It stores data in and across multiple Availability Zones.
On-premises servers can access Amazon EFS using AWS Direct Connect.
- Multiple instances reading and writing simultaneously
- Linux file system
- Regional resource
- Automatically scales (scale on demand to petabytes)
Amazon EBS
An Amazon EBS volume stores data in a single Availability Zone.
- Volumes attach to EC2 instances
- AZ level resource
- Need to be in the same AZ to attach EC2 instances
- Volumes do not automatically scale
Relational Databases
- Data is stored in a way that relates it to other pieces of data.
- Use structured query language (SQL) to store and query data.
- This approach allows data to be stored in an easily understandable, consistent, and scalable way.
- Relational Database Management System (RDBMS)
Lift-and-shift migration
Lift and shift (or rehosting) is one way you might consider moving to the cloud.
e.g. AWS Database Migration Service (Amazon DMS)
Simply put, lift and shift means moving a copy of an existing application and data to cloud infrastructure with minimal or no redesigning or modification.
AWS Database Migration Service (Amazon DMS)
AWS DMS enables you to migrate relational databases, non-relational databases, and other types of data stores.
Source Database:
Amazon EC2 / Amazon RDS / on-premises ...
Target Databases:
Amazon EC2 / Amazon RDS / Amazon Aurora / Amazon Redshift / Amazon DynamoDB
優點
- The source database remains fully operational during the migration.
- Downtime is minimized for applications that rely on that database.
- The source and target databases don't have to be of the same type.
- Homogeneous databases:
- same type
- e.g. MySQL -> Amazon DMS -> Amazon RDS for MySQL
- Heterogeneous databases:
- different type
- e.g. Microsoft SQL Server -> AWS Schema Conversion Tool (Amazon SCT) -> Amazon DMS -> Amazon Aurora
Use Cases:
- Development and test database migrations
- Enabling developers to test applications against production data without affecting production users
- Database consolidation
- Combining several databases into a single database
- Continuous replication
- Sending ongoing copies of your data to other target sources instead of doing a one-time migration
- e.g. Disaster recovery
Amazon Relational Database Service (Amazon RDS)
A managed service that enables you to run relational databases in the AWS Cloud.
Amazon RDS is available on 6 database engines, which optimize for memory, performance, or input/output (I/O).
Amazon RDS Supported Database Engines:
- Amazon Aurora ⭐
- PostgreSQL
- MySQL
- MariaDB
- Oracle Database
- Microsoft SQL Server
優點
- Automated patching, hardware provisioning, database setup
- Backups
- Redundancy
- Failover
- Disaster Recovery
- Integrate with AWS Lambda to query your database from a serverless application.
- Security options:
- Encryption at rest (protecting data while it is stored)
- Encryption in transit (protecting data while it is being sent and received)
Amazon Aurora
Amazon Aurora is an enterprise-class relational database. It is compatible with MySQL and PostgreSQL relational databases.
It is up to 5 times faster than standard MySQL databases and up to 3 times faster than standard PostgreSQL databases.
Consider Amazon Aurora if your workloads require high availability.
Amazon Aurora helps to reduce your database costs by reducing unnecessary input/output (I/O) operations, while ensuring that your database resources remain reliable and available.
優點
- 1/10th the cost of commercial databases
- Data replication (It replicates 6 copies of your data across 3 AZ.)
- Up to 15 read replicas
- Continuous backup to Amazon S3
- Point-in-time recovery
Amazon DynamoDB
Amazon DynamoDB is a "key-value database" service. It delivers single-digit millisecond performance at any scale.
- Serverless
- No need to provision, patch, or manage servers
- No need to install, maintain, or operate software
- Non-relational, NoSQL database
- Use structures other than rows and columns to organize data.
- With key-value pairs, data is organized into items (keys), and items have attributes (values).
- Purpose built
- Millisecond response time
- Fully managed
- Highly scalable, Automatic scaling
- Scaling up to 10 trillion requests per day
- Amazon DynamoDB Accelerator (DAX)
- 專門針對 DynamoDB 相容性打造的快取服務
Amazon Redshift
Amazon Redshift is a data warehousing service that you can use for big data analytics. (Big data BI solutions)
It offers the ability to collect data (PB sizes) from many sources and helps you to understand relationships and trends across your data.
總結
Additional Database Services
- Amazon DocumentDB (with MongoDB compatibility)
- A document database service that supports MongoDB workloads.
- Amazon Neptune
- A graph database service.
- Use cases: Build and run applications that work with highly connected datasets, such as recommendation engines, fraud detection, and knowledge graphs.
- Amazon Quantum Ledger Database (Amazon QLDB)
- A ledger database service.
- Use cases: Review a complete history of all the changes that have been made to your application data.
- Amazon Managed Blockchain
- A service that you can use to create and manage blockchain networks with open-source frameworks.
- Blockchain is a distributed ledger system that lets multiple parties run transactions and share data without a central authority.
- Amazon ElastiCache
- A service that adds caching layers on top of your databases to help improve the read times of common requests.
- It supports two types of data stores: Redis and Memcached.
- Amazon DynamoDB Accelerator (DAX)
- An in-memory cache for DynamoDB.
- It helps improve response times from single-digit milliseconds (毫秒) to microseconds (微秒).
留言
張貼留言