SlideShare a Scribd company logo
MongoDB in Windows Azure
Evgeniy Maliy, QA engineer
Cloud Service
Brief introduction to Windows Azure
Cloud Service
Azure VM Azure VMAzure VM
private port
public port
private
port
public
port 1
private
port
public
port 2
private
port
public
port 3
Common DNS name
and public IP
publicport
private
port
Standalone endpoints
Load balanced
endpoints
Round-robin load balancer
Azure Vnet
Affinity group
Are in the same Azure Location (Datacenter)
Brief introduction to Windows Azure
Azure VM
Cloud service Azure storage
vhd
http
Which to use PaaS or IaaS ?
It’s up to you
Endpoints overview
Standalone endpoint
- Is created for one particular virtual machine.
- One particular public port can be opened once within given cloud
service. The same public port can’t be opened for another VM in
cloud service.
- One particular private port can be opened (via endpoint) once per
virtual machine. You can open the same private port for another VM
within the same cloud service.
- One Virtual Machine can have several endpoints.
- Request comes to the public port of the endpoint of cloud
service, endpoint gets it and sends to corresponding Instance (Virtual
Machine) using private port.
Cloud Service 1
private
port
27017
public
port
27017
VM nVM 1
private
port
27017
public
port
27017
private
port
27017
public
port
27018
private
port
27017
public
port
27017
private
port
27017
public
port
27017
private
port
80
public
port
80
Endpoints overview
Load balanced endpoint
- Is only one way to open the same public and private ports for all
virtual machines in cloud service.
- It is load balanced.
- Round-Robin load balancing principle is applied
Cloud Service 1
VM nVM 1
private port 27017
public port 27017
Which deployment to use for mongoDB: Replica set
Cloud Service
Secondary 1 Secondary 2Primary
private
port
27017
public
port
27017
private
port
27017
public
port
27018
private
port
27017
public
port
27019
Common DNS
name and public IP
Client
WRONG
until
Such configuration
will work
cloud service goes
down.
If it is down you will
lose whole replica set !
Which deployment to use for mongoDB: Replica set
Cloud Service 1
private
port
27017
public
port
27017
Primary
Client
private
port
27017
public
port
27017
Secondary1
Cloud Service 2
private
port
27017
public
port
27017
Secondary2
Cloud Service 3
DNS name 1 DNS name 2 DNS name 3
How about sharding ?
Client
Replica set 1
Primary
instance
Secondary
instance 1
Secondary
instance 2
Replica set 2
Primary
instance
Secondary
instance 1
Secondary
instance 2
Config
instance 3
Config
instance 2
Config
instance 1
Router (mongos)
instance
Which instance configuration is suggested for running
mongoDB
VM
Instance
-Has 127 GB OS disk (drive C)
-Has temporary disk (drive D)
Vhd1 (Drive E)
Vhd3 (Drive G)
Cloud service
Are running in the same Affinity Group
Vhd2 (Drive F)
- Store journal files on separate disk
located in the cloud storage (disk G):
Shut down mongod process and run
following script in cmd:
mkdir G:journal
cd /d E:datadb
rmdir journal
mklink /d journal G:journal
- Do not store data on the OS disk
- Do not use temporary drive at all
- Store data on separate disk located in
the cloud storage (disk E):
Set dbpath E:datadb setting in config
file or as option when start mongod
- Store mongoDB logs on separate disk
located in the cloud storage (disk F) :
Set logpath F:mongodblogmongo.log
setting in config file in config file or as an
option when start mongod
Instances of which sizes to use for running mongoDB
Size
CPU
cores
Memory
Bandwidth
Disk sizes –
virtual machine
Max. data disks
(1 TB each)
Max. IOPS
(500 per disk)
ExtraSmall Shared 768 MB 5 Mbps OS = 127 GB
Temporary = 20
GB
1 1x500
Small 1 1.75 GB 100 Mbps OS = 127 GB
Temp = 70 GB
2 2x500
Medium 2 3.5 GB 200 Mbps OS = 127 GB
Temp = 135 GB
4 4x500
Large 4 7 GB 400 Mbps OS = 127 GB
Temporary = 285
GB
8 8x500
ExtraLarge 8 14 GB 800 Mbps OS = 127 GB
Temporary = 605
GB
16 16x500
Not
recommended
for mongoDB
Drawbacks and workarounds : Disks performance
vhd
blob file
500 IOPS !!!
Storage account
10 GBs
bandwidth
Azure VM
Bandwidth depends on size of VM
mounted over network
- Deploy as big Azure instance as you can to get better
bandwidth
- Place one virtual disk per storage account
- Place your storage accounts and virtual machine in the same affinity group
- Enable caching for virtual disks.
In our case:
enable Read/Write caching for disks which store data and logs
but do not enable caching for disk with journal files
Caching
- None
- Read
- Read/Write
- Fairy tale of space preallocation problem
Drawbacks and workarounds : Disks capacity
There is a capacity limit for each
virtual disk: it can be max. 1 TB
Workaround or solution?
Sharding only !
Drawbacks and workarounds : Instances rebooting
Microsoft takes care of us:
- once in 2-3 weeks patches our instances with latest security updates
- Installs OS updates for us
- And reboots our instances as a result !
- Without any wornings or notifications!
Solution?
- If you are running IaaS, just disable automatic Windows Updates.
- If you are running PaaS, you can do nothing about this!
Maybe configuring an availability set for virtual machines can solve this.
Anyway you need to handle this in code or mongoDB settings
Drawbacks and workarounds : Not persistent public IP
Public IP 1
Global DNS name:
[nameOfCloudService].cloudapp.net
Microsoft doesn’t guarantee
that your public IP will never
change
While cloud service is
deployed, it has unique DNS
name
If all VMs within cloud service
are down, Public IP is lost, but
DNS name is still assigned to
that cloud service
When you start the VM, it will
get new public IP, but DNS
name is the same
Public IP 2
Solution :
Never use IP addresses in any settings, config files and connection strings.
Use DNS names instead
Drawbacks and workarounds : connection timeout for .Net driver
MongoDB
Client
Uses .Net driver
socket timeout exception
Windows Azure terminates an
inactive connection after
roughly 4 minutes of idling
MongoDB suggests:
Set the max idle connection time on the driver:
MongoDefaults.MaxConnectionIdleTime = TimeSpan.FromMinutes(1);
My experience:
Add following options to connection string:
maxIdleTimeMS=60000;connectTimeoutMS=60000;socketTimeoutMS=60000
Sample of connection string:
connectionString="mongodb://localhost/mydb ?maxIdleTimeMS=60000;connectTimeoutMS=60000;socketTimeoutMS=60000"
Useful tools:
- Windows Azure SDK
- Worker roles in Windows Azure mongoDB solution
- Windows Azure Powershell cmdlets
- RDP connection to Instances
-Cerebrata Tools for windows azure
- MongoDB management service (MMS)

