Home AWS Module 8 - Databases
Post
Cancel

AWS Module 8 - Databases

Lien de la note Hackmd

Section 1: Amazon Realtional Database Service (RDS)

Unmnagade vs managed services

Unmanaged

managed by you:

  • Scaling
  • Fault tolerance
  • Availability

More fine-tune control

Managed

built in the service:

  • Scaling
  • Fault tolerance
  • Availability

Requires less configuration

Challenges of relational databases

  • Server maintenance and energy footprint
  • Software installation and patches
  • Database backups and high availability
  • Limits on scalability
  • Data security
  • OS installation and patches

Amazon RDS

Managed services responsabilities

You manage

  • App opti

AWS manages:

  • OS installation and patches
  • Databse software installation and patches
  • Database backups
  • High availability
  • Scaling
  • Power and racking and stacking servers
  • Server maintenance

Amazon RDS DB instances

Amazon RDS in a VPC

  • Select IP address range
  • Subnets
  • Configure routing and access control list

High availability with Multi-AZ deployement

1

  • Automatically generates a standby copy in another AZ within the same VPC
  • Enhanced availability

2

Amazon RDS read replicas

Features

  • Offers asynchronous replication
  • Can be promoted to master if needed

Functionality

  • Use for read-heavy database workloads
  • Offload read queries

Use cases

When to Use Amazon RDS

Use Amazon RDS when your app requiresDo not use Amazon RDS when your app requires
Complex transactions or complex queriesMassive read/write rates
A medium to high query or write rate (Up to 30,000 IOPS)Sharding due to high data size or throughput demands
No more than a single worker node or shardSimple GET or PUT requests and queries that a NoSQL database can handle
High durabilityRelational database managemnet (RDBMS) customization

Amazon RDS: Clock-hour billing and db characteristics

Clock-hour billing

  • Resources incur charges when running

Databas characteristics

  • Physical capacity
    • Engine
    • Size
    • Memory class

Amazon RDS: DB purchase type and multiple DB instances

DB purcharse type

  • On-demand isntances
    • Compute capacity by the hour
  • Reserved Instance
    • Low, one-time, upfront paymenent for db instances that are reserved with a 1-year or 3-year term

Number of DB instances

  • Provision multiple DB instance to handle peak loads

Amazon RDS storage

Provisioned storage

  • No charge
    • Bakcup storage up to 100% of db storage for an active db
  • Charge (GB/month)
    • Backup storage for terminated DB instances

Additional storage

  • Charge (GB/month)
    • Backup storage in addition to provisioned storage

Amazon RDS: Deployement type and data transfer

Requests

  • The number of input and output requests that are made to the db

Deployement type - storage and I/O vary, depending on whether you deploy to

  • Single AZ
  • Multiple AZ

Data transfer

  • No charge for inbound data transfer
  • Tiered charges for outbound data transfer

Section 2: Amazon DynamoDB

Realtion vs non-relation DB

What is Amazon DynamoDB ?

  • NoSQL db tables
    • Can be scaled
    • Create tables and add items
  • Global tables
    • Automatically replicates choices across AWS regions
  • Virtually unlimited storage
  • Items can have differing attributes
    • Don’t have to migrate schema
  • Low-latency queries
  • Scalable read/write throughput
  • Store data accross multiples facilities
    • fault-toleratn architecture
    • stored in SSDs
    • encrypt data at rest
    • set time to live
  • Automatically partitions data

Amazon DynamoDB core components

  • Tables, itmes and attributes
  • DynamoDB supports 2 different kinds of primary keys
    • Partition key
    • Sort key

Items in a table must have a key

Section 3: Amazon Redshift

Amazon Redshift

Introduction to Amazon Redshift

  • Fast and fully-managed data warehouse
  • Pay for what you use
  • Complex analytics queries
    • Parallel processing
    • Only seconds

Parallel processing architecture

Automation and scaling

Automate

  • manage
  • monitor
  • scale

Compatibility

  • Supports standard SQL
    • Connect with SQL clients
  • Java connectivity
  • Open DB connectivity
  • Interact direclty with AWS CLI or management console

Amazon Redshift use cases

  • Enterprise data warehouse (EDW)
    • Migrate at a pace that customers are comfortable with
    • Experiment without large upfront cost or commitment
    • Respond faster to business needs
  • Big data
    • Low price point for small customers
    • Managed service for ease of deployment and maintenance
    • Focus more on data and less on database management
  • SaaS
    • Scale the data warehouse capacity as demand grows
    • Add analytic functionality to app
    • Reduce hardware and software costs

Section 4: Amazon Aurora

  • Enterprise-class relational db
  • Compatible with MySQL or PostgreSQL
  • Automate time-consuming tasks (such as provisioning, patching, backup, recovery, failure detection and repair)
  • Can reduce db costs

Amazon Aurora service benefits

  • Fast and available
  • Managed service
  • Simple
  • Pay-as-you-go
  • Compatible

High availability

  • Storing multiple copies through different AZ
  • Data backed up to Amazon S3
  • Use up to 15 read replica

Resilient design

  • Instant crash recovery
  • Does not need to replay the redo log
    • Do it on every read operation
  • Removes the buffer cache from the db process

Wrap-up

Which of the following is a fully managed NoSQL db service ?

  1. Amazon RDS
  2. Amazon DynamoDB
  3. Amazon Aurora
  4. Amazon Redshift
Answer

Keywords:

  • NoSQL

Answer: 2.

This post is licensed under CC BY 4.0 by the author.