張宸瑜
    • Create new note
    • Create a note from template
      • 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
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • 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
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
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
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • 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
    # Cloud Computing [TOC] ## Cloud Computing 最最最一開始,透過網路連接 mainframe -> PC :desktop_computer: CPU、記憶體、儲存空間...... -> 你自己的電腦 要做大量運算 -> 電腦燒起來了還跑不完 :fire: :computer: :fire: ### 由來 建立於資訊科技多年來發展的技術上 - 多處理器 -> 提供更大量的運算資源 - 虛擬化 -> 加強工作負載行動化、提升資源效能與可用性 - 資源分配 - 使用者可以規劃定量的資源,分配在某些特定「用途」上 - 依據需求,向計中申請規劃定量資源的 VM,用來當 Web Server、Application Server - 安全性 - 在主機中分出一個完全隔離的虛擬環境,在這樣的環境中,應用程式是與虛擬層做互動 - VMM 會先管理及過濾掉有害的操作 - 不會影響到 host,也不會影響到平行的虛擬環境 - 聚集 - 將虛擬化後的各個部分聚集在一起,形成一個統一的資源中心 - 分散式運算技術 -> 運算擴充 - MapReduce :::info **MapReduce** - 舉辦淨灘活動,要清理完一大片海灘,一個人需要花一個禮拜的時間清理,100 個人一起做,只需要花半天的時間就可以清理完成。 - 將龐大的運算任務切割成各個小程式段落,然後交給大量的實體伺服器做運算。 ![](https://i.imgur.com/zuFeAAh.png) > [來源](https://sls.weco.net/CollectiveNote20/MR) ::: - NoSQL -> 解決資料擴充需求 - 非關聯式資料庫:每一群資料之間沒有關聯,可以任意增加刪除 - 將 DataBase 分散在各個主機上 - 網際網路 -> 透過網路共享軟硬體服務 - Autonomic Computing(自主運算) - 管理簡單快速,用以克服服務快速擴張帶來的複雜性 :::info IBM 提出四個 self-x `self-*` 以及八個必要條件 1. 自我配置 - 知道本身存取哪些資源,其容量以及限制,以及和其他系統連接的方式以及原因 - 在環境變化時可以適應環境,和周圍的系統互動,並且建立通訊協定 - 以開放標準為基礎,不會處在某個私有的環境下 - 可以預測對資源的需求情形,同時對使用者保持透明 3. 自我修復 - 可以避開所遇到的問題,可能是修補自身的系統,或是可以有繞道演算法,可以避開有問題的點 5. 自我優化 - 可以依變化的計算環境,自動的進行自身的組態和重新組態 - 可以將自身的性能最佳化,以確保計算程序可以最有效率 6. 自我防護 - 在面對不同的攻擊時,可以進行偵測、識別和保護,以維持整體系統的安全性(security)和完整性 ::: - Data Center Infrastructure Management ( DCIM ) -> 為了解決大型資料中心的整合以及最佳化 - 硬體與應用程式的管理,確保資料中心的性能最佳化 - 用來監督、監控以及了解資料中心的功耗及資料儲存等 :::info **Data Center Infrastructure Management (DCIM)** 的功能 - 管理資產、空間 - 資產包含:硬體、軟體、智慧財產權... - 監測溫度以及環境功率 - 產量規劃 - 結構化佈線管理 - 平面與立體的中心配置圖 - 環境監測管理 - 權限管理 ::: - SOA(服務導向架構) -> 網路服務提升 :::info **Service-Oriented Architecture (SOA) 服務導向架構** - 定義:服務導向的軟體架構 - 服務提供一個簡單的介面,使用者可以使用獨立的服務,而不需理解底層是如何運作的 - 開發商排列組合這些服務,以組裝成其他應用程式 - 例子:Expedia 透過 Web Service,連結其他航空、住宿公司的資訊系統,再包裝成自己的一個旅遊平台 - Web Service 包含了 Simple Object Access Protocol ( SOAP )、WSDL、UDDI - SOAP:定義兩者間的訊息傳輸規範,利用 XML 格式化訊息,HTTP 乘載訊息 - 透過SOAP,應用程式可以在網路中進行資料交換與 Remote Procedure Call ( RPC,遠端程式呼叫) ::: - 透過網頁操作軟體 -> Web2.0、Mashup - Web2.0:強化使用者與網頁間的互動 - Mashup:將外部網站的小工具或連結與網頁連結,比如:將影片放到 YT 後,嵌入到網頁內 - 將小工具融合得更好、更漂亮 - 小型軟體以網頁的方式釋出,提升麻瓜的使用體驗 - 高可用性 - 保證服務的可以使用,避免因為系統停機或維護而造成中斷 - 高可用性 -> 供應商提供更好的 SLA -> 給消費者的賠償更好 :::info **Service-Level Agreement (SLA) 服務水準協議 SLA** 一種用來衡量用戶期望供應商提供服務指標的合約,其中包含各項服務應達到的指標,以及未達到水準的話供應商應如何補償使用者。 主要包含以下幾個要點: - 提供的服務類型 - 服務承諾的性能 - 特別強調可靠性與回應能力(用戶下指令後的反應速度) - 監控流程與服務水準報告 - 回傳服務問題的步驟 - 需要包含問題的詳細敘述及其順序 - 回應時間範圍及問題解決時間框架 - 回應時間範圍:提供商開始調查問題的時間段 - 問題解決時間框架包含了解決和修復當前問題的時間段 - 供應商未達上述標準的賠償 ::: ## Cloud Infrastucture ![](https://i.imgur.com/oLro7TR.png) > [來源](https://www.techtarget.com/searchcloudcomputing/definition/cloud-infrastructure) - Network - 由實體的網路線、switches、routers 等組成 - 由多個 subnet 組成 - 允許建立 VLANs,並為所有網路資源分配動/靜態的位置 - 基本上,Cloud 的資源都是藉由網路讓使用者使用的 :::info **VLAN** 虛擬區域網路 網管人員可以對不同實體區網中的設備進行邏輯上的分群(Grouping),為區網管理提供更完整的資訊安全保障。 ![](https://i.imgur.com/gxeFQjp.png) > [來源](https://tw.arip-photo.org/370530-are-vlans-necessary-for-my-VISXSX) - IEEE 802.1Q 規範。 - 功能: 將某些電腦組織成一個邏輯網路。 ![](https://i.imgur.com/IzK7hRj.png) [圖片來源](http://www.tsnien.idv.tw/Manager_WebBook/chap8/8-1%20%E8%99%9B%E6%93%AC%E5%8D%80%E5%9F%9F%E7%B6%B2%E8%B7%AF%E7%B0%A1%E4%BB%8B.html) - 被組合 VLAN 電腦可以不是同一 Switch 底下的電腦。 - 例如: VLAN0 的 PC0 在 Switch_A 上,但 PC4 在 Switch_B 上。 - 為什麼要 VLAN ? - 減少廣播網域: 廣播時只有同 VLAN 內會收到廣播訊息。 - 減少不必要的網路流量。 - 增加安全性。 ::: - Hardware - Cloud Network 是由億些存放在全世界不同地方的硬體所組成 - switches, routers, firewalls - storage arrays, backup devices, servers - Storage - 「儲存管理」除了儲存資料外,包含了備份資料,以及刪除過期的備份,並且為資料下索引以方便需要時進行搜尋 - Virtualization - 將 memory, computing power, storage 抽象化並集中至資源池 - 使用者可以自由從資源池中架設及擴張自己的服務 - 儲存空間 - 方便使用者利用 cloud 進行使用 - 使用者自由增減儲存媒體 - SDS - 虛擬網路 - NFV, SDN ## Definition 根據美國國家標準與技術研究院 (NIST) 的定義,共有五個基本特徵、三種服務模型、及四種部屬模式 ### 基本特徵 - On-demand self-service:用戶可以**自行**配置運算能力,像是伺服器運作時間與網路儲存空間,而且是在不需要服務供應商人工介入的情況下自動運作。 - Broad network access:雲端運算要能透過網路即能存取,並且能以標準的連線機制促成各式異質的終端平臺存取。 - 異質終端平台:不同性質的系統與工具,包含不同作業系統、不同介面,例如手機、筆記型電腦。 - Resource Pooling:共享資源池。供應商為多個客戶提供臨時及可隨時擴充的服務,但對於客戶端不會有明顯的變動。 - Rapid elasticity:雲端運算在配置運算資源時,可迅速伸縮自如,既可快速擴增架構,亦可快速縮小架構,在一些情況下甚至能夠自動化運作。對用戶而言,像是有毫無限制的運算資源可供配置,而且可以隨時隨意購買。 - Measured Service:服務可測量。系統可以監控、控制及報告資源的使用情況。 - 使用者端:了解目前自己的使用量。 - 供應商:了解各個使用者目前的使用情況,在需要收費的情況很有用。 ### Service Model ![](https://i.imgur.com/USsCr0A.jpg) [來源](https://aigo.org.tw/zh-tw/forum/content/102) ![](https://i.imgur.com/22Da656.png) > [來源](https://medium.com/@stfk1105/iaas-paas-saas-%E4%B8%89%E5%85%84%E5%BC%9F-c745dfa0cfd4) :::info - Middleware - 以網路分層而言:在傳輸層之上,應用層之下 - 包含 Web Server、Application Server、內容管理系統(CMS,將文案或資料等進行儲存、管理、修訂,例如:WordPress) - Runtime:幫助程式與其所需資源的使用 ![](https://i.imgur.com/1NVxRDp.png) 在執行這段程式時,會額外插入以下這段 ![](https://i.imgur.com/NSchHRG.png) Runtime 是位於 OS 以及 source code 之間的一層,它告訴 OS 該如何對 source code 作執行 ::: - Infrastructure as a Service:**基礎設施即服務**。供應商提供硬體設備,使用者不需要管理硬體設備**本身**的擺放、儲存等。例如 AWS、Azure,向計中申請一台虛擬主機也是 IaaS 的一種。 - 想吃晚餐,~~去我朋友家的廚房搶他的廚具跟食材~~去料理教室,自己煮來吃。 - Platform as a Service:**平台即服務**。供應商提供開發平台、作業系統,使用者可以在這些基礎之上建立自己的軟體。例如 Google App Engine。 - 想吃晚餐,去自助餐夾晚餐來吃。 - Software as a Service:**軟體即服務**。供應商提供軟體,使用者可以直接使用該服務,例如 Google Docs、Gmail。 - 想吃晚餐,叫我朋友去幫我買晚餐來吃。 #### IaaS ::: spoiler 以 AWS EC2 為例 ![](https://i.imgur.com/F9hI4VZ.png) 1. 選擇 AMI (Amazon 系統映像) ![](https://i.imgur.com/j8AcEo3.png) 2. 選擇硬體配備 ![](https://i.imgur.com/rtBDaPX.png) ::: #### PaaS :::spoiler 以 Google App Engine 為例 ![](https://i.imgur.com/NDJpoyH.png) 1. 資源 ![](https://i.imgur.com/g4IYAXn.png) 2. 開發語言 ![](https://i.imgur.com/RjsSDaP.png) ::: #### SaaS :::spoiler 打開你的 Gmail **恭喜你 :confetti_ball: 你已經在使用 SaaS 了** ::: <hr/> ### 部屬模式 #### 公有雲 定義:由銷售雲端服務的廠商建立,提供給大眾使用,並依照使用量計費 - 開放給所有人 - 部分服務可以免費使用 - 強大的擴充性 - 一定程度上降低資本支出 - 企業不需自行購置資料中心設備,也節省了維運成本 - 高可用性 - 資料分散在多個資料中心,沒有單一節點失效的風險 - 例子:Google Drive、DropBox #### 私有雲 定義:由單一組織建立,只供該組織所使用 - 資料安全性 - 僅供內部使用,其他人無法存取資源 - 位置通常比較靠近使用者,所以存取速度較快 - 客製化 - 容易依據企業需求而量身訂造,例如存取權限分級 #### 混合雲 定義:結合兩種以上的雲端運算架構,透過標準或私有技術而讓資料與應用程式擁有可攜性 - 通常是私有雲 mix 公有雲 - 服務一部分放公有雲,一部份放私有雲 #### 社群雲 定義:由一群擁有共同任務、特定需求的組織共同成立,以服務該社群 - 兩個或兩個以上的組織在同一個社群下共用一個雲 - 組織間在管理上有共同的目的 - 用戶數量比公有雲少,比私有雲多 :::info **虛擬私有雲** Virtual Private Cloud ![](https://i.imgur.com/Z2oRMrA.png) - 首先由 AWS 提出,是一種在公有雲中的私有雲(混合雲的一種) - 透過 **子網域、VLAN、VPN** 等方式,讓基礎設施感覺上沒有跟其他使用者共享 - 類似 Instagram 的摯友功能或不公開帳號,使用者可以限制能看到自己資源的人 - 使用者可以透過私有 ip 進行溝通,而不必透過公共網路 - 可以在不停機或斷線的情況下,自由增加網段 - 特性: - Agility:使用者可以動態、實時地控制虛擬網路的大小及部屬資源 - Availability:有高容錯的可用區架構,以提高應用程式或工作負載的可用性 - Security:資料與應用程式不會與其他公有雲內的使用者混合,也不會有共用空間的問題 - Affordability:由於其公有雲的特性,使用者可以減少購置及維護硬體的成本 - 優點 (By IBM): - Flexible Business Growth:由於可以自由且動態地配置基礎設施,使用者可以彈性輕鬆地適應需求的變化 - Satisfied customers:高可用性的環境讓用戶的體驗良好,對企業而言,從而建立客戶忠誠度及品牌信任 - Reduced risk across the entire data lifecycle:由於 VPC 的高安全性,使用者可以放心地使用,也可以進一步增加客戶的信任 - More resources to channel toward business innovation:透過降低成本及對 IT 團隊在維運硬體設備的需求,使用者可以將精力放在實現企業目標和鍛鍊核心能力上 - VPC 分層架構,在每一層中分配 subnet,每一層也會被自動分配到自己的 ACL - Web 層 或 表示層:接收來自 Web 或其他層的資訊,並表現給 end-user - 應用層:大多數 process 在這層作處理 - 資料庫層:應用層中所需處理的資料儲存的地方 - 安全: ![](https://i.imgur.com/ihlcOBs.png) > [圖片來源](https://docs.aws.amazon.com/zh_tw/vpc/latest/userguide/VPC_Security.html#VPC_Security_Comparison) - Access Control Lists (ACLs) - **VPC subnets 的防火牆** - 可以設定 allow rules 以及 deny rules - 在傳輸之前,各個 rules 會由小到大的 run 過一次,優先序由小至大 - 前面設定 allow 的,後面設定 deny -> deny - 用來限制有誰可以訪問 VPC 的 subnet - 一個 ACL 可以被多個 subnet 使用,但一個 subnet 只能使用一個 ACL - 用來管理進出 subnet 的流量 - 無狀態的:傳入的規則**不會**自動應用於傳出的規則 - Security Group - **Instance 的防火牆** - 只能設定 allow rules - 在傳輸之前,會先 run 過一次全部的 rules - 用來管理進出 instance 的流量 - 需要手動配置 security group 給 instance - 有狀態的:傳入的規則會自動應用於傳出的規則 :::

    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