database and public endpoints redundancy on azure (radu vunvulea)

64
Premium conference on Microsoft technologies itcampro @ itcamp14 # Database and Public Endpoints redundancy on Azure @RaduVunvulea, iQuest http://vunvulearadu.blogspot.com

Upload: itcamp

Post on 29-Aug-2014

25 views

Category:

Technology


0 download

DESCRIPTION

This is the perfect session if you need to design a solution that needs to run over Windows Azure and needs to be available 24 hours every day, 7 days per week. We will discuss different concepts and solutions to have databases and/or public API’s available even if a part of cloud infrastructure will be down. Topics like automatically backups, failover mechanism, traffic manager and redundancy will be discussed.

TRANSCRIPT

Page 1: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Database and Public

Endpoints redundancy on

Azure

@RaduVunvulea, iQuest

http://vunvulearadu.blogspot.com

Page 2: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Hello ITCamp!

RADU VUNVULEA

MCTS MCP HOME AUTOMATION

MVP ENTERPRISE

AUTOMOTIVE PHARMA

LEAN AND AGILE E-COMMERCE

WEB iQuest

AZURE JAVASCRIPT VUNVULEARADU.BLOGSPOT.COM

MOBILE DOTNET @RaduVunvulea

WCF WPF ENTHUSIASTIC

Page 3: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Huge thanks to our sponsors & partners!

Page 4: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Cloud is not managed by God

Page 5: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Define Redundancy

• SQL Database

• Storage

• Endpoints (HTTP/S, WCF)

• VM

Agenda

Page 6: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Redundancy

Page 7: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

In engineering, redundancy is the duplication

of critical components or functions of a system

with the intention of increasing reliability of

the system, usually in the form of a backup or

fail-safe.

Source: Wikipedia

Redundancy

Page 8: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Hardware

Dual Modular Redundancy

Triple Modular Redundancy

Information

Error detection

Correction

Time

Transient Fault Detection

Software

N-versions Programming

Type of Redundancy

Page 9: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Hardware

Dual Modular Redundancy

Triple Modular Redundancy

Information

Error detection

Correction

Time

Transient Fault Detection

Software

N-versions Programming

Type of Redundancy

Page 10: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Hardware

Dual Modular Redundancy

Triple Modular Redundancy

Information

Error detection

Correction

Time

Transient Fault Detection

Software

N-versions Programming

Type of Redundancy

Page 11: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Hardware

Dual Modular Redundancy

Triple Modular Redundancy

Information

Error detection

Correction

Time

Transient Fault Detection

Software

N-versions Programming

Type of Redundancy

Page 12: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

HOW WE CAN TEST IT?

Page 13: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Netflix: The Chaos Monkey’s job is to randomly

kill instances and services within our

architecture

Chaos Monkey

Page 14: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Failover & Switchover

Page 15: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Failover & Switchover

Page 16: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

SQL REDUDANCY

Page 17: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

SQL Data Sync

Page 18: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

DEMO

Let’s see some code

Page 19: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

SQL Backups

Page 20: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

DEMO

Let’s see some code

Page 21: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

AlwaysOn

Page 22: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

DISASTER RECOVERY PLAN

Page 23: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Do you have a disaster recovery plan?

How long it takes to restart the entire system?

How complicated is your checklist?

Can you parallelize it?

Disaster Recovery Plan (DRP)

Page 24: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Do you have a disaster recovery plan?

How long it takes to restart the entire system?

How complicated is your checklist?

Can you parallelize it?

AUTOMATION

Disaster Recovery Plan (DRP)

Page 25: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

ENDPOINT REDUNDANCY

Page 26: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Any public endpoint

• Accessible from internet or private networks

Endpoint

Page 27: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Load Balancer

Page 28: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Free

• Out of the box

• Lever 3 Load Balancer type

– TCP Level

• No Sticky sessions

• Partial Configurable

Load Balancer

Page 29: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Custom app endpoint

• Processor level, 500 Errors, Parallel task

• Configurable from *.cscfg files

• VM: Using Power Shell

Load Balancer Probe

<LoadBalancerProbes> <LoadBalancerProbe

name="FooProbe" protocol="http"

intervalInSeconds="30" path="/api/probe" port="80"

timeoutInSeconds="60" /> </LoadBalancerProbes>

Page 30: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Redundancy

Page 31: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Traffic Manager

Page 32: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Traffic Manager

Page 33: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Traffic Manager