More Related Content

What's hot

How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...
How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...
How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...
Adeline Wong
 
High Availabiltity & Replica Sets with mongoDB
High Availabiltity & Replica Sets with mongoDBHigh Availabiltity & Replica Sets with mongoDB
High Availabiltity & Replica Sets with mongoDB
Gareth Davies
 
MySQL 5.7 milestone
MySQL 5.7 milestoneMySQL 5.7 milestone
MySQL 5.7 milestone
Louis liu
 
Introduction to ClustrixDB
Introduction to ClustrixDBIntroduction to ClustrixDB
Introduction to ClustrixDB
I Goo Lee
 
MS Cloud Day - Building web applications with Azure storage
MS Cloud Day - Building web applications with Azure storageMS Cloud Day - Building web applications with Azure storage
MS Cloud Day - Building web applications with Azure storage
Spiffy
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
Tom Croucher
 
How (not) to kill your MySQL infrastructure
How (not) to kill your MySQL infrastructureHow (not) to kill your MySQL infrastructure
How (not) to kill your MySQL infrastructure
Miklos Szel
 
Squid Proxy Server
Squid Proxy ServerSquid Proxy Server
Squid Proxy Server
13bcs0012
 
MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016
Dave Stokes
 
Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...
Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...
Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...
Magento Meetup Wrocław
 
