Deep thoughts from the real world of azure

65
Deep Thoughts from the Real World of Azure Michele Leroux Bustamante CIO, Solliance Cofounder, Snapboard [email protected]

description

I presented this at a user group in Sweden, as a compilation discussion of practical customer experiences with WIndows Azure. The slides led the discussion. Enjoy.

Transcript of Deep thoughts from the real world of azure

Page 1: Deep thoughts from the real world of azure

Deep Thoughtsfrom the

Real World of Azure

Michele Leroux Bustamante

CIO, SollianceCofounder, Snapboard

[email protected]

Page 2: Deep thoughts from the real world of azure

Windows Azure FeaturesCompute

VirtualNetwork

TrafficManager

CDN

Storage

Queues

Storage

Tables

Storage

Blobs

SQL Database

SQL Data Sync

SQL Reporting

HDInsight (Hadoop)

Caching Recovery Services

Windows Azure Active Directory

Media Services

Service Bus

Store

Web Site Cloud Service

Virtual Machine

ApplicationServices

Marketplace

DataServices

Networking

MobileServices

BizTalkServices

Page 3: Deep thoughts from the real world of azure

Azure FeaturesCompute

Web Site Cloud Service

Virtual Machine

Page 4: Deep thoughts from the real world of azure

Your Datacenter

Virtualization

O/S

Hardware

Network

Data

Applications

Firewall

Web Sites

Applications

Data

Cloud Services

Applications

Firewall Rules

Data

Virtual Network

Virtual Machines

Virtual Network

Data

Applications

Firewall Rules

O/S

Focus on the Application

Microsoft Azure

Page 5: Deep thoughts from the real world of azure

IAASVIRTUAL MACHINES

Page 6: Deep thoughts from the real world of azure

Virtual Machine ProvisioningChoose a VM

Blob Storage

Generate

Provision

Select your VHD

Blob Storage

Upload

Provision

Page 7: Deep thoughts from the real world of azure
Page 8: Deep thoughts from the real world of azure

PAASCLOUD SERVICES & WEB SITES

Page 9: Deep thoughts from the real world of azure

WEB SITES

Page 10: Deep thoughts from the real world of azure

Deep Thoughts on Web Sites

• New portal • Publishing process• Setting overrides• Log streaming• SWAP (but…)

Page 11: Deep thoughts from the real world of azure

CLOUD SERVICES

Page 12: Deep thoughts from the real world of azure

Cloud Services Are…

Web Role Worker Role

Page 13: Deep thoughts from the real world of azure

Upload to Windows Azure

Windows Azure Compute Controller

LB

ServiceService

Packaging & DeploymentServiceArtifacts

Model

Config*.cscfg

*.cspkgMicrosoft

Visual StudioWeb Role

Worker Role

Page 14: Deep thoughts from the real world of azure

ROLE

VIP Swap

VM1 VM2

VM3 VM4

VM1 VM2

VM3 VM4

Page 15: Deep thoughts from the real world of azure

Deep Thoughts on Cloud Services

• Packaging settings outside of web.config

• Proper swap, separate VM• Application insights agent• Mostly for worker roles, reading

queues, async processing

Page 16: Deep thoughts from the real world of azure

Deep Thoughts on Worker Roles

• Set up configuration settings to shut off processing

• Implement graceful shutdown

Page 17: Deep thoughts from the real world of azure

Azure Features

Storage

Tables

SQL Database

SQL Data Sync

SQL Reporting

HDInsight (Hadoop)

DataServices

Page 18: Deep thoughts from the real world of azure

SQL DB and SQL Server

• SQL DB (formerly SQL Azure)– 150GB limit– No backup logs / replay– IO performance – Other SQL features

• SQL DB Premium– 500GB limit– 30 days of backups– Restore on demand

• SQL Server on Azure VM– Popular alternative– 1TB limit (blob storage)

Page 19: Deep thoughts from the real world of azure

What do YOU want in a DB?

• No limits manage yourself– SQL Server VM

• Managed and affordable– SQL DB

• Managed and $$$–MySQL / ClearDB cluster– SQL DB Premium– Other similar options for MySQL/SQL

Server outside of Azure

Page 20: Deep thoughts from the real world of azure

