Asp net mvc windows azure
This presentation is the property of its rightful owner.
Sponsored Links
1 / 54

使用 ASP.NET MVC 搭配 Windows Azure 建構可擴展網站 PowerPoint PPT Presentation


  • 96 Views
  • Uploaded on
  • Presentation posted in: General

使用 ASP.NET MVC 搭配 Windows Azure 建構可擴展網站. Sky Chang 天空的垃圾場 Blog.sanc.idv.tw. Sky Chang. Windows Azure 微軟最有價值專家. s [email protected] 天空的垃圾場. ASP.NET MVC ALM Windows Azure. b log.sanc.idv.tw. 資料來源. Windows Azure : http://www.windowsazure.com 天空的垃圾場 : http:// blog.sanc.idv.tw

Download Presentation

使用 ASP.NET MVC 搭配 Windows Azure 建構可擴展網站

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Asp net mvc windows azure

使用ASP.NET MVC搭配Windows Azure建構可擴展網站

Sky Chang

天空的垃圾場

Blog.sanc.idv.tw


Asp net mvc windows azure

Sky Chang

Windows Azure 微軟最有價值專家

[email protected]

天空的垃圾場

  • ASP.NET MVC

  • ALM

  • Windows Azure

blog.sanc.idv.tw


Asp net mvc windows azure

資料來源

Windows Azure : http://www.windowsazure.com

天空的垃圾場 :http://blog.sanc.idv.tw

Study4.TW : http://study4.tw

Windows Azure 雲端平台開發夥伴社群https://www.facebook.com/cloudexpert

Azure Taiwan User Group : https://www.facebook.com/groups/AzureTWUG/

MSDN:http://social.msdn.microsoft.com/Forums/zh-tw/home


Cloud service

Cloud Service

Demo


Asp net mvc windows azure

!!警告!!

今天沒有笑話,如過程中有任何睡意,屬於正常現象


Agenda

Agenda

Cloud Service

SLA 99.95

Storage ( 程式架構 )

Scaling - Cloud Service Cache ( LB 、 Session)

Azure架構 ( Web Role and Work Role )


Asp net mvc windows azure

Cloud Service


Asp net mvc windows azure

  • Windows Azure

  • Your Datacenter

  • Virtual Machines

  • Cloud Services

  • Web Sites

Applications

Applications

Applications

Applications

Data

Data

Data

Data

Firewall

Firewall Rules

Firewall Rules

Network

Virtual Network

Virtual Network

O/S

O/S

Virtualization

Hardware

Focus on the Application


What is a cloud service

What is a Cloud Service?

此容器包含了關聯的Service Roles

Web Role

Worker Role


Web role

Web Role

就是 -> IIS 7, 7.5 or IIS 8.0*

ASP.NET 3.5 SP1, 4.0 or 4.5* – 64bit Hosts

  • Web Forms or MVC

  • FastCGI applications (e.g. PHP)


Worker role patterns

Worker Role Patterns

Queue Polling Worker

  • Poll and Pop Messages 透過while(true)進行迴圈

  • E.g. 背景處理大量資料

    Listening Worker Role

  • 建立TCP Listener或WCF Service 、Web API Host

  • E.g. 執行.NET SMTP server 或WCF Service

    External Process Worker Role

  • 利用OnStart或 Run method 執行Process.Start()

  • 啟動Task在背景工作

  • E.g. 執行database server, web server,分散式cache


Cloud service1

Cloud Service

Demo


Asp net mvc windows azure

守則一 不要想著放上雲 要想著如何放

Web Role和Work Role各有不同的效能,請選擇適合的家


Asp net mvc windows azure

Scaling


Asp net mvc windows azure

Web Role or Work Role

共享

實體

保留實體

:-)

1


Asp net mvc windows azure

Web Role or Work Role

實體

實體

實體

:-)

:-)

2


Asp net mvc windows azure

Web Role or Work Role

共享

實體

實體

實體

:-)

:-)

:-)

:-)

:-)

:-)

:-)

:-)

2


Auto scaling

auto-scaling

CPU 使用率

實體

實體

實體

:-)

:-)

:-)


Scaling

Scaling

Demo


Asp net mvc windows azure

守則二 架構更勝於擴充

雖然可以輕易擴展,但不代表不用背負app的效能。


Asp net mvc windows azure

Cloud Service Cache


Cloud service load balance

Cloud Service loadbalance

Network Load Balancer

Web Role instance

Web Role instance

Web Role instance

:-)

:-)

:-)


Cloud service load balance1

Cloud Service loadbalance

Network Load Balancer

Web Role instance

Web Role instance

Web Role instance

:-)

:-)

:-)

SQL Database ( Azure Cache )


Cache on role co located

Cache on Role co-located


