Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

Deploying MongoDB on Azure Sridhar Nanjundeswaran, Software Engineer, 10gen @snanjund [email protected]

Slide 3

Slide 3 text

Agenda • Why? • Implementation details • Usage walkthrough

Slide 4

Slide 4 text

Windows Azure Platform • Microsoft’s cloud platform to build, host and scale applications • Hosted in Microsoft data centers Compute Storage Management Relational data Marketplace Middleware CDN Management

Slide 5

Slide 5 text

MongoDB on Windows Azure

Slide 6

Slide 6 text

Details of the MongoDB worker role Implementation Details

Slide 7

Slide 7 text

Highlights • Uses standard MongoDB binaries • Code is open sourced • Works with VS Express • Data persisted on blob storage

Slide 8

Slide 8 text

Details • OnStart • Register change notifiers • Mount Blob • Start mongod • ReplSet Initialize • Run • Run cloud command

Slide 9

Slide 9 text

Details - contd • OnStop • Stepdown • Stop mongod • Unmount blobs

Slide 10

Slide 10 text

Challenges • Debugging • IP potentially changes on reboot • DNS within mongodb. New cloud command • Testing IP change • Reduce instance count and increase • Keeping both sets of configurations in sync

Slide 11

Slide 11 text

Download->Setup->Develop->Debug->Deploy Now let’s use it

Slide 12

Slide 12 text

Setup: Setup Develo p Debug Deploy Monitor

Slide 13

Slide 13 text

Develop • Use solution without sample • Add your worker/web role code to it Setup Develop Debug Deploy Monitor

Slide 14

Slide 14 text

Debugging - Locally • Debugging on emulator works great. • Cloud storage is emulated as local mounted drives • Cannot use to test config changes • csrun /run:; • csrun /update:; • csrun /remove: Setup Develo p Debug Deploy Monitor

Slide 15

Slide 15 text

Deploy • Create storage account • Get key • Create service • Specify storage account/key in solution • Enable RDP when packaging Setup Develo p Debug Deploy Monitor

Slide 16

Slide 16 text

Debugging - deployed • Change runtime config and use RDP • MongoDBLogVerbosity - increase • RecycleOnExit – set to false • Tools • AzureDiagnosticsManager – get diagnostics logs, perf counters from deployed instance • AzureHostedServicesManagerBinary – edit config of running instance • CloudXplorer – download blobs Setup Develo p Debug Deploy Monitor

Slide 17

Slide 17 text

Monitor Setup Develo p Debug Deploy Monitor

Slide 18

Slide 18 text

Pitfalls • Bandwidth • Requires at least medium instance • Debugging locally • Config change cause restarts • Deployment • Storage and compute in same region, use affinity group • Check http vs https • Continuous restarts

Slide 19

Slide 19 text

The Future • Scale out using replica sets • MongoDB Monitoring • Backup and Recovery • Sharding • Publish logs to external storage?

Slide 20

Slide 20 text

@mongodb © Copyright 2010 10gen Inc. conferences, appearances, and meetups http://www.10gen.com/events http://bit.ly/mongofb Facebook | Twitter | LinkedIn http://linkd.in/joinmongo download at mongodb.org We’re Hiring ! [email protected] @snanjund

Slide 21

Slide 21 text

The Solution • Source • https://github.com/mongodb/mongo-azure • Documentation • http://www.mongodb.org/display/DOCS/ MongoDB+on+Azure • Issues • mongodb-user google group • #mongodb IRC • https://jira.mongodb.org/browse/AZURE