Deep Thoughts on Relational Data

• All platforms require retry mechanism

• Mind your connection pool settings• Practice backup and restore• Always use data masking to dev, test• PII, encryption• Review queries, profile, tune• Use transactions for Pete’s sake

Page 21: Deep thoughts from the real world of azure

noSQL

• It’s either obvious…– Very large quantities of data– Easily compartmentalized data, key value lookup or document-

centric– Logs, audit trails, notifications, profile data from social networks,

associative information about users / “things” in the relational store

• Or, it requires planning…– Could be large quantities– Could require noSQL scale, parallel access performance

• Many people return to relational• Can start relational and figure your model out first• Or, combine the two

Page 22: Deep thoughts from the real world of azure

Understanding noSQL

• http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis

Page 23: Deep thoughts from the real world of azure

Big Data/Map Reduce from 10K Feet

Company B Company CCompany A

AggregateData

(all Companies)

HDInsight

Company A

Server

Company C

Company B

HDInsight(local)

HDInsight(local)

HDInsight(local)

Page 24: Deep thoughts from the real world of azure

Don’t Drink the KoolaidnoSQL

Hadoop

Big Data

Page 25: Deep thoughts from the real world of azure

Don’t Drink the Koolaid

• noSQL requires planning• BigData is not for everyone

• Get an expert, like: Lynn Langit– www.lynnlangit.com – Youtube.com/socaldevgal Shout Out!

Page 26: Deep thoughts from the real world of azure

Azure Features

Service Bus

ApplicationServices

Storage

Queues

DataServices

Page 27: Deep thoughts from the real world of azure

Service Bus as DMZ

Service Service Service

Web API Web API

Browser BrowserRich

ClientsMVC /JQuery AJAX

Service

MobileClients

DMZ

Corporate Domain

MVCSite

Web Forms

Site

Page 28: Deep thoughts from the real world of azure

Service Bus to Data On Premise / Migration

Service

Client

Web Application

Service Bus

Corporate Domain

Windows Azure

Page 29: Deep thoughts from the real world of azure

Queues

Queue

Queue

Page 30: Deep thoughts from the real world of azure

Topics

TopicSubSubSub

Page 31: Deep thoughts from the real world of azure

Queue ComparisonService Bus

QueuesStorage Queues

Unlimited message lifetime

7 days expiry

Max 64K message size Max 256K message size

Max 5GB total storage Max 100TB total storageDuplicate detection

Order guarantees

Dead letter queue

Storage metrics

Purge capability

Long polling Manual back-off polling

Page 32: Deep thoughts from the real world of azure

Queue ComparisonService Bus

QueuesStorage Queues

Unlimited message lifetime

7 days expiry

Max 64K message size Max 256K message size

Max 5GB total storage Max 100TB total storageDuplicate detection

Order guarantees

Dead letter queue

Storage metrics

Purge capability

Long polling Manual back-off polling

Page 33: Deep thoughts from the real world of azure

Queue ComparisonService Bus

QueuesStorage Queues

EASYCOMPLEX

Page 34: Deep thoughts from the real world of azure

Deep Thoughts on Async Work

• Queues and worker roles• Use error queues• Monitor queues for expiring items• Use service bus for parallel

processing• Use web jobs to kick off queue

processing

Page 35: Deep thoughts from the real world of azure

Azure Features

CDN

Storage

Blobs

Media Services

ApplicationServices

DataServices

Networking

Page 36: Deep thoughts from the real world of azure

Common Blob Storage Usage

• Web site content, javascript, css, images• Logs (setting)• App content

– Can separate by user for key isolation via Azure Explorer

• Media– Can use with media services, encoding services

• Replace file storage– Retain folder structure– Request by path

• Very large files– Set up chunking process for upload– Use hash to check integrity

Page 37: Deep thoughts from the real world of azure

Blob Storage Integrity

Windows Azure Storage

Blob Container

Service

validatesignature

WindowsAzure

MD5Hash +

MD5Hash +

Page 38: Deep thoughts from the real world of azure

Shared Access Signatures

Service

Public Blob Access

createupdatedelete

read

Service

Public Container

Access

createupdatedeleteread

list

Service

Private Container

createupdatedeleteread

list

list

Service

Private Container