CloudStack Day Japan 2015 - Hypervisor Selection in CloudStack 4.5
CloudStack Day Japan 2015 - Hypervisor Selection in CloudStack 4.5CloudStack Day Japan 2015 - Hypervisor Selection in CloudStack 4.5
CloudStack Day Japan 2015 - Hypervisor Selection in CloudStack 4.5
Tim Mackey
 
WindowsAzureIAAS
WindowsAzureIAASWindowsAzureIAAS
WindowsAzureIAAS
Saravanan G
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual Machines
Neil Mackenzie
 
Rapid Prototyping with AWS IoT and Mongoose OS on ESP32 Platform
Rapid Prototyping with AWS IoT and Mongoose OS on ESP32 PlatformRapid Prototyping with AWS IoT and Mongoose OS on ESP32 Platform
Rapid Prototyping with AWS IoT and Mongoose OS on ESP32 Platform
Amazon Web Services
 
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
ronwarshawsky
 
IaaS: Windows Azure Virtual Machines
IaaS: Windows Azure Virtual MachinesIaaS: Windows Azure Virtual Machines
IaaS: Windows Azure Virtual Machines
Pavel Revenkov
 
Keeping your files safe in the post-Snowden era with SXFS
Keeping your files safe in the post-Snowden era with SXFSKeeping your files safe in the post-Snowden era with SXFS
Keeping your files safe in the post-Snowden era with SXFS
Robert Wojciechowski
 
Squid Server
Squid ServerSquid Server
Squid Server
Sumant Garg
 
MongoDB World 2016: From the Polls to the Trolls: Seeing What the World Think...
MongoDB World 2016: From the Polls to the Trolls: Seeing What the World Think...MongoDB World 2016: From the Polls to the Trolls: Seeing What the World Think...
MongoDB World 2016: From the Polls to the Trolls: Seeing What the World Think...
MongoDB
 
Dev cloud
Dev cloudDev cloud
Dev cloud
Rajesh Battala
 

What's hot (20)

How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...
How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...
How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...
 
High Availabiltity & Replica Sets with mongoDB
High Availabiltity & Replica Sets with mongoDBHigh Availabiltity & Replica Sets with mongoDB
High Availabiltity & Replica Sets with mongoDB
 
MySQL 5.7 milestone
MySQL 5.7 milestoneMySQL 5.7 milestone
MySQL 5.7 milestone
 
Introduction to ClustrixDB
Introduction to ClustrixDBIntroduction to ClustrixDB
Introduction to ClustrixDB
 
MS Cloud Day - Building web applications with Azure storage
MS Cloud Day - Building web applications with Azure storageMS Cloud Day - Building web applications with Azure storage
MS Cloud Day - Building web applications with Azure storage
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
 
How (not) to kill your MySQL infrastructure
How (not) to kill your MySQL infrastructureHow (not) to kill your MySQL infrastructure
How (not) to kill your MySQL infrastructure
 
Squid Proxy Server
Squid Proxy ServerSquid Proxy Server
Squid Proxy Server
 
MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016
 
Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...
Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...
Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...
 
CloudStack Day Japan 2015 - Hypervisor Selection in CloudStack 4.5
CloudStack Day Japan 2015 - Hypervisor Selection in CloudStack 4.5CloudStack Day Japan 2015 - Hypervisor Selection in CloudStack 4.5
CloudStack Day Japan 2015 - Hypervisor Selection in CloudStack 4.5
 
