Course info

Rating

(150)

Level

Intermediate

Updated

Jun 2, 2015

Duration

7h 20m

Description

Learn how to effectively administer MongoDB in production. This course takes you through the basics and then dives deep into all aspects of managing MongoDB. It covers basics such as installation and configuration. Basic data backup and recovery, importing, and exporting data will be explored. It shows you how to create and manage replica sets - Mongo's mechanism for availability and durability. It will teach you how Mongo scales out using sharding. The course also dives into indexing and performance tuning and what tools and techniques you can use to make your production deployment run smoothly and predictably. We will cover issues of security, hardware selection, and other miscellaneous subjects you may run into during operation. If you are considering - or already are - running MongoDB in production, then this course is for you!

More from the author

Section Introduction Transcripts

InstallationTo use Mongo, we have to install it first. In this part, we're going to dig into installing Mongo on a fresh system. I'll show you how and where to get Mongo. We'll run over some key installation options and considerations when installing Mongo as a daemon on Linux or a Windows service. We'll dive into key configuration options and discuss their effect on your Mongo server.

ConfigurationWe installed, stopped and started Mongo with very minimal configuration. In this module, we'll dig and look more at configuration options. There are many, many settings that can be changed. In this course, we'll only highlight some of the interesting ones. You already saw that you can start Mongo with command line options or a configuration file. Command line options are great for running the server for a short time, but otherwise we use configuration files usually. A few setup command line options such as the Windows server installation ones, makes sense to run on the command line. The rest of them are best kept inside a configuration file. When you install Mongo to run on a server in production, maintaining the options is much easier when they are all listed in a file. This makes the daemon or service command line very simple, only --config, which tells Mongo where the configuration file is. We'll be editing the configuration file, mongod. conf. Mongo supports YAML format in configuration. It is indentation based and is very easy to read. Older key value pair syntax for config is still supported as of Mongo 3, but I like the readability of YAML

Query Crash CourseThis is a course about Mongo DB and Administration. So the main focus throughout the course would be about the database engine and its administration. For those of you not familiar with Mongo, or who need a refresher, I wanna give you a bit of a feel for what Mongo is, and how you use it as a database. Seeing how to put documents in Mongo and how they are queried, will help you understand how the application uses Mongo. And train your fingers to type queries and using the shell. Basic shell skills come with the territory when you want to support Mongo. You will need some proficiency in using Mongo shell in order to support Mongo well. So, let's go. In this part of the course, we'll do everything from the shell. We already have a running server on the standard port of this machine. Let's connect to it using the shell. Mongo. Okay, we're in.

Data In, Data OutApplications often use the database in an operation-oriented manner. They read a few things, write a few things. On the backend, as administrators, we often see things in a more batch-oriented way: dump a bunch of documents; update a whole collection; import bulk data; export large sets of data. We do this for various purposes: integrate with other data hubs, backup, recovery or archiving. In this part, we will focus on moving data in and out of Mongo.

ShardingReplica sets give you a measure of durability. They work to guarantee that data is not lost but when you need massive scale, sharding is what you're looking for. Sharding is Mongo's answer to scalability. It is a way of distributing both work and data so that more work over more data can be performed. Big data, big, big data. In this part of the course we will cover sharding. We will go over what sharding is exactly, how it works and how to set it up.

MonitoringI bet my friend once that I can ride my bicycle blindfolded, it didn't end up well. Oh, I thought I was smart, I made sure the path was clear, I counted the number of pedal turns it took to complete the path, I held the handlebar straight and made sure not to lean. I crashed into the bushes. Running a database without monitoring is kind of like that. Preparing and planning your environment and setting things up for success is great, but live feedback letting you see obstacles before impact is an absolute must. MongoDB ships with some great tools that let you see what's happening with a database at various levels. In this part of the course we will learn how to use these tools and discover a few things to keep an eye on and watch for.

SecurityHaving your data survive reboots, network problems, and machine failure is part of keeping your data safe. But how do you keep your data protected? How do you keep data away from thieves? How do you ensure only people you choose have access to it? Security is what this is about. And in this part of the course, we'll talk about protecting your MongoDB installation. Mongo Version 3 has come a long way in its security model. The community version of Mongo, by now, supports key concerns such as: basic authentication, robust authorization, SSL support, certificate authentication and intra-member authentication in a cluster. Other security features such as Kerberos and LDAP authentication are only offered currently in the commercial paid Mongo. In the future, more offerings in the area of security are sure to come. Things such as encryption at rest, more integration options, et cetera. These may be part of storage engines, third party distributions, and of course more from MongoDB in later version. But let's focus on the here and now. Data security is a huge topic and it's out of scope for this course. This course by no means as a full comprehensive prescription for all aspects of securing data. We will talk about authentication, authorization, and basic security topics that will help you get going. We will focus on basic mechanisms to help you restrict and protect access to your data in the MongoDB community edition.

MiscellaneousEmbracing a new database can raise all kinds of questions. Until now, we focus on getting the system running. We cover some unique ways Mongo scales up and out. We've gone through basic performance monitoring, tuning and indexing techniques. In this part of the course, we'll address some frequent concerns and topics that weren't covered in previous modules.