CodingKaohsiung-2020
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Help
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
--- tags: 大話AWS雲端架構 --- # Chapter6. RDS (Amazon Relational Database Service) ## 6.1 客戶想要一個關聯式資料庫 > 在EC2上自行搭建RDB與選用AWS的RDS解決方案的差別? ## 6.2 自建資料庫與選用RDS服務的差異 1. 自建RDB,需連入底層系統;使用AWS RDS則不必。 2. RDS有限定支援的引擎 - Amazon Aurora (專為雲端建立的 MySQL 和 PostgreSQL 相容關聯式資料庫) - PostgreSQL - MySQL - MariaDB - ORACLE - Microsoft SQL Server ## 6.3 RDS的高可用、備援與效能調校 ### 6.3.1 Multi-AZ 多分區方案 (Availability Zones) > RDS主要協助的兩個方向:**資料備援與系統高可用性**。 ![p97](https://raw.githubusercontent.com/YNCBearz/reading/master/%E5%A4%A7%E8%A9%B1AWS%E9%9B%B2%E7%AB%AF%E6%9E%B6%E6%A7%8B/images/p97.jpg) 使用RDS時,RDS會自動開一些機器來完成任務。 開機器就得探討是在哪個網段,必須事前設定 **Subnet Group (子網段群組)**。 此外RDS也提供 **Snapshot** 機制,會針對主資料庫自動定期備份。 ![p98](https://raw.githubusercontent.com/YNCBearz/reading/master/%E5%A4%A7%E8%A9%B1AWS%E9%9B%B2%E7%AB%AF%E6%9E%B6%E6%A7%8B/images/p98.jpg) ![p98_2](https://raw.githubusercontent.com/YNCBearz/reading/master/%E5%A4%A7%E8%A9%B1AWS%E9%9B%B2%E7%AB%AF%E6%9E%B6%E6%A7%8B/images/p98_2.jpg) ### 6.3.2 Read Replica - 唯讀副本 > 為了舒緩主資料庫的流量,RDS提供了唯讀副本的服務,可以接受純粹查詢資料的任務。 ![p99](https://raw.githubusercontent.com/YNCBearz/reading/master/%E5%A4%A7%E8%A9%B1AWS%E9%9B%B2%E7%AB%AF%E6%9E%B6%E6%A7%8B/images/p99.jpg) ![p100](https://raw.githubusercontent.com/YNCBearz/reading/master/%E5%A4%A7%E8%A9%B1AWS%E9%9B%B2%E7%AB%AF%E6%9E%B6%E6%A7%8B/images/p100.jpg) ### 6.3.3 Parameter Group - RDS 的效能調校方案 在RDS不開放作業系統底層的情況下,我們如何優化資料庫的效能? > RDS提供了 **Parameter Group** 的功能,讓我們把一些資料庫使用的參數匯入資料庫內。或者我們也能從硬體面著手,將RDS使用的 **EBS Volume** 改成 **Provision iops** 類型的 EBS Volume。 ![p101](https://raw.githubusercontent.com/YNCBearz/reading/master/%E5%A4%A7%E8%A9%B1AWS%E9%9B%B2%E7%AB%AF%E6%9E%B6%E6%A7%8B/images/p101.jpg) ## 6.4 考題解析與思路延伸 ### 6.4.1 [Q] 關於RDS的資料加密手法,已存在的資料庫不能直接加密? > 只有建立資料庫時才可以啟用加密。若要加密已存在的資料庫,需利用Snapshot復原 (即用Snapshot建立全新資料庫)。 ## 6.5 RDS整體架構圖 ![p103](https://raw.githubusercontent.com/YNCBearz/reading/master/%E5%A4%A7%E8%A9%B1AWS%E9%9B%B2%E7%AB%AF%E6%9E%B6%E6%A7%8B/images/p103.jpg) ## 6.6 本章相關名詞 ***Multi-AZ*** 當佈建異地同步備份資料庫執行個體時, RDS會自動建立主要資料庫執行個體 (Master), 並將資料同步複製到其他可用區域 (AZ) 中的備用執行個體 (Standby)。 ***Subnet Group*** 資料庫子網路群組是種子網路集合,須先在VPC中建立群組, 然後指定群組,RDS服務會在群組內挑選網段,開啟資料庫執行個體。 ***DB Engine*** Amazon Aurora、PostgreSQL、MySQL、MariaDB、ORACLE、Microsoft SQL Server ***Master*** RDS為了高可用性,提出了Multi-AZ的概念。 使用Master-Standby架構,Master負責資料的讀寫, Standby負責同步Master的資料。 當Master故障時,Standby會轉成新的Master,並 啟用一台新的Standby ***Standby*** 啟用Multi-AZ時,AWS會啟用Standby資料庫, 與Master存放在不同的AZ,並於Master故障時迅速轉換。 ***Parameter Group*** RDS為資料庫提供了預設的啟動與執行參數設定。 亦提供Parameter Group,方便用戶調整RDS內部設定。 ***Snapshot*** RDS會建立資料庫執行個體的儲存體磁碟區快照。 在單一可用區資料庫執行個體中建立資料庫快照會導致I/O短暫停用,異地同步備份資料庫則不受停用影響。 ***Read Replica*** 建立一或多個指定來源資料庫執行個體的副本。 然後從多個資料副本為大量應用程式讀取提供服務, 藉此來提昇總體的讀取輸送量。 RDS for MySQL、MariaDB、PostgreSQL、Oracle及Amazon Aurora都僅提供讀取副本。 ## 6.7 本章小結

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully