# Relational Database Service

The Relational Database Service (RDS) is a Database(server) as a service product from AWS which allows the creation of managed databases instances.

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FPc3xIhq8XFxjyohYWydI%2Fimage.png?alt=media&#x26;token=fe76ade6-dc0f-4a06-b039-d09d97af0c9d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FIkrKJqVoNWbu9qYCFXjE%2Fimage.png?alt=media&#x26;token=e56f3b21-3fa6-40ef-b501-8498cd46902d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FcO6oWAo2P8kjUu6NlVYv%2Fimage.png?alt=media&#x26;token=0cd21b0a-34f4-433f-a5d8-32bcecfe7167" alt=""><figcaption></figcaption></figure>

### MultiAZ - Instance and Cluster <a href="#lecture_heading" id="lecture_heading"></a>

MultiAZ is a feature of RDS which provisions a highly available instance set.

The product provides MultiAZ instance .. where a standby replica is kept in sync Synchronously with the primary instance.The standby replica cannot be used for any performance scaling ... only availability.

it also provides MultiAZ cluster mode, where a write and two reader instances are kept in sync Synchronously. The reader instances can be used for read operations ..allowing for limited read scaling.

Backups, software updates and restarts can take advantage of MultiAZ to reduce user disruption.

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FfriFgxN5IhI6tF3ylWQh%2Fimage.png?alt=media&#x26;token=d7a12f2b-bcc2-4b96-a83b-1a628f30f50b" alt=""><figcaption></figcaption></figure>

### MultiAZ - Instance <a href="#lecture_heading" id="lecture_heading"></a>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FneYSM4PQus02Y3AuqWr2%2Fimage.png?alt=media&#x26;token=c5766b8f-74e0-4e6f-93e6-cb77148e41bd" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FGXZWlcKKKRhmXDOWZ1e6%2Fimage.png?alt=media&#x26;token=d2c83f3d-75a1-4981-94d6-7a6221c3d314" alt=""><figcaption></figcaption></figure>

### MultiAZ - Cluster <a href="#lecture_heading" id="lecture_heading"></a>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FQFpQzG9JBzW8yOo84GxU%2Fimage.png?alt=media&#x26;token=a9191160-9675-4af5-979f-b46283108d34" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2Fkn9g4dFMFMvRnxjGHPPi%2Fimage.png?alt=media&#x26;token=6e4fae0f-6c1d-4221-bef2-307c5411aa06" alt=""><figcaption></figcaption></figure>

### Backups and Restores <a href="#lecture_heading" id="lecture_heading"></a>

RDS is capable of performing Manual Snapshots and Automatic backups

Manual snapshots are performed manually and live past the termination of an RDS instance

Automatic backups can be taken of an RDS instance with a 0 (Disabled) to 35 Day retention.

Automatic backups also use S3 for storing transaction logs every 5 minutes - allowing for point in time recovery.

Snapshots can be restored .. but create a new RDS instance.

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FnqpfgWVlvE1j0iAv7MR5%2Fimage.png?alt=media&#x26;token=08aa3c10-2a83-47da-80ea-12187141cd70" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FGoJfsAFbmyBNnOo36DWu%2Fimage.png?alt=media&#x26;token=4e3d74e4-7b43-44f7-90a0-4380c8c700e0" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FJf5IwUJNQDh6qwogAHBA%2Fimage.png?alt=media&#x26;token=43c6d3b8-8832-4601-a823-9af126551665" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2Fs1chQzHuTwsp2pKGASos%2Fimage.png?alt=media&#x26;token=d527d3fe-f122-4b67-ad68-d431f3242c5a" alt=""><figcaption></figcaption></figure>

### Backups - General

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FfVmP0rQAeaE7hmfRXMCr%2Fimage.png?alt=media&#x26;token=91ecfc4e-e5e2-4775-859e-90f317533a19" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2F8pBLm26aQAftKXGfKOXo%2Fimage.png?alt=media&#x26;token=ae539017-6304-43db-8ddc-aa23b3e00da9" alt=""><figcaption></figcaption></figure>

### Backups - Cross-Region

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2Fd7qVUGTd2GQ3dpgzlhIT%2Fimage.png?alt=media&#x26;token=a7c21ed0-1edb-48e7-ac43-af9979d40b27" alt=""><figcaption></figcaption></figure>

### Restores

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FxsZ10aCcJfb3KtnSPoJQ%2Fimage.png?alt=media&#x26;token=a00cc409-5cca-40b6-91c0-87b5f36dfb11" alt=""><figcaption></figcaption></figure>

### Read-Replicas <a href="#lecture_heading" id="lecture_heading"></a>

RDS Read Replicas can be added to an RDS Instance - 5 direct per primary instance.

They can be in the same region, or cross-region replicas.

They provide read performance scaling for the instance, but also offer low RTO recovery for any instance failure issues

N.B they don't help with data corruption as the corruption will be replicated to the RR.

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FWaFF8PJ3IUO3xgTh0YmA%2Fimage.png?alt=media&#x26;token=548c25e6-0e0c-4eeb-bcae-7b9097d6f0ae" alt=""><figcaption></figcaption></figure>

### (read) Performance Improvements

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FVS2TwbMf5Z2wcw1LE1nh%2Fimage.png?alt=media&#x26;token=296a7b1b-f04b-4796-957f-2922d05d7730" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FBWqX1OOzrWJgeXzozVeU%2Fimage.png?alt=media&#x26;token=e6ec5e6c-fb0a-4e08-bc91-94dfbdd1b61f" alt=""><figcaption></figcaption></figure>

### RPO/RTO Improvements

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FCZcxMrQJR1dGqRePc61z%2Fimage.png?alt=media&#x26;token=f94b5fd5-4dde-4854-a22c-b49ce1bd98c4" alt=""><figcaption></figcaption></figure>

### Data Security <a href="#lecture_heading" id="lecture_heading"></a>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2Fwmr2VW0ucdTkz3yiU82s%2Fimage.png?alt=media&#x26;token=8ecd8f1b-ffb4-45c4-8365-5af9306cd4b4" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FZOPVh6qth7kTJ5lPu1mo%2Fimage.png?alt=media&#x26;token=d74f8880-98bb-4d44-acd3-a3d5d5cc54d4" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FBEbca8CEeoIg7GVfxpxH%2Fimage.png?alt=media&#x26;token=8ab9f1fb-1f62-4c5b-bf34-9e53f42ccb10" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2F3dci0KcS45U6hP7bVLlC%2Fimage.png?alt=media&#x26;token=06a3e3e4-a8e1-44be-8d84-4bd462c6e189" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FdOkjRoxLTqbvSOUBCk83%2Fimage.png?alt=media&#x26;token=043a4af7-d602-43f2-b143-c74a0b1f78ae" alt=""><figcaption></figcaption></figure>

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FjfA48raWsbMHWmhwtVvg%2Fimage.png?alt=media&#x26;token=0a5d717e-6ded-4b02-b8ac-fe0f9269435d" alt=""><figcaption></figcaption></figure>

### RDS KMS Encryption & TDE

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2F2C7CPJLugSsVG9ZNw5ei%2Fimage.png?alt=media&#x26;token=f20dc5bf-d364-4e67-a73b-0c9cae67412f" alt=""><figcaption></figcaption></figure>

### RDS IAM Authentication

<figure><img src="https://42327672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTgPcl2FlnhXAydvRoXO%2Fuploads%2FAHoqlFb3HY2h3HM7cwDT%2Fimage.png?alt=media&#x26;token=dcefa04d-9062-4a31-8323-413bf3eabbcf" alt=""><figcaption></figcaption></figure>