WindowsAzureIAAS
WindowsAzureIAASWindowsAzureIAAS
WindowsAzureIAAS
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual Machines
 
Rapid Prototyping with AWS IoT and Mongoose OS on ESP32 Platform
Rapid Prototyping with AWS IoT and Mongoose OS on ESP32 PlatformRapid Prototyping with AWS IoT and Mongoose OS on ESP32 Platform
Rapid Prototyping with AWS IoT and Mongoose OS on ESP32 Platform
 
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
 
IaaS: Windows Azure Virtual Machines
IaaS: Windows Azure Virtual MachinesIaaS: Windows Azure Virtual Machines
IaaS: Windows Azure Virtual Machines
 
Keeping your files safe in the post-Snowden era with SXFS
Keeping your files safe in the post-Snowden era with SXFSKeeping your files safe in the post-Snowden era with SXFS
Keeping your files safe in the post-Snowden era with SXFS
 
Squid Server
Squid ServerSquid Server
Squid Server
 
MongoDB World 2016: From the Polls to the Trolls: Seeing What the World Think...
MongoDB World 2016: From the Polls to the Trolls: Seeing What the World Think...MongoDB World 2016: From the Polls to the Trolls: Seeing What the World Think...
MongoDB World 2016: From the Polls to the Trolls: Seeing What the World Think...
 
Dev cloud
Dev cloudDev cloud
Dev cloud
 

Similar to MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303

Azure DNS Private Resolver - Azure Example Scenarios _ Microsoft Learn.pdf
Azure DNS Private Resolver - Azure Example Scenarios _ Microsoft Learn.pdfAzure DNS Private Resolver - Azure Example Scenarios _ Microsoft Learn.pdf
Azure DNS Private Resolver - Azure Example Scenarios _ Microsoft Learn.pdf
Kenneth Nnadikwe
 
The three aaS's of MongoDB in Windows Azure
The three aaS's of MongoDB in Windows AzureThe three aaS's of MongoDB in Windows Azure
The three aaS's of MongoDB in Windows Azure
MongoDB
 
70-410 Practice Test
70-410 Practice Test70-410 Practice Test
70-410 Practice Test
wrailebo
 
WindowsAzureSDK1.7
WindowsAzureSDK1.7WindowsAzureSDK1.7
WindowsAzureSDK1.7
Saravanan G
 
Implement SQL Server on an Azure VM
Implement SQL Server on an Azure VMImplement SQL Server on an Azure VM
Implement SQL Server on an Azure VM
James Serra
 
Windows 2003 Server
Windows 2003 ServerWindows 2003 Server
Windows 2003 Server
Teja Bheemanapally
 
Windows Server "10": что нового в кластеризации
Windows Server "10": что нового в кластеризацииWindows Server "10": что нового в кластеризации
Windows Server "10": что нового в кластеризации
Виталий Стародубцев
 
Make WordPress Fly With Virtual Server Hosting - WordCamp Sydney 2014
Make WordPress Fly With Virtual Server Hosting  - WordCamp Sydney 2014Make WordPress Fly With Virtual Server Hosting  - WordCamp Sydney 2014
Make WordPress Fly With Virtual Server Hosting - WordCamp Sydney 2014
Vlad Lasky
 
Practical Tips for Novell Cluster Services
Practical Tips for Novell Cluster ServicesPractical Tips for Novell Cluster Services
Practical Tips for Novell Cluster Services
Novell
 
Java one 2015 - v1
Java one   2015 - v1Java one   2015 - v1
Java one 2015 - v1
Michael Dawson
 
MongoDB on Windows Azure
MongoDB on Windows AzureMongoDB on Windows Azure
MongoDB on Windows Azure
MongoDB
 
Architecting cloud
Architecting cloudArchitecting cloud
Architecting cloud
Tahsin Hasan
 
