Database as a Service

In a properly designed microservice architecture, all services are stateless, and all the states are stored in special services that know how to manage data persistence. In a cloud environment, stateless services enable efficient scalability and high availability. However, it is much harder to manage and scale database servers efficiently, especially ones that were not designed for a cloud. Most cloud providers offer to address that problem by using their Database as a Service (DBaaS) solutions. Such storage solutions might be customized versions of ordinary databases (MySQL, PostgreSQL, and Redis) or designed from scratch to operate only in the cloud (AWS Redshift, Google BigTable, and Microsoft CosmosDB).

Usually, an algorithm of cloud storage or database usage works in the following way:

  1. A client issues a request for an access to the database or file storage  (via admin page or API).
  2. The cloud provider grants access to the API or server resource, which can be used for data persistence. At the same time, the client does not know or even care about how the provided API is implemented.
  3. The client uses a storage API or a database driver providing access credentials.
  4. The cloud provider charges the client depending on a client subscription plan, stored data size, query frequency, concurrent connections, or other characteristics.

Usually, such an approach allows a client (in our case a software developer) and a cloud provider to focus on their primary objectives. The cloud provider implements the most efficient way of storing and processing client data, minimizing spending on the underlying infrastructure. At the same time, the client focuses on the primary business objectives of the application and does not spend time configuring database servers, replication, or backups. Such a separation of concerns is not always the most profitable for a client, and it may not even be possible at all. However, when relevant, it sometimes allows us to build successful and widely-used applications with only a handful of engineers.

Among other use cases, Foursquare, whose applications are used by more than 50 million people per month, is primarily built with an AWS technology stack, namely Amazon EC2 for cloud hosting, Amazon S3 for storing images and other data, and Amazon Redshift as a database.

Some of the most well-known cloud-native data storage and DB services are as follows:

  • AWS S3 provides key-value storage through web service interfaces (REST API or AWS SDK). This is designed for storing files, images, backups, or any other information that could be represented as a bucket of bytes.
  • AWS DynamoDB‎ is a fully managed proprietary NoSQL database that provides synchronous replication across multiple data centers.
  • AWS Redshift is a data warehouse built on top of technology for parallel processing (MPP). This enables analytics workloads on big data.
  • Heroku PostgreSQL as a Service is a PostgreSQL database that is fully managed by the Heroku cloud provider, allowing shared and exclusive database servers for applications deployed to the Heroku cluster.
  • Google Cloud SQL is a fully-managed PostgreSQL and MySQL database provided by Google.
  • Google BigTable is compressed, high performance, and proprietary data storage designed to handle massive workloads at a consistent low latency and high throughput.
  • Azure Cosmos DB is Microsoft's proprietary globally distributed multi-model database with a few different APIs, including MongoDB driver-level protocol support.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.42.128