the three aas's of mongodb in windows azure

37
The three Aas’s of MongoDB on Windows Azure IaaS, PaaS, SaaS Doug Mahugh, Lead Technical Evangelist Brian Benz, Sr. Technical Evangelist Microsoft Open Technologies, Inc. Sridhar Nanjundeswaran Software Engineer 10gen

Upload: mongodb

Post on 12-May-2015

3.716 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: The three aaS's of MongoDB in Windows Azure

The three Aas’s ofMongoDB on Windows Azure

IaaS, PaaS, SaaS

Doug Mahugh, Lead Technical EvangelistBrian Benz, Sr. Technical EvangelistMicrosoft Open Technologies, Inc.

Sridhar NanjundeswaranSoftware Engineer10gen

Page 2: The three aaS's of MongoDB in Windows Azure

Agenda

• Windows Azure in 60 Seconds• MongoDB + Windows Azure• IaaS [demo]• PaaS [demo]• SaaS [demo]• Hybrid Approaches• Q&A

Page 3: The three aaS's of MongoDB in Windows Azure

Windows Azure in 60 Seconds

A brief high-level overview for those who are new to Windows Azure

Page 4: The three aaS's of MongoDB in Windows Azure

Cloud ComputingPackaged Software

Storage

Servers

Networking

O/S

Middleware

Virtualization

Data

Applications

Runtime

You

man

age

Infrastructure(as a Service)

Storage

Servers

Networking

O/S

Middleware

Virtualization

Data

Applications

Runtime

Managed by vendor

You

man

age

Platform(as a Service)

Managed by vendor

You

man

age

Storage

Servers

Networking

O/S

Middleware

Virtualization

Applications

Runtime

Data

Software(as a Service)

Managed by vendor

Storage

Servers

Networking

O/S

Middleware

Virtualization

Applications

Runtime

Data

Page 5: The three aaS's of MongoDB in Windows Azure

Windows Azure: What It Is

Win·dows·Az·ure [win-dohz-azh-er]

Noun: A comprehensive set of services that enable you to quickly build, deploy and manage applications across a global network of Microsoft-managed datacenters.

99.95% Monthly SLAPay only for what you use

Page 6: The three aaS's of MongoDB in Windows Azure

Windows Azure: What It Is

Open

Flexible

Solid

Page 7: The three aaS's of MongoDB in Windows Azure

Windows Azure: What It Is

Global Footprint

Page 8: The three aaS's of MongoDB in Windows Azure

Windows Azure: What It Is

Cloud Services

WebSites

Virtual Machines

Page 9: The three aaS's of MongoDB in Windows Azure

Windows Azure: What It Is

Flexible

Page 10: The three aaS's of MongoDB in Windows Azure

Windows Azure: What It Is

Host Build Consume

IaaS PaaS SaaS

Page 11: The three aaS's of MongoDB in Windows Azure

Getting Started

http://www.windowsazure.com/en-us/pricing/free-trial/

http://channel9.msdn.com/Events/WindowsAzureConf/2012/KEY01

Sign up for a free trial

Learn about the latest features

Page 12: The three aaS's of MongoDB in Windows Azure

• Open-source SDKs forpopular programminglanguages, to get youup and running quickly

• Choice of popular IDEssuch as Visual Studioand Eclipse

• Consistent REST protocols and APIs across Windows Azure serviceshttp://www.windowsazure.com/en-us/develop/overview/

Windows Azure Developer Center

MongoDB drivers:

.NET driver

Node.js driver

Java driver

PHP driver

Python driver

Driver download page

Page 13: The three aaS's of MongoDB in Windows Azure

MongoDB on Windows Azure provides all the benefits customers have come to expect from cloud computing: elasticity, on-demand capacity, faster time to market, and pay-for-what-you-use pricing.

• MongoDB offers built-in support for horizontal scaling and sharding

• Windows Azure offers built-in support for responsive auto-scaling