MongoDB on Windows Azure
MongoDB on Windows AzureMongoDB on Windows Azure
MongoDB on Windows Azure
MongoDB
 
Best Practices for Deploying Hadoop (BigInsights) in the Cloud
Best Practices for Deploying Hadoop (BigInsights) in the CloudBest Practices for Deploying Hadoop (BigInsights) in the Cloud
Best Practices for Deploying Hadoop (BigInsights) in the Cloud
Leons Petražickis
 
Setting up mongodb sharded cluster in 30 minutes
Setting up mongodb sharded cluster in 30 minutesSetting up mongodb sharded cluster in 30 minutes
Setting up mongodb sharded cluster in 30 minutes
Sudheer Kondla
 
Hyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and TricksHyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and Tricks
Amit Gatenyo
 
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 20161049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
panagenda
 
UK WVD User Group January - Jim Moyle - BC/DR with WVD
UK WVD User Group January - Jim Moyle - BC/DR with WVDUK WVD User Group January - Jim Moyle - BC/DR with WVD
UK WVD User Group January - Jim Moyle - BC/DR with WVD
Neil McLoughlin
 
MySQL on AWS RDS
MySQL on AWS RDSMySQL on AWS RDS
MySQL on AWS RDS
Mydbops
 
Justin Corbin Portfolio Labs
Justin Corbin Portfolio LabsJustin Corbin Portfolio Labs
Justin Corbin Portfolio Labs
Justin Corbin
 

Similar to MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303 (20)

Azure DNS Private Resolver - Azure Example Scenarios _ Microsoft Learn.pdf
Azure DNS Private Resolver - Azure Example Scenarios _ Microsoft Learn.pdfAzure DNS Private Resolver - Azure Example Scenarios _ Microsoft Learn.pdf
Azure DNS Private Resolver - Azure Example Scenarios _ Microsoft Learn.pdf
 
The three aaS's of MongoDB in Windows Azure
The three aaS's of MongoDB in Windows AzureThe three aaS's of MongoDB in Windows Azure
The three aaS's of MongoDB in Windows Azure
 
70-410 Practice Test
70-410 Practice Test70-410 Practice Test
70-410 Practice Test
 
WindowsAzureSDK1.7
WindowsAzureSDK1.7WindowsAzureSDK1.7
WindowsAzureSDK1.7
 
Implement SQL Server on an Azure VM
Implement SQL Server on an Azure VMImplement SQL Server on an Azure VM
Implement SQL Server on an Azure VM
 
Windows 2003 Server
Windows 2003 ServerWindows 2003 Server
Windows 2003 Server
 
Windows Server "10": что нового в кластеризации
Windows Server "10": что нового в кластеризацииWindows Server "10": что нового в кластеризации
Windows Server "10": что нового в кластеризации
 
Make WordPress Fly With Virtual Server Hosting - WordCamp Sydney 2014
Make WordPress Fly With Virtual Server Hosting  - WordCamp Sydney 2014Make WordPress Fly With Virtual Server Hosting  - WordCamp Sydney 2014
Make WordPress Fly With Virtual Server Hosting - WordCamp Sydney 2014
 
Practical Tips for Novell Cluster Services
Practical Tips for Novell Cluster ServicesPractical Tips for Novell Cluster Services
Practical Tips for Novell Cluster Services
 
Java one 2015 - v1
Java one   2015 - v1Java one   2015 - v1
Java one 2015 - v1
 
MongoDB on Windows Azure
MongoDB on Windows AzureMongoDB on Windows Azure
MongoDB on Windows Azure
 
Architecting cloud
Architecting cloudArchitecting cloud
Architecting cloud
 
MongoDB on Windows Azure
MongoDB on Windows AzureMongoDB on Windows Azure
MongoDB on Windows Azure
 