• ~Load Balancer (Word Wide level)

• Redirect request based on client location

• Any kind of endpoint

– VM, Web/Worker Roles, DB and many more

– External Endpoints

• Methods: Failover, Round Robin, Performance

• Is not FREE (1B DNS query = $0.75)

• DNS TTL

Page 34: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

DEMO

Let’s see some code

Page 35: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Traffic Manager

• [Not Supported] Hybrid Scenarios

Page 36: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

WHY REDUNDANCY IS SO

IMPORTANT?

Page 37: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Compute 99.95%

• SQL Database 99.90%

• Storage 99.90%

• Storage (RA-GRS) 99.99%

• Active Directory 99.90%

• Cache 99.90%

• VM 99.95%

• Service Bus 99.95%

Windows Azure SLA’s

Page 38: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Compute 99.95% 21.6m

• SQL Database 99.90% 43.2m

• Storage 99.90% 43.2m

• Storage (RA-GRS) 99.99% <8m

• Active Directory 99.90% 43.2m

• Cache 99.90% 43.2m

• VM 99.95% 21.6m

• Service Bus 99.95% 21.6m

Windows Azure SLA’s (per month)

Page 39: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Compute 99.95% 21.6m

• SQL Database 99.90% 43.2m

• Storage 99.90% 43.2m

• Storage (RA-GRS) 99.99% <8m

• Active Directory 99.90% 43.2m

• Cache 99.90% 43.2m

• VM 99.95% 21.6m

• Service Bus 99.95% 21.6m

Windows Azure SLA’s

Page 40: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Downtime per month: 216m

21.6*2+43.2*4=216m

Windows Azure SLA’s

Page 41: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Downtime per month: 216m

21.6*2+43.2*4=216m

• Downtime per month: 0.5%

(100/43200)*216=0.5%

Windows Azure SLA’s

Page 42: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Downtime per month: 216m

21.6*2+43.2*4=216m

• Downtime per month: 0.5%

(100/43200)*216=0.5%

• Uptime: 99.5%

100-0.5=99.5%

Windows Azure SLA’s

Page 43: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Compute 99.95% 21.6m

• SQL Database 99.90% 43.2m

• Storage 99.90% 43.2m

• Storage (RA-GRS) 99.99% <8m

• Active Directory 99.90% 43.2m

• Cache 99.90% 43.2m

• VM 99.95% 21.6m

• Service Bus 99.95% 21.6m

Windows Azure SLA’s

Page 44: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

WCF ENDPOINTS REDUNDANCY

Page 45: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Service Bus Relay

Relay

Page 46: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Steps to integrate in existing application

– Add assembly reference to SB Relay

– Update WCF configuration sections

(client and backend)

Service Bus Relay

Page 47: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Works only with

– Async calls

– Fire and Forget calls

• Broker between endpoint and client

• Store messages until backend is available

• WCF Endpoint (Azure or on-premises)

• Price model similar with SB (per messages)

Service Bus Relay

Page 48: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

STORAGE REDUNDANCY

Page 49: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• 3 copy of the content in the same data center

Locally Redundant Storage

1

3

2

Page 50: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• 2 different data centers

• Async replication

Geographically Redundant Storage

1

3

2

1

3

2

Page 51: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Similar with GRS

• Read only access to the secondary storage

• Redirecting managed by developer

• Async replication

• 99.99% Uptime

Read Access Geo Redundant Storage

Page 52: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

DEMO

Let’s see some code

Page 53: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Traffic Manager

Page 54: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

CHECK HEALTH STATUS OF

OTHER SERVICES

Traffic Manager

Page 55: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Import Export Service

Page 56: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Import/Export Service

Page 57: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

DEMO

Let’s see some code

Page 58: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

MTBF, MTTR

Page 59: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Mean Time Between Failures

Mean Time To Recovery

MTBF -> MTTR

Page 60: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

VM REDUNDANCY

Page 61: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Same features offered by System Center on-

premises

• Availability Set

• Windows Server Failover Cluster

– Real time Sync

VM

Page 62: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

CONCLUSION

Page 63: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

• Everything has a price

• Calculate up-time for specific roles and use-

case

• Don’t trust the 99.99% myth

• Be as flexible as possible

• Automate

• Recovery plans

Conclusion

Page 64: Database and Public EndPoints Redundancy on Azure (Radu Vunvulea)

Premium conference on Microsoft technologies itcampro@ itcamp14#

Q & A