68
Radu Vunvulea @RaduVunvulea http://vunvulearadu.blogspot.com DATABASE AND PUBLIC ENDPOINTS REDUNDANCY ON AZURE

Database and Public Endpoints redundancy on Azure

Embed Size (px)

DESCRIPTION

Database and Public Endpoints redundancy on Azure Radu Vunvulea

Citation preview

Page 1: Database and Public Endpoints redundancy on Azure

Radu Vunvulea@RaduVunvuleahttp://vunvulearadu.blogspot.com

DATABASE AND PUBLIC ENDPOINTS REDUNDANCY ON AZURE

Page 2: Database and Public Endpoints redundancy on Azure

OUR SPONSORS MADE THIS POSSIBLE!THANK YOU!

Page 3: Database and Public Endpoints redundancy on Azure

Click icon to add picture

Transylvania, Romania

Page 4: Database and Public Endpoints redundancy on Azure

RADU VUNVULEA MCTS MCP BANK 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 5: Database and Public Endpoints redundancy on Azure

CLOUD IS NOT MANAGED BY GOD

Page 6: Database and Public Endpoints redundancy on Azure

AGENDA

• Define Redundancy • SQL Database• Storage• Endpoints (HTTP/S, WCF)• VM

Page 7: Database and Public Endpoints redundancy on Azure
Page 8: Database and Public Endpoints redundancy on Azure

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 9: Database and Public Endpoints redundancy on Azure

HardwareDual Modular RedundancyTriple Modular RedundancyInformationError detectionCorrectionTime Transient Fault DetectionSoftwareN-versions Programming

TYPE OF REDUNDANCY

Page 10: Database and Public Endpoints redundancy on Azure

HardwareDual Modular RedundancyTriple Modular RedundancyInformationError detectionCorrectionTime Transient Fault DetectionSoftwareN-versions Programming

TYPE OF REDUNDANCY

Page 11: Database and Public Endpoints redundancy on Azure

HardwareDual Modular RedundancyTriple Modular RedundancyInformationError detectionCorrectionTime Transient Fault DetectionSoftwareN-versions Programming

TYPE OF REDUNDANCY

Page 12: Database and Public Endpoints redundancy on Azure

HardwareDual Modular RedundancyTriple Modular RedundancyInformationError detectionCorrectionTime Transient Fault DetectionSoftwareN-versions Programming

TYPE OF REDUNDANCY

Page 13: Database and Public Endpoints redundancy on Azure

HardwareDual Modular RedundancyTriple Modular RedundancyInformationError detectionCorrectionTime Transient Fault DetectionSoftwareN-versions Programming

TYPE OF REDUNDANCY

Page 14: Database and Public Endpoints redundancy on Azure

HOW WE CAN TEST IT?

Page 15: Database and Public Endpoints redundancy on Azure

Netflix: The Chaos Monkey’s job is to randomly kill instances and services within our architecture

CHAOS MONKEY

Page 16: Database and Public Endpoints redundancy on Azure

CHAOS MONKEY

Page 17: Database and Public Endpoints redundancy on Azure

?FAILOVER & SWITCHOVER

Page 18: Database and Public Endpoints redundancy on Azure

FAILOVER & SWITCHOVER

Page 19: Database and Public Endpoints redundancy on Azure

SQL REDUDANCY

Page 20: Database and Public Endpoints redundancy on Azure
Page 21: Database and Public Endpoints redundancy on Azure

DEMO

LET’S SEE SOME CODE

Page 22: Database and Public Endpoints redundancy on Azure

SQL BACKUPS

Page 23: Database and Public Endpoints redundancy on Azure

DEMO

LET’S SEE SOME CODE

Page 24: Database and Public Endpoints redundancy on Azure

ALWAYSON

Page 25: Database and Public Endpoints redundancy on Azure

DISASTER RECOVERY PLAN

Page 26: Database and Public Endpoints redundancy on Azure

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 27: Database and Public Endpoints redundancy on Azure

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 28: Database and Public Endpoints redundancy on Azure

ENDPOINT REDUNDANCY

Page 29: Database and Public Endpoints redundancy on Azure

• Any public endpoint• Accessible from internet or private networks

ENDPOINT

Page 30: Database and Public Endpoints redundancy on Azure

