AWS database services

This was my preparation note while I appeared for AWS solution architect – Associate exam. I cleared it in first attempt with good margin. Sharing it here as I guess it helps for beginners and aspirants.

Other notes in this series.

Aurora DB
  • Amazon’s database. Only available in the cloud.
  • 5 times performant than MySql. 1/10 cost of commercial databases.
  • Supports autoscaling
    • Storage autoscales.
    • Compute resource also can scale up. Need a downtime of 2 mins.
  • Maintains data of 2 copies in 3 availability zones, total of 6 copies.
  • Replica
    • Aurora replicas – upto 15. Only for fail over. Auto failover supported.
    • MySQL read replicas – upto 5
  • Supports cross geo (region) replication
Amazon Relational Database Services (RDS)
  • Managed service.
    • Does take care of scaling
    • Automated backup
    • Recovery
    • Failover.
    • Could set up any of the top sql databases.
    • Supports read scale through read replicas within a region.
    • AWS supports
      • SQL server
      • My SQL
      • Aurora
      • Maria dB
      • Postgres
      • Oracle
    • RDS backups
      • Automated backups – Allows to take daily or point in time backups within the retention period
        • Done using daily backup and transaction logs.
        • Retention period is 1-35 days. Default 7 days.
        • Stored in S3. Free S3 storage size as RDS.
        • Once the database instance is deleted, the backups also gets deleted.
        • Can be restored in any Availability Zone (AZ).
        • Changes to the backup windows takes effect immediately.
        • Allows recovering data upto last 5 mins.
      • AWS snapshot
        • Manually initiated.
        • Can be moved across regions.
        • Can be migrated to Aurora.
        • Can be preserved even if the database is removed.
        • When snapshots are being taken, IO operations are suspended.
    • Any backup restoration would create new RDS instance with new endpoint.
    • Encryption is supported.
      • Applying encryption of existing database is not supported. You have to create a new encrypted database and import the data into it.
      • Encryption at rest support available for sqlserver and oracle.
    • Multiple AZ supported OOTB. AWS handles the replications. It’s for disaster recovery and not for performance. Primary to secondary instance replication is free.
    • Scaling up needs backup and create new instance with the right instance class. Usually takes few mins.
    • Scaling out
      • Scale out for read operations using read replica.
      • Upto 5 read replicas supported. Use asynchronous replication.
      • Read replica supported in MySql, PostgreSQL, MariaDB but not Sqlserver and Oracle.
      • Need automated backups to be turned ON for read replica to work.
      • Possible to set up read replica to read replica.
      • Each replica has its own endpoint.
      • Cross region read replica possible with MySql, MariaDB, Postgres.
    • Sqlserver doesn’t support increasing storage on a database instance.
      • Max size supported for a sqlserver espress edition is 10GB.
    • My SQL default port is 3306.
    • Possible to have RDS inside desired AZ of VPC
    • Configuration range from small instance (1.7GB RAM + 1 vCPU) to extra large instace (68GB RAM + 26 vCPU).
    • RDS instance provisioned IOPS storage with MySql and Oracle supports max IOPs of 30k and size 6TB.
    • RDS pricing
      • DB instance hrs
      • Data storage size
      • Backup storage size
      • Data transfer in/out
    • RDS upgrades
      • Customer controls when to do upgrade.
    • For RDS security groups – no port # or protocols required.
DynamoDB
  • NoSql
  • Key/Value store.
  • Supports read/write scale within data center.
  • Cross region, Read replica possible.
  • Supports document and K-V.
  • High performing.
  • Data stored in SSD.
  • Built-in redundancy.
  • Supports
    • Eventual consistency – Good for high performance.
    • Strong consistency
  • Pricing depends on
  • Push button scaling (No down time) as opposed to RDS.
  • Replicated in multiple Availability Zones (AZ) within the region.
  • Supports full and incremental backup.
  • Fine grained access at row and column level.
  • Support cross region replication using open source library.
  • Can export and import data from S3 using data pipeline
  • It’s a managed service and hence cannot be placed in the availability zone of our choice.
Elastic Cache
  • Cache has to be used by the application. Nothing to do with the database tier.
  • Provide mem-cached and redis.
  • Pricing based on cache node per hr.

 

Leave a Reply

Your email address will not be published. Required fields are marked *