+

Page 14: The three aaS's of MongoDB in Windows Azure

Replica set hosted

on Windows Azure

worker roles orvirtual machines

Replica Set

Primary

Secondary

Secondary

DriverYour Application

Replica Sets: High Availability

Page 15: The three aaS's of MongoDB in Windows Azure

Shards, config servers and mongos (router) hosted on Windows Azure worker roles or

virtual machines

Key range A-D

Primary

Secondary

Secondary

Sharding: Scalability

Key range E-G

Primary

Secondary

Secondary

Key range G-Z

Primary

Secondary

Secondary

Mongos (router)Your

Application

Config 1

Config 2

Config 3

Mongos (router)

Page 16: The three aaS's of MongoDB in Windows Azure

IaaSDeploying MongoDB replica sets on

Windows Azure virtual machines

Page 17: The three aaS's of MongoDB in Windows Azure

Windows AzureVirtual

Machines

Windows Server 2008 R2

Windows Server 2012

OpenSUSE 12.1

CentOS 6.2

Ubuntu 12.04

SUSE Linux Enterprise Server SP2

Page 18: The three aaS's of MongoDB in Windows Azure

Virtual Machine Sizes

Each Persistent Data Disk Can be up to 1 TB

VM Size CPU Cores Memory Bandwidth

(Mbps)# Data Disks

Extra Small Shared 768 MB 5 1

Small 1 1.75 GB 100 2

Medium 2 3.5 GB 200 4

Large 4 7 GB 400 8

Extra Large 8 14 GB 800 16

Page 19: The three aaS's of MongoDB in Windows Azure

Deploying to Virtual Machines

– Compared to worker role (PaaS), VM-basedreplica sets offer more control, aswell as more responsibility

– MongoDB Installer for Windows Azure is a great learning tool. Not typically used for production deployment.• Puts MongoDB on OS disk instead of attached disk• Limited to 30gb, not performant for writes, Windows-only• http://www.mongodb.org/display/DOCS/MongoDB+on+Azure+VM+-+Windows+Insta

ller

• .\deploy-mongo.ps1 <node-count> <dns-prefix> <image-name> <password> <location> <pub-settings-file-path> [replica-set-name]

– For Linux VM deployment, see tutorial - http://www.mongodb.org/display/DOCS/MongoDB+on+Azure+VM+-+Linux+Tutorial

Page 20: The three aaS's of MongoDB in Windows Azure

azure topic verb options

Command Line Syntax Overviewprompt>

accountaccount locationaccount affinity-groupvmvm diskvm endpointvm imageserviceservice certsiteconfig

downloadimportlistshowdeletestartrestartshutdowncapturecreateattachdetachbrowseset

usernamepassworddns-prefixvm-namelb-porttarget-image-namesource-pathdisk-image-namesize-in-gbthumbprintvalue-v-vv

Page 21: The three aaS's of MongoDB in Windows Azure

Example: Provisioning a Replica Setazure vm create mongoc9 "OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd" username password -l "West US" -e azure vm create mongoc9 "OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd" username password -l "West US" -e 23 -c azure vm create mongoc9 "OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd" username password -l "West US" -e 24 -c

azure vm endpoint create mongoc9 27017 27017azure vm endpoint create mongoc9-2 27018 27018azure vm endpoint create mongoc9-3 27019 27019

To set up MongoDB, SSH into each instance and:

get mongodb binaries and installcreate db dirstart mongod, initialize replica set

Page 22: The three aaS's of MongoDB in Windows Azure

Demo - IaaSmongo-demo.php?host=windows IaaS – Windows Azure virtual machines1

1

mongo-demo.php?host= SaaS – MongoLab on Windows Azure2

2

Page 23: The three aaS's of MongoDB in Windows Azure

IaaS – where to learn more• MongoDB on Azure VM - http://

