AWS Practice – Different types of databases on AWS

Tram Ho

Introduce

In an application, the Database is always the most important part, if we just build a simple application, it is not difficult to install the Database by ourselves, but if to build an application that serves millions of users, To install and manage the Database cluster yourself is not an easy job. Therefore, if conditions allow, you should use the Database services of Amazon Web Services, it will make our work much easier.AWS provides us with a lot of different Database services, and to know which Database services AWS has, let’s learn together in this article.

AWS Database

Database on AWS will have the following types:

  • Relational databases.
  • Document databases.
  • Wide-column store databases.
  • Indexing and search services.
  • In-memory databases.
  • Graph databases.
  • Time-series databases.

Relational Databases

This type of database is very familiar to us, for this type of database, AWS provides us with the Amazon Relational Database Service (AWS RDS).

The outstanding features of AWS RDS are ease of use, primary and replicas modes to speed up database queries, high availability, high security,…

image.png

AWS RDS has 3 types:

  • Community (Postgres, MySQL, MariaDB): Amazon provides RDS with three different open source services: Postgres, MySQL, MariaDB. These are very popular databases in the community.
  • Aurora (Postgres, MySQL): This is the type of database that AWS develops based on Postgres, MySQL. Aurora will have more outstanding features when using AWS RDS Postgres and regular MySQL, such as: 5.x faster processing speed than MySQL and 3.x faster than regular Postgres.
  • Commercial (Oracle, SQLServer): These two types are quite special, you also know that the relationship of AWS and Oracle is not very good :))) . But we can still use Oracle and SQLServer on Amazon.

Document databases

This is the type of database that comes after relational databases, commonly referred to as NoSQL Databases , data in document databases are stored as structured or semi-structured.

Examples are Extensible Markup Language (XML), JavaScript Object Notation (JSON), or Binary JavaScript Object Notation (BSON), which are all popular formats.

We usually use the document database for:

  • Content management systems
  • E-commerce applications
  • Analytics
  • Blogging applications

Should not be used for:

  • The data has a nested relationship and requires writing complex queries.
  • OLTP application.

For document database, AWS provides us with AWS Dynamo DB service.

image.png

Some outstanding features of Dynamo DB:

  • Fast query, can be up to microseconds if used with DynamoDB Accelerator (DAX) .
  • Deployable in multi region
  • Multi-master.
  • ACID transactions are supported.

If you know how to use it, Dynamo DB can support up to 20 million requests per second.

Wide-column store databases

This type of database may not be familiar to many people. It can be said that Wide-column databases are also a form of NoSQL databases, the difference is that the data it stores can be up to petabytes.

image.png

We often use wide-column databases for:

  • Sensor logs and IoT.
  • Logging application.
  • Data needs to be written a lot but rarely updated.
  • The application requires low latency.

Should not be used for:

  • Applications that require too many table joins.
  • The application requires constant change.
  • OLTP application.

For wide-column database, AWS provides us with Amazon Managed Apache Cassandra Service (AWS MCS, Amazon Keyspaces).

image.png

Some outstanding features of Amazon Keyspaces:

  • Auto-expand.
  • High availability.
  • Low latency.

Searching Database

This type of database is specialized for searching. Usually in an application, when searching in an extremely large data, we will not use a database like Postgres, MySQL or MongoDB, but we will save that data in the searching database and when searching for data, we will querying this database, a very famous searching database guy is Elasticsearch.

For searching database, AWS provides us with AWS Opensearch service.

image.png

This is a service that AWS develops based on Open Source Elasticsearch.

In-memory databases

This type of database will store data in RAM instead of in the hard drive, the purpose of this is to speed up data access. When we develop applications with millions of users, we not only use ordinary databases but need to combine with in-memory databases.

For example, when we query a complex and time-consuming data, instead of having to re-execute the query every time, we just need to save the results of the query into in-memory databases and next time. If needed, we just take it out and use it. Some well-known in-memory databases are Redis and Memcached.

image.png

For in-memory databases, AWS provides us with the AWS ElastiCache service. AWS ElastiCache supports both Redis and Memcached databases.

image.png

Graph databases

We’ve probably heard the term GraphQL a lot, but GraphQL is not Graph databases. Graph databases are a type of graph database, often used when our data has a rather complex relationship with each other. For example, the friends and friend suggestions section on facebook can use graph databases to do this.

image.png

For graph databases, AWS provides us with the AWS Neptune service. Some of the salient features of AWS Neptune are:

  • Support read replicas.
  • Backup uses Amazon S3.
  • Point-in-time recovery.

When using AWS Neptune, the jobs that we usually do manually such as hardware provisioning, software patching, software setup, AWS will do for us.

Time-series databases

This type of database is designed to store event data, for example, Prometheus is also a type of time-series database, it is used to store data about the state of the system at a certain point in time. .

Usually the data in time-series databases will be used to know at that time what happened and for how long.

image.png

For time-series databases, AWS provides us with the Amazon Timestream service, launched in 2020, but really, this service is very little known.

image.png

We can use Amazon Timestream in combination with other services such as AWS Kinesis, AWS MSK to design an application according to the Event Driven architecture.

Please like DevOps VN page to receive notification of the earliest post.

Conclusion

Above are the popular AWS database services that I have learned and heard about, if you still know any, please comment below to let everyone know.

 

Share the news now

Source : Viblo