Cache on role caching on dedicated role

Cache on Role Caching on Dedicated Role


Cloud service cache

Cloud Service Cache

Demo


Asp net mvc windows azure

守則三 設計無狀態的網站

天然的尚好!!!


Asp net mvc windows azure

Storage


Persistent disks and highly durable

Persistent Disks and Highly Durable

Windows Azure Storage (Disaster Recovery)

Windows Azure Storage

Virtual Machine


Persistent disks and highly durable1

Persistent Disks and Highly Durable

Windows Azure Storage (Disaster Recovery)

Windows Azure Storage

Virtual Machine

Virtual Machine


Asp net mvc windows azure

洋蔥架構

  • 應用程式係圍繞著一個獨立的物件模型來建構。

  • 內層定義介面,外層實作介面。

  • 耦合的方向是朝向中央。

  • 應用程式的所有核心程式碼可以在與基礎建設分離的情況下正常運行。

  • (By 蔡煥麟老師翻譯 )

  • 核心 : IOC & DI


Asp net mvc windows azure

洋蔥架構


Asp net mvc windows azure

架構Demo

Demo


Interface

守則四 要Interface化

隔離…才是自保之道


Asp net mvc windows azure

SLA 99.95


Service level agreements

Service Level Agreements

Availability set

99.95% for multiple role instances

4.38 hours of downtime 每一年

Server 2

Server 1

包含項目

Compute Hardware 故障(disk, cpu, memory)

Datacenter 故障 - Network 故障, power 故障

Hardware 升級, Software 維護– Host OS 升級

不包含項目

VM容器崩潰, 客戶OS自行升級

SLA 99.95


Fault and update domains

Fault Domains

代表有可能一起失敗的同一組資源

例如同一個機架、同一台Server

Update Domains

代表一起更新的同一組資源

例如OS更新

Fault and Update Domains


Fault and update domains1

Fault and Update Domains

Fault Domain

Fault Domain

Rack

Rack

Web Role

UD #1

UD #2

INSTANCE

INSTANCE

INSTANCE

INSTANCE

Worker Role

UD #1

UD #2

INSTANCE

INSTANCE

INSTANCE

INSTANCE


Virtual machine availability sets update domains are honored by host os updates

Virtual Machine Availability SetsUpdate Domains are honored by host OS updates

Fault Domain

Fault Domain

Rack

Rack

Virtual Machine

Virtual Machine

Availability Set

IIS2

IIS1

UD #2

UD #1

Availability Set

Virtual Machine

Virtual Machine

SQL1

SQL2

UD #1

UD #2


End to end highly available solution redundancy at every level

End to End Highly Available SolutionRedundancy at every level

SQL Server1

SQL-AVSET

IIS-AVSET

IIS Web Application

Internet

  • Web Role

  • SQL Mirroring

LB

IIS Web Application

SQL Server2

  • Web Role


99 95

守則五 真的需要99.95!?

事情沒有你想的那麼簡單….


Asp net mvc windows azure

Azure 架構


Queue based load leveling pattern

Queue-Based Load Leveling Pattern


Queue based load leveling pattern1

Queue-Based Load Leveling Pattern


Asynchronous messaging

Asynchronous Messaging


Azure

Azure 架構

Demo


Asp net mvc windows azure

守則六 搭配雲端的架構


And then

And then !?

  • User Story、Test Case、BDD、TDD、Unit Test

  • SQL Server AlwaysOn ( HA )

  • Windows Azure Active Directory


Asp net mvc windows azure

Thank You

天空的垃圾場


Asp net mvc windows azure

提醒

上滿4堂課

交回問卷

問卷禮


Microsoft mvp award twmvp@microsoft com

Microsoft MVP Award報名申請:[email protected]

Knowledge Base

參加美國微軟產品組

線上會議

MVP logo使用權

MVP 專屬討論區

Technical Support

3個專業資訊人員技術支援服務

MVP 專屬 live meeting account

提供產品建議給微軟產品組

美國MVP全球年會

MSDN Online

combo Subscription


Asp net mvc windows azure

MVA學習資源 (持續更新中文課程)

立即上手 Windows Azurehttp://aka.ms/mva-azure-overview

SQL Server 2014 線上交易記憶體內資料庫簡介http://aka.ms/mva-sql2014

針對網站開發人員的 Visual Studio 使用技巧http://aka.ms/vstips4web

Web Services 開發實戰: 使用 ASP.NET Web API 2http://aka.ms/mva-webapi2

Visual Studio Online 與 Git版本控管實戰http://aka.ms/mva-vso-git

使用 App Studio 快速開發 Windows Phone 應用程式http://aka.ms/mva-appstudio


Asp net mvc windows azure

天空的垃圾場


  • Login