www.mongodb.org/display/DOCS/MongoDB+on+Azure+VM• Install MongoDB on a virtual machine running CentOS Linux in Windows Azure:

http://www.windowsazure.com/en-us/manage/linux/common-tasks/mongodb-on-a-linux-vm/

• Install MongoDB on a virtual machine running Windows Server 2008 R2 in Windows Azure:http://www.windowsazure.com/en-us/manage/windows/common-tasks/install-mongodb/

• Node.js Web Application with Storage on MongoDB (Virtual Machine):http://waweb.windowsazure.com/en-us/develop/nodejs/tutorials/website-with-mongodb-(mac)/

• Create a Windows Azure web site that connects to MongoDB running on a virtual machine in Windows Azure:http://www.windowsazure.com/en-us/develop/net/tutorials/website-with-mongodb-vm/

Page 24: The three aaS's of MongoDB in Windows Azure

PaaSDeploying MongoDB replica sets on

Windows Azure worker roles (cloud services)

Page 25: The three aaS's of MongoDB in Windows Azure

Deploying MongoDB as a Cloud Service

– Windows Azure cloud servicesrun on a fully automated, highlyscalable cloud platform

– Ongoing management of the OS and infrastructure is handled by Windows Azure

– Infinitely scalable, on demand– App and MongoDB in same cloud service provides security – PaaS approach is the easiest way to deploy MongoDB on

Windows Azure– For quick and simple deployment, use the MongoDB on

Azure Worker Role:http://www.mongodb.org/display/DOCS/MongoDB+on+Azure+Worker+Roles

Page 26: The three aaS's of MongoDB in Windows Azure

DEMO-PaaS

Page 28: The three aaS's of MongoDB in Windows Azure

SaaSUsing the hosted MongoDB service

from MongoLab

Page 29: The three aaS's of MongoDB in Windows Azure

Hosted MongoDB: available in the Windows Azure Store

http://www.windowsazure.com/en-us/store/overview/

Page 30: The three aaS's of MongoDB in Windows Azure

Manage MongoLab instances through Windows Azure management portal

Page 31: The three aaS's of MongoDB in Windows Azure

Demo: MongoLab + C#/.NET

Page 32: The three aaS's of MongoDB in Windows Azure

SaaS – where to learn more

• Node.js Web Application with Storage on MongoDB (MongoLab):http://www.windowsazure.com/en-us/develop/nodejs/tutorials/website-with-mongodb-mongolab/

• Create a C# ASP.NET Application on Windows Azure with MongoDB using the MongoLab Add-On:http://www.windowsazure.com/en-us/develop/net/tutorials/website-with-mongodb-mongolab/

Page 33: The three aaS's of MongoDB in Windows Azure

Hybrid Approaches

Combining hosted services, cloud applications, and on-premises

applications

Page 34: The three aaS's of MongoDB in Windows Azure

Deployment Complexity

OperationalResponsibility Flexibility OS Security

IaaS Some High High Linux or Windows Custom

PaaS Some Low High Windows only Built-in

SaaS Low/none None Limited N/A Built-in

Which approach is best for you?

Page 35: The three aaS's of MongoDB in Windows Azure

IaaSVirtual Machines

PaaSWeb Sites

PaaSCloud Services

Other sites, local apps, etc.

Your App

IaaSVirtual Machines

PaaSCloud Services

SaaSMongoLab, MongoHQ

Self-hosted

Your Data

Page 36: The three aaS's of MongoDB in Windows Azure

Other Resources• MongoDB on Azure:

http://www.mongodb.org/display/DOCS/MongoDB+on+Azure+-+Overview

• MongoDB Experts video series:http://blogs.msdn.com/b/interoperability/archive/2012/06/01/mongodb-experts-video-series.aspx

• Windows Azure development:www.WindowsAzure.com

• Windows Azure Training Kit:http://windowsazure-trainingkit.github.com/

Page 37: The three aaS's of MongoDB in Windows Azure

Q&A