Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MongoNYC 2012: Deploying MongoDB on Azure

mongodb
June 05, 2012
1.8k

MongoNYC 2012: Deploying MongoDB on Azure

MongoNYC 2012: Deploying MongoDB on Azure, Sridhar Nanjundeswaran, Software Engineer. A brief overview of building and deploying applications using MongoDB Replica Sets on Windows Azure followed by an interactive session to discuss recommended configurations and tips (and tricks).

mongodb

June 05, 2012
Tweet

Transcript

  1. 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
  2. Highlights • Uses standard MongoDB binaries • Code is open

    sourced • Works with VS Express • Data persisted on blob storage
  3. Details • OnStart • Register change notifiers • Mount Blob

    • Start mongod • ReplSet Initialize • Run • Run cloud command
  4. 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
  5. Develop • Use solution without sample • Add your worker/web

    role code to it Setup Develop Debug Deploy Monitor
  6. Debugging - Locally • Debugging on emulator works great. •

    Cloud storage is emulated as local mounted drives • Cannot use to test config changes • csrun /run:<dir>;<config> • csrun /update:<depl id>;<new config> • csrun /remove:<depl id> Setup Develo p Debug Deploy Monitor
  7. Deploy • Create storage account • Get key • Create

    service • Specify storage account/key in solution • Enable RDP when packaging Setup Develo p Debug Deploy Monitor
  8. 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
  9. 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
  10. The Future • Scale out using replica sets • MongoDB

    Monitoring • Backup and Recovery • Sharding • Publish logs to external storage?
  11. @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
  12. 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