4 Databases
4.1 Amazon RDS (Relational Database Service )
... offers 6 familiar database engines: SQL Server, Oracle Database, MySQL, MariaDB, PostgreSQL and Aurora.
Features that AWS RDS offers to support several use-cases:
- Multi-availability zone (AZ) deployments
- Read replicas
- Automatic backups
- Default retention period is 7 days and goes as high as 35 days.
4.1.1 Amazon Aurora
- Aurora is a PostgreSQL and MySQL compatible database.
- Aurora is a fully managed, closed-source, proprietary database from AWS.
- With Amazon Aurora, you don't need to provision storage in advance to handle future growth. It can auto-scale up to 128 TB per database instance in increments of 10 GB.
- Aurora continuously scans data disks and blocks. Aurora automatically restarts the database and associated processes once it detects any error with a data disk. It can withstand the loss of up to three copies of data without impacting database read availability and up to two copies without affecting write availability in a transparent manner.
- Aurora replicates each chunk of database volume in six ways across three AZs. 3/6 copies are required for database reads, and 4/6 copies are needed for database writes.
- Aurora supports distributed or parallel queries using Parallel Query, which can speed up searches by up to 2 orders of magnitude while keeping transaction workloads moving at a high rate.
- A cloud user can create Aurora cluster duplicates using Aurora cloning.
- With Amazon Aurora Backtrack, you can rewind a database cluster to a specified point without restoring data from a back-up. The default backtrack period is 72 hours.
- Aurora provides support for custom database endpoints for distributing and balancing workloads across different sets of database instances.
- Aurora supports cross-region replication through logical or physical replication. It uses SSL to encrypt data in transit and KMS for data at rest.
- The Aurora Global Database enables the creation of a single Aurora database that spans multiple AWS regions for quick disaster recovery and fast local reads.
- A global database supports one primary region (for read/write) and replication across up to five secondary regions (for read-only), with a latency of less than 1 second. In the event of a disaster or unavailability of the primary database, Aurora switches to a database in the secondary region for read/writes.
4.1.2 Amazon Redshift
"A fully managed data warehouse service in the cloud." Some features you should be familiar with:
- Massively parallel
- Machine learning
- Result caching
- Fault tolerance
- Federated query
Note: Redshift does not support Multi-AZ deployments.
4.2 Amazon Non-Relational Database Service (noSQL)
DynamoDB, Elastic-Cache, DocumentDB, Timestream, Neptune, QLDB
4.2.1 Amazon DynamoDB
Tips to remember:
- Amazon DynamoDB is:
- fully managed
- runs on SSD to provide high I/O
- synchronously replicates data across 3 AZs in an AWS region
- Two modes:
- on-demand capacity mode
- provisioned mode - specify the number of reads and writes an application requires beforehand
- DynamoDB creates and maintains indexes for primary key attributes.
- Supports local and global secondary indexes.
- Two different read modes:
- strongly consistent
- eventually consistent (default)
- DynamoDB global tables provide a multi-active, multi-region, fully managed DB that delivers local, fast read and write performance for global, massively scaled applications.
- Can set the Time-to-Live (TTL). Items are automatically deleted after the expiry.
4.2.2 Amazon ElastiCache
... an in-memory, fully managed cache and data store.
Differences and similarities between ElastiCache for Redis and ElastiCache for Memcached:
- Latency
- [Redis & Memcached] Provides support for sub-millisecond latency
- Architecture
- [Redis] Doesn't provide support for multithreaded architecture
- [Memcached] Offers support for multithreaded architecture
- Ease of use
- [Redis & Memcached] Easy to use and doesn't require much code to integrate into an application.
- Advanced data structures:
- [Redis] Supports strings, hashes, sets, lists, hyperlog-logs, bit arrays, and sorted sets
- [Memcached] Has no support for advanced data structures.
- Snapshots:
- [Redis] Provides support for point-in-time data snapshots for data recovery and archival.
- [Memcached] Offers no support for snapshots.
- Complex data objects:
- [Redis] Supports complex data objects
- [Memcached] Only supports key-value storage
- Storage type:
- [Redis] Persistent storage
- [Memcached] Non-persistent storage
- Multi-AZ:
- [Redis] Automatic failover with Multi-AZ
- [Memcached] Multi-AZ not supported
- Geospatial data:
- [Redis] Offers support for working with real-time geospatial data.
- [Memcached] Doesn't have built-in commands or support for geospatial data analysis.
- Scales:
- [Redis] Scales using read replicas and highly available clusters.
- [Memcached] Scales by using multiple nodes.
- Backup and restore:
- [Redis] Supports backup and restore.
- [Memcached] Backup and restore not supported.
- Pub/Sub messaging:
- [Redis] Supports Pub/Sub messaging with pattern matching for real-time comment streams, server intercommunication, social media feeds, and high-performance chat applications.
- [Memcached] No support for Pub/Sub messaging.
Summary of Database Type, Use Cases and Services.
- Relational DB
- Use Cases: CRM, ERP, traditional applications, e-commerce
- AWS Services: RDS, Redshift, Aurora
- In-memory DB
- Use Cases: Session management, caching, geospatial applications, gaming, leaderboards
- AWS Services: ElastiCache for Redis, ElastiCache for Memcached
- Wide-column DB
- Use Cases: Route optimization, fleet management, high-scale industrial applications for equipment maintenance
- AWS Services: Amazon Keyspaces
- Key-value DB
- Use Cases: E-commerce systems, high-traffic web applications, gaming applications
- AWS Services: Amazon Dynamo DB
- Time series DB
- Use Cases: DevOps, IoT applications, industrial telemetry
- AWS Services: Amazon Timestream
- Document DB
- Use Cases: Catalogs, content management
- AWS Services: Amazon DocumentDB
- Graph DB
- Use Cases: Recommendation engines, social networking, fraud detection
- AWS Services: Amazon Neptune
- Ledger DB
- Use Cases: Supply chain, systems of record, banking transactions, registrations
- AWS Services: Amazon QLDB
Glossary:
- AES-256 = 256-bit Advanced Encryption Standard
- AZ = Availability Zone
- KMS = Key Management Service {AWS Key Management Service}
- MFS = Multi-Factor Authentication
Comments
Post a Comment