330 likes | 499 Views
Windows Azure. 講師 : 李智樺 , Ruddy Lee Email: ruddyl.lee@microsoft.com Sky drive : http://sdrv.ms/133xtIJ. 議 程. 雲端 : 不同的思維 ? 故障防護 Failsafe 規模 Scale 整合 Integration 雲端架構實作. 雲端 : 不同 的思維 ?. 常見的謬誤. “That’s a hardware failure, not my problem!” 把 責任推給機器
E N D
Windows Azure 講師: 李智樺, Ruddy Lee Email: ruddyl.lee@microsoft.com Sky drive: http://sdrv.ms/133xtIJ
議程 • 雲端: 不同的思維? • 故障防護 Failsafe • 規模 Scale • 整合 Integration • 雲端架構實作
常見的謬誤 • “That’s a hardware failure, not my problem!” 把責任推給機器 • “Let’s throw more RAM onto our database server.” 用記憶體來換取效能 • “Our service is 99.9% available because we use Azure!” 誤把雲端可用度當成自己的系統可用度 • “Running out capacity? That’s a good problem to have!” 雲端不會出現記憶體不足的訊息 • “We’ll move everything to cloud!” 把一切都搬到雲端
雲端的架構設計 • 故障防護 Failsafe • Things will fail • 規模 Scale • Scalability is not automatic • 整合 Integration • Your cloud applications will need to work with other on-premises systems
可使用性Availability • 冗餘Redundancy • 組合Composition A (90%) B (90%) C (99.9%) B (99.9%) A (99.9%) C (90%) = 99.7% = 99.9%
Redundancy 冗餘in Windows Azure • Windows Azure 的 Storage 針對相同資料有三份的複寫。 • SQL Azure 原來就自動內建備份伺服器。 • Windows Azure 可採用勾選的方式啟動內建 caching的HA 功能。 • Windows Azure Web Sites and Cloud Services都已經俱有Multi-instance。 • 比較少人會注意到其實Windows Azure 是具有VM負載自動平衡的功能(Load-balanced Virtual Machines)。 • 把資料跨Data Center存放,把資料備份在不同區域的雲端資料中心裡( 採用 Windows Azure Traffic Manager)。
可靠性Reliability MTTF Available MTTR Unavailable Mean Time Between Failure,平均故障間隔時間 MTBF MTTF First: MTTR First: Mean Time To Repair,平均修複時間 Mean Time To Failure,修複前平均時間
如何進行故障防護呢? • 善用Windows Azure的既有功能 • 避免單點故障 • 失效模式分析 • 短暫錯誤 • 平穩退化 (Graceful degradation) • 消除人為因素
可擴展性Scalability • Scaling up 與scaling out Throughput Quota Instance Capacity 0 1 2 3 4 5 6 7 8 Instances
容量規劃和 負荷單元 Scaling units Capacity Workload To server x number of customers, I need i compute nodes, j job queues, k storage accounts … Time
可擴展性Scalingin Windows Azure • Scale up by choosing different VM sizes • Scale out by adding more instances • Auto-scalewith Autoscaling Application Block • Database shading with Windows Azure SQL Database • Scale out by using multiple service entities • CDNto distribute user traffic • Cachingto offset server workloads
如何進行雲端擴展性呢? • 容量規劃Capacity plan • 適度分解 Proper decomposition of system • 無狀態設計Stateless design • 所有層均可規模化Scale at all layers • 節流 Throttling
不同等級的擴展性規劃 無狀態 分享狀態 全域狀態 Stateless Shared States Global States R R R R R R R Router S R R R R R R R R S S S R R R R R R R S R R R R R R R R S R R R R R R R R R S R Separate states and actions Eliminate global states
操作與狀態分離 • Externalize states狀態外置 • Cache session state provider (Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache) • Separate actions and states操作與狀態分離 • Job creator • Job queue • Job Handler Job Queue Job Creator Job Handler Job Handler
判斷是否將既有系統搬移到雲端的決策流程圖 開 始 上雲端有幫助嗎? 定義/提升目標 建立基準. 估算回收. 值得嗎? 商業影響分析. 協議? 相關性分析. 協議? 相依性? 整體化戰略 影響分析.
一般整合方式 • 依數據資料進行整合 Integration by Data • 直接調用Direct invocation • 中間件層
與 Windows Azure整 合 • Message-based integration採用 Windows Azure Service Bus • Connectivity採用 Windows Azure Virtual Network • 既有AD 與 Windows Azure Active Directory整合 • Single Sign-On 結合 Windows Azure Access Control Service • Inclusive ecosystem 支援 heterogeneous stacks • 大量採用標準化的協定,例如:HTTP, Oauth, oData, ws-*
將所有應用程式遷移到雲? • 所有應用程式都應該在雲端上執行嗎? • 應該將所有的既有程式都搬到雲端上去執行嗎? • 所有新開發的程式都應該在雲端上執行嗎? • 在雲端上執行的程式就比較好嗎? http://msdn.microsoft.com/en-us/library/dd430340.aspx
整 合 的 意 義 • 鬆耦合 • 隔離式的整合 • 安全是雲端的基本 • 盡量採用標準
與 既 有 系 統 相 整 合 • 訊息式整合 System H System D Topic System E Queue System A System G System B System C System F
與 既 有 系 統 相 整 合 • Virtual Network Point-to-Site VNet LAN Site-to-Site
雲端架構設計練習 腳本: 1. 設計一個類似Dropbox的雲端儲存體服務機制 2. Diagnostics Messages
典型 Platform As A Service 的架構設計 SCALABILITY PRIVACY SECURITY MONITOR&ALERT ACCESS Web Role Unified Interface: REST, JSON Logging CORE MODULES JOB SCHEDULER MESSAGE BUS Service Business Worker Role Waveface ID Billing Manager Data Processor Account Manager Intelligent Aggregator Quota Manager Resource Manager Admin Manager(*) SNS Manager Report Manager DATA Storage Storage Database
典型 Platform As A Service 的架構設計 PRIVACY SECURITY MONITOR&ALERT SCALABILITY ACCESS Unified Interface: REST, JSON CORE MODULES JOB SCHEDULER MESSAGE BUS Service Business Unique ID Billing Manager Data Processor Account Manager Intelligent Aggregator Quota Manager Resource Manager Admin Manager(*) SNS Manager Report Manager DATA Storage Database SNS (Social Networking Services)
DEMO: Display and Maintain Azure Diagnostics messages This sample will show you how to retrieve Diagnostics message and save them to Cloud storage.
如何獲得百萬跑車? 2013/09/30 前, 只要依照規定啓用 MSDN 訂閱隨附的Windows Azure 權益, 即有機會將北美預估零售價 118,600美元的 Aston Martin V8 Vantage Coupe 開回家. 詳情請參閱 Windows Azure 網站: http://www.microsoft.com/taiwan/windowsazure/