Best Practices for Deploying Hadoop (BigInsights) in the Cloud
Best Practices for Deploying Hadoop (BigInsights) in the CloudBest Practices for Deploying Hadoop (BigInsights) in the Cloud
Best Practices for Deploying Hadoop (BigInsights) in the Cloud
 
Setting up mongodb sharded cluster in 30 minutes
Setting up mongodb sharded cluster in 30 minutesSetting up mongodb sharded cluster in 30 minutes
Setting up mongodb sharded cluster in 30 minutes
 
Hyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and TricksHyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and Tricks
 
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 20161049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
 
UK WVD User Group January - Jim Moyle - BC/DR with WVD
UK WVD User Group January - Jim Moyle - BC/DR with WVDUK WVD User Group January - Jim Moyle - BC/DR with WVD
UK WVD User Group January - Jim Moyle - BC/DR with WVD
 
MySQL on AWS RDS
MySQL on AWS RDSMySQL on AWS RDS
MySQL on AWS RDS
 
Justin Corbin Portfolio Labs
Justin Corbin Portfolio LabsJustin Corbin Portfolio Labs
Justin Corbin Portfolio Labs
 

Recently uploaded

BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
ImMuslim
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
JomonJoseph58
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
Celine George
 

Recently uploaded (20)

BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
 

MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303

  • 1. MongoDB in Windows Azure Evgeniy Maliy, QA engineer
  • 2. Cloud Service Brief introduction to Windows Azure Cloud Service Azure VM Azure VMAzure VM private port public port private port public port 1 private port public port 2 private port public port 3 Common DNS name and public IP publicport private port Standalone endpoints Load balanced endpoints Round-robin load balancer Azure Vnet Affinity group
  • 3. Are in the same Azure Location (Datacenter) Brief introduction to Windows Azure Azure VM Cloud service Azure storage vhd http
  • 4. Which to use PaaS or IaaS ? It’s up to you
  • 5. Endpoints overview Standalone endpoint - Is created for one particular virtual machine. - One particular public port can be opened once within given cloud service. The same public port can’t be opened for another VM in cloud service. - One particular private port can be opened (via endpoint) once per virtual machine. You can open the same private port for another VM within the same cloud service. - One Virtual Machine can have several endpoints. - Request comes to the public port of the endpoint of cloud service, endpoint gets it and sends to corresponding Instance (Virtual Machine) using private port. Cloud Service 1 private port 27017 public port 27017 VM nVM 1 private port 27017 public port 27017 private port 27017 public port 27018 private port 27017 public port 27017 private port 27017 public port 27017 private port 80 public port 80
  • 6. Endpoints overview Load balanced endpoint - Is only one way to open the same public and private ports for all virtual machines in cloud service. - It is load balanced. - Round-Robin load balancing principle is applied Cloud Service 1 VM nVM 1 private port 27017 public port 27017
  • 7. Which deployment to use for mongoDB: Replica set Cloud Service Secondary 1 Secondary 2Primary private port 27017 public port 27017 private port 27017 public port 27018 private port 27017 public port 27019 Common DNS name and public IP Client WRONG until Such configuration will work cloud service goes down. If it is down you will lose whole replica set !
  • 8. Which deployment to use for mongoDB: Replica set Cloud Service 1 private port 27017 public port 27017 Primary Client private port 27017 public port 27017 Secondary1 Cloud Service 2 private port 27017 public port 27017 Secondary2 Cloud Service 3 DNS name 1 DNS name 2 DNS name 3
  • 9. How about sharding ? Client Replica set 1 Primary instance Secondary instance 1 Secondary instance 2 Replica set 2 Primary instance Secondary instance 1 Secondary instance 2 Config instance 3 Config instance 2 Config instance 1 Router (mongos) instance
  • 10. Which instance configuration is suggested for running mongoDB VM Instance -Has 127 GB OS disk (drive C) -Has temporary disk (drive D) Vhd1 (Drive E) Vhd3 (Drive G) Cloud service Are running in the same Affinity Group Vhd2 (Drive F) - Store journal files on separate disk located in the cloud storage (disk G): Shut down mongod process and run following script in cmd: mkdir G:journal cd /d E:datadb rmdir journal mklink /d journal G:journal - Do not store data on the OS disk - Do not use temporary drive at all - Store data on separate disk located in the cloud storage (disk E): Set dbpath E:datadb setting in config file or as option when start mongod - Store mongoDB logs on separate disk located in the cloud storage (disk F) : Set logpath F:mongodblogmongo.log setting in config file in config file or as an option when start mongod
  • 11. Instances of which sizes to use for running mongoDB Size CPU cores Memory Bandwidth Disk sizes – virtual machine Max. data disks (1 TB each) Max. IOPS (500 per disk) ExtraSmall Shared 768 MB 5 Mbps OS = 127 GB Temporary = 20 GB 1 1x500 Small 1 1.75 GB 100 Mbps OS = 127 GB Temp = 70 GB 2 2x500 Medium 2 3.5 GB 200 Mbps OS = 127 GB Temp = 135 GB 4 4x500 Large 4 7 GB 400 Mbps OS = 127 GB Temporary = 285 GB 8 8x500 ExtraLarge 8 14 GB 800 Mbps OS = 127 GB Temporary = 605 GB 16 16x500 Not recommended for mongoDB
  • 12. Drawbacks and workarounds : Disks performance vhd blob file 500 IOPS !!! Storage account 10 GBs bandwidth Azure VM Bandwidth depends on size of VM mounted over network - Deploy as big Azure instance as you can to get better bandwidth - Place one virtual disk per storage account - Place your storage accounts and virtual machine in the same affinity group - Enable caching for virtual disks. In our case: enable Read/Write caching for disks which store data and logs but do not enable caching for disk with journal files Caching - None - Read - Read/Write - Fairy tale of space preallocation problem
  • 13. Drawbacks and workarounds : Disks capacity There is a capacity limit for each virtual disk: it can be max. 1 TB Workaround or solution? Sharding only !
  • 14. Drawbacks and workarounds : Instances rebooting Microsoft takes care of us: - once in 2-3 weeks patches our instances with latest security updates - Installs OS updates for us - And reboots our instances as a result ! - Without any wornings or notifications! Solution? - If you are running IaaS, just disable automatic Windows Updates. - If you are running PaaS, you can do nothing about this! Maybe configuring an availability set for virtual machines can solve this. Anyway you need to handle this in code or mongoDB settings
  • 15. Drawbacks and workarounds : Not persistent public IP Public IP 1 Global DNS name: [nameOfCloudService].cloudapp.net Microsoft doesn’t guarantee that your public IP will never change While cloud service is deployed, it has unique DNS name If all VMs within cloud service are down, Public IP is lost, but DNS name is still assigned to that cloud service When you start the VM, it will get new public IP, but DNS name is the same Public IP 2 Solution : Never use IP addresses in any settings, config files and connection strings. Use DNS names instead
  • 16. Drawbacks and workarounds : connection timeout for .Net driver MongoDB Client Uses .Net driver socket timeout exception Windows Azure terminates an inactive connection after roughly 4 minutes of idling MongoDB suggests: Set the max idle connection time on the driver: MongoDefaults.MaxConnectionIdleTime = TimeSpan.FromMinutes(1); My experience: Add following options to connection string: maxIdleTimeMS=60000;connectTimeoutMS=60000;socketTimeoutMS=60000 Sample of connection string: connectionString="mongodb://localhost/mydb ?maxIdleTimeMS=60000;connectTimeoutMS=60000;socketTimeoutMS=60000"
  • 17. Useful tools: - Windows Azure SDK - Worker roles in Windows Azure mongoDB solution - Windows Azure Powershell cmdlets - RDP connection to Instances -Cerebrata Tools for windows azure - MongoDB management service (MMS)