Polyglot Persistence - Modern Application Development on AWS

Polyglot Persistence

In microservice architectures, each service should expose a public API and hide implementation details from other services. With this architecture, as long as the team that builds a given service maintains the API contract, it can freely modify the internals of a service without worrying whether other services depend on the modified code. Teams can also make deployments to their own services when they need to and can choose to implement their service with their preferred programming languages and databases. With polyglot persistence, you choose the correct data storage technology based on the data access patterns and other requirements of a given service.

If every service team has to use the same data storage technology, they can encounter implementation challenges or poor performance if that data store is not a good fit for a given situation. When teams are allowed to choose the data store that is the best fit for their requirements, they can implement their services more easily and achieve better performance and scalability.

AWS offers several data storage services that enable polyglot persistence, as summarized in the following table.

Table 1 –  AWS data storage services for polyglot persistence

Data Store Features
Amazon DynamoDB A key-value and document database that delivers single-digit millisecond performance at any scale. It's a fully managed, multi-region, multi-master, durable database with built-in security, backup and restore, and in-memory caching for internet-scale applications. DynamoDB can handle more than 10 trillion requests per day and can support peaks of more than 20 million requests per second.
Amazon Aurora and Amazon Relational Database Service (RDS)

Amazon Aurora is a MySQL and PostgreSQL-compatible relational database built for the cloud, that combines the performance and availability of traditional enterprise databases with the simplicity and cost-effectiveness of open source database.

Amazon RDS (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity, while automating time-consuming administration tasks, such as hardware provisioning, database setup, patching and backups. It enables you to focus on your applications so you can give them the fast performance, high availability, security, and compatibility they need.

Amazon ElastiCache Amazon ElastiCache offers fully managed Redis and Memcached. Seamlessly deploy, run, and scale popular open-source compatible, in-memory data stores. Build data-intensive apps or improve the performance of your existing apps by retrieving data from high throughput and low latency in-memory data stores.
Amazon EBS

Amazon Elastic Block Store (EBS) is an easy to use, high performance block storage service designed for use with Amazon Elastic Compute Cloud (EC2) for both throughput and transaction intensive workloads at any scale.

Amazon EBS volume data is replicated across multiple servers in an Availability Zone to prevent the loss of data from the failure of any single component. Amazon EBS volumes offer the consistent and low-latency performance needed to run your workloads. With Amazon EBS, you can scale your usage up or down within minutes—all while paying a low price for only what you provision.

Amazon EFS Amazon Elastic File System (Amazon EFS) provides a simple, scalable, elastic file system for Linux-based workloads for use with AWS Cloud services and on-premises resources. It is built to scale on demand to petabytes without disrupting applications, growing and shrinking automatically as you add and remove files, so your applications have the storage they need when they need it. It is designed to provide massively parallel shared access to thousands of Amazon EC2 instances, which enables your applications to achieve high levels of aggregate throughput and IOPS with consistent low latencies. 
Amazon S3 Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance. This means customers of all sizes and industries can use it to store and protect any amount of data for a range of use cases, such as websites, mobile applications, backup and restore, archive, enterprise applications, IoT devices, and big data analytics.