LOAD BALANCER

Page 31: Database and Public Endpoints redundancy on Azure

• Free • Out of the box• Lever 3 Load Balancer type

– TCP Level• No Sticky sessions• Partial Configurable

LOAD BALANCER

Page 32: Database and Public Endpoints redundancy on Azure

• 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 33: Database and Public Endpoints redundancy on Azure

REDUNDANCY

Page 34: Database and Public Endpoints redundancy on Azure

TRAFFIC MANAGER

Page 35: Database and Public Endpoints redundancy on Azure

TRAFFIC MANAGER

Page 36: Database and Public Endpoints redundancy on Azure

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 37: Database and Public Endpoints redundancy on Azure

DEMO

LET’S SEE SOME CODE

Page 38: Database and Public Endpoints redundancy on Azure

TRAFFIC MANAGER

• [Not Supported] Hybrid Scenarios

Page 39: Database and Public Endpoints redundancy on Azure

WHY REDUNDANCY IS SO IMPORTANT?

Page 40: Database and Public Endpoints redundancy on Azure

• 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 41: Database and Public Endpoints redundancy on Azure

• 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 42: Database and Public Endpoints redundancy on Azure

• 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 43: Database and Public Endpoints redundancy on Azure

• Downtime per month: 216m21.6*2+43.2*4=216m

WINDOWS AZURE SLA’S

Page 44: Database and Public Endpoints redundancy on Azure

• Downtime per month: 216m21.6*2+43.2*4=216m

• Downtime per month: 0.5%(100/43200)*216=0.5%

WINDOWS AZURE SLA’S

Page 45: Database and Public Endpoints redundancy on Azure

• Downtime per month: 216m21.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 46: Database and Public Endpoints redundancy on Azure

• 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 47: Database and Public Endpoints redundancy on Azure

WCF ENDPOINTS REDUNDANCY

Page 48: Database and Public Endpoints redundancy on Azure

SERVICE BUS RELAY

Relay

Page 49: Database and Public Endpoints redundancy on Azure

• Steps to integrate in existing application– Add assembly reference to SB Relay– Update WCF configuration sections

(client and backend)

SERVICE BUS RELAY

Page 50: Database and Public Endpoints redundancy on Azure

• 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 51: Database and Public Endpoints redundancy on Azure

STORAGE REDUNDANCY

Page 52: Database and Public Endpoints redundancy on Azure

• 3 copy of the content in the same data center

LOCALLY REDUNDANT STORAGE

1

3

2

Page 53: Database and Public Endpoints redundancy on Azure

• 2 different data centers• Async replication

GEOGRAPHICALLY REDUNDANT STORAGE

1

3

2

1

3

2

Page 54: Database and Public Endpoints redundancy on Azure

• 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 55: Database and Public Endpoints redundancy on Azure

DEMO

LET’S SEE SOME CODE

Page 56: Database and Public Endpoints redundancy on Azure

TRAFFIC MANAGER

Page 57: Database and Public Endpoints redundancy on Azure

TRAFFIC MANAGER

CHECK HEALTH STATUS OFOTHER SERVICES

Page 58: Database and Public Endpoints redundancy on Azure

IMPORT EXPORT SERVICE

Page 59: Database and Public Endpoints redundancy on Azure

IMPORT/EXPORT SERVICE 

Page 60: Database and Public Endpoints redundancy on Azure

DEMO

LET’S SEE SOME CODE

Page 61: Database and Public Endpoints redundancy on Azure

MTBF, MTTR

Page 62: Database and Public Endpoints redundancy on Azure

Mean Time Between FailuresMean Time To Recovery

MTBF -> MTTR

Page 63: Database and Public Endpoints redundancy on Azure

VM REDUNDANCY

Page 64: Database and Public Endpoints redundancy on Azure

• Same features offered by System Center on-premises

• Availability Set• Windows Server Failover Cluster

– Real time Sync

VM

Page 65: Database and Public Endpoints redundancy on Azure

CONCLUSION

Page 66: Database and Public Endpoints redundancy on Azure

• 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 67: Database and Public Endpoints redundancy on Azure

Q & A

Page 68: Database and Public Endpoints redundancy on Azure

OUR SPONSORS MADE THIS POSSIBLE!THANK YOU!