Your SlideShare is downloading. ×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

MongoDB on Windows Azure

4,217
views

Published on

Mark Eisenberg's presentation at Mongo Boston on September 20, 2010

Mark Eisenberg's presentation at Mongo Boston on September 20, 2010

Published in: Technology

0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,217
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
63
Comments
0
Likes
6
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. MongoDB on Windows Azure
    WIP Report
    MongoBoston September 2010
  • 2. Brief Survey
    Business Decision Makers?
    IaaS (ex. AWS or RackSpace) users
  • 3. Management of Resources: What you manage
    Platform as a Service (PaaS)
    Software as a Service (SaaS)
    PRIVATE
    (On-Premise)
    Infrastructure
    as a Service (IaaS)
    Applications
    Applications
    Applications
    Applications
    You Manage
    You Configure
    Development & Runtime Kernels
    Development & Runtime Kernels
    Development & Runtime Kernels
    Development & Runtime Kernels
    You Manage
    Databases
    Databases
    Databases
    Databases
    Security, Management, Load Balancing & Integration
    Security, Management, Load Balancing & Integration
    Security, Management, Load Balancing & Integration
    Security, Management, Load Balancing & Integration
    Logical Servers, Storage
    Logical Servers, Storage
    Logical Servers, Storage
    Logical Servers, Storage
    You Manage
    Managed by Vendor
    Managed by Vendor
    Virtualization
    Virtualization
    Virtualization
    Virtualization
    OS
    OS
    OS
    OS
    Managed by Vendor
    Server Hardware
    Server Hardware
    Server Hardware
    Server Hardware
    Networking, Utilities, Physical
    Networking, Utilities, Physical
    Networking, Utilities, Physical
    Networking, Utilities, Physical
  • 4. The Windows Azure Platform
    Windows Azure is an internet-scale cloud services platform hosted in Microsoft data centers around the world, proving a simple, reliable and powerful platform for the creation of web applications and services.
  • 5. Defining the Windows Azure Architecture
  • 6. Compute Services in Windows Azure
    GOAL: Massive Scalability
    Two role types: Web Role & Worker Role
    Windows Azure applications are built with
    web roles, worker roles, or a combination of both deployed to a number of instances.
    Scale out – not up – by replicating worker instances as needed.
    Allow applications to scale
    user and compute processing independently.
    Each instance runs on its own VM (virtual machine), replicated as needed
  • 7. BLOBS:
    Provide a simple interface for storing named files along with metadata for the file.
    QUEUES:
    Provide reliable storage and delivery of messages for
    an application.
    TABLES:
    Provide structured storage. A table is a set of entities which contain a set of properties.
    Blobs, Tables, Queues and Drives
    DRIVES:
    A durable NTFS file system volume, sharable across instances.
  • 8. Running even one Mongo instance
    Azure runs Windows 2008 server VMs
    .NET 4 included. All else must be bundled.
    XCOPY = GOOD. Registry and MSI = BAD
    MongoDB = XCOPY = GOOD!!!
    Mongo needs disk storage.
    Choose: non-durable or durable
    Local disk: non-durable. Blob: durable!
    Mongo needs connection port
    Multiple instances can’t talk to each other
    Client can’t choose server instance
    Can’t scale – multiple instances are independent!
    Azure uses random ports – Mongo needs to use this port
    Mongod won’t allow mapping of http server port!
  • 9. Single-Instance Solution
    Single worker role instance
    Local (non-durable) or blob (durable) storage
    Single port mapped to mongod.exe
    Server only; no web server access
    Mongod instance as spawned process
    Not as service
    Must specify mapped port, data path, no http
    If server exits, recycle instance
  • 10. Here’s How It’s Done
    var storage = RoleEnvironment.GetLocalResource("MongoDBStorage");
    varstoragePath = storage.RootPath;
    string mongoRoot = Path.Combine(Environment.GetEnvironmentVariable("RoleRoot") +
    @"", @"approotMongoDB");
    intport = RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["MongoIn"].IPEndpoint.Port;
    varcmdline = String.Format( "--nohttpinterface --port {0} --dbpath {1} ", port, storagePath);
    MongoProcess= new Process()
    {
    StartInfo= new ProcessStartInfo(Path.Combine(mongoRoot, @"mongod.exe"), cmdline)
    {
    UseShellExecute= false,
    WorkingDirectory= mongoRoot
    }
    };
    MongoProcess.Start();
  • 11. Managing Instances
    MongoD.exe provides status
    http (28017), mongod shell
    Azure Load Balancer hides instances!
    Single IP/Port inbound from client apps
    Multiple port round-robin internally
    Azure-hosted apps can access instances!
    Must treat all instances equally
    Assuming specific instance access = bad
  • 12. Client works against single IP/Port
    No way for client app to access individual server
    No shared storage
  • 13. Multiple servers accessible via Azure server
    Mainly for management purposes
  • 14. Replica Sets Challenges
    No shell access
    how to configure?
    Single IP
    How to access?
    How to monitor?
    DB access
    How to access Master in set?
    What about storage?
  • 15. Replica Set Solution
    ReplicaSet worker role
    Runs mongod with –replSet
    Management role (either worker or part of web)
    Enumerates all ReplicaSet role instances
    Builds configuration document
    Connects to one node; uploads configwhich initializes replica set
    Client application
    Connects to replica set via compatible driver
    Storage
    Either local storage or blob storage.
    If blob storage, each replica set node has its own blob
  • 16. Areas to be Explored
    Replica set per deployment
    Self configuring replica sets and shards
    Configuration data held in WA Storage
    Instance and Replica Set information pushed
    Mongo HTTP port configuration
  • 17. Coming Soon to a Cloud Near You
    RDP access to instances
    Mongo Sharding will be simpler to implement than replication due to its cloud friendly architecture