readaccessfor limited timewithsharedaccesskey

sharedaccesspolicy

Browser Client

Shared AccessSignature (SAS)

>1 hour requiresauthenticationheader in request(no browser)

Page 39: Deep thoughts from the real world of azure

Deep Thoughts on Blobs

• Doh, protect your content!• Separate containers for management

roles and delegation• Write some reusable tools for saving,

chunking, shared access, reading, writing to streams, etc.

• Backup, backup, backup (AZCopy)• Snapshots, maybe

Page 40: Deep thoughts from the real world of azure

Azure Features

Azure Active Directory

Access Control

ApplicationServices

Page 41: Deep thoughts from the real world of azure

Single Sign On

Page 42: Deep thoughts from the real world of azure

Access Control (THE OLD WAY)

Your App

AccessControl

Google

Yahoo! WindowsLive

FaceBook

Browser

1 25

3

4

Page 43: Deep thoughts from the real world of azure

User Provisioning

Apps

AzureActive

Directory

Browser

AppsApps

AppsApps

Apps

Page 44: Deep thoughts from the real world of azure

DirSync with AAD

Apps

AzureActive

Directory

Browser

On PremiseAD

AppsApps

DirSync

AppsApps

Apps

Page 45: Deep thoughts from the real world of azure

Single Sign-On (sort of)

Page 46: Deep thoughts from the real world of azure

46

Page 47: Deep thoughts from the real world of azure

Deep Thoughts on IAM

• Don’t write your own identity server• Use one that can support social and

corporate identity• Provide a smooth sign up/

registration• Choose social login options carefully• You are more secure with a service• Have a back door for login (yep)

Page 48: Deep thoughts from the real world of azure

Deep Thoughts on Security Audits

• Have separate security logs• Log failed access • Retain logs 1 yr min• No production keys in open (encrypt)• Encrypt PII in database• Mask data to dev, test• Explore every web threat• Protect your content, APIs

Page 49: Deep thoughts from the real world of azure

WORST PASSWORDS TOP 3 FOR 2013

123456password12345678

Page 50: Deep thoughts from the real world of azure

Deep Thoughts on Deployment

• Wouldn’t automated deployment / upgrade be nice?

• Be very very careful– Know the location of all parts prod,

staging, dev, and test– Review configurations, again, and again– Beware running jobs (workers)

• Pray• Just kidding

Page 51: Deep thoughts from the real world of azure
Page 52: Deep thoughts from the real world of azure
Page 53: Deep thoughts from the real world of azure

53

Page 54: Deep thoughts from the real world of azure
Page 55: Deep thoughts from the real world of azure

Deep Thoughts on Logs

• Is built in better?• Know where your logs are (yep)–WAD, table storage events, security

audits, IIS logs

• Table storage or blobs (csv)?• Real time info• Historical queries• Logging can (should) evolve

Page 56: Deep thoughts from the real world of azure
Page 57: Deep thoughts from the real world of azure

Deep Thoughts on Troubleshooting

• Log everything possible• Use an agent if possible for

monitoring• Configure error alerts• Use google analytics, really• Be ready with real time queries

Page 58: Deep thoughts from the real world of azure

58

Page 59: Deep thoughts from the real world of azure

59

Page 60: Deep thoughts from the real world of azure

60

Page 61: Deep thoughts from the real world of azure
Page 62: Deep thoughts from the real world of azure

Backup and Recovery

• Back up your data base, test recovery

• Back up blob storage nightly, keep a rolling archive

• Know how to spin up a complete architecture, in emergency – State of code– Data, storage–Moving parts

Page 63: Deep thoughts from the real world of azure

Azure FeaturesCompute

VirtualNetwork

TrafficManager

CDN

Storage

Queues

Storage

Tables

Storage

Blobs

SQL Database

SQL Data Sync

SQL Reporting

HDInsight (Hadoop)

Caching Recovery Services

Windows Azure Active Directory

Access Control

Media Services

Service Bus

Store

Web Site Cloud Service

Virtual Machine

ApplicationServices

Marketplace

DataServices

Networking

MobileServices

Page 64: Deep thoughts from the real world of azure

He taught Chuck Norris martial arts

Page 65: Deep thoughts from the real world of azure

THANK YOU!