Asp net mvc windows azure
Download
1 / 54

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


  • 153 Views
  • Uploaded on

使用 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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' 使用 ASP.NET MVC 搭配 Windows Azure 建構可擴展網站' - dante-martinez


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


Sky Chang

Windows Azure 微軟最有價值專家

[email protected]

天空的垃圾場

  • ASP.NET MVC

  • ALM

  • Windows Azure

blog.sanc.idv.tw


資料來源

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



!!警告!!

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


Agenda
Agenda

Cloud Service

SLA 99.95

Storage ( 程式架構 )

Scaling - Cloud Service Cache ( LB 、 Session)

Azure架構 ( Web Role and Work Role )



  • 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



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

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



Web Role or Work Role

共享

實體

保留實體

:-)

1


Web Role or Work Role

實體

實體

實體

:-)

:-)

2


Web Role or Work Role

共享

實體

實體

實體

:-)

:-)

:-)

:-)

:-)

:-)

:-)

:-)

2


Auto scaling
auto-scaling

CPU 使用率

實體

實體

實體

:-)

:-)

:-)


Scaling
Scaling

Demo


守則二 架構更勝於擴充

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



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 )







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


洋蔥架構

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

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

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

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

  • (By 蔡煥麟老師翻譯 )

  • 核心 : IOC & DI


洋蔥架構


架構Demo

Demo


Interface
守則四 要Interface化

隔離…才是自保之道



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!?

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


Azure 架構




Asynchronous messaging
Asynchronous Messaging


Azure
Azure 架構

Demo


守則六 搭配雲端的架構


And then
And then !?

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

  • SQL Server AlwaysOn ( HA )

  • Windows Azure Active Directory


Thank You

天空的垃圾場


提醒

上滿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


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



ad