Self-Hosting MongoDB on Google Compute Engine
Description
There are tradeoffs involved in deciding whether or not to self-host a database or to leverage a database as a service offering. How much control do you need over the database? Do you have the bandwidth and expertise to deal with self-hosting? These are just a few of the questions to consider. This lab assumes you've made the decision to self-host MongoDB and deploy the database on Google Compute Engine (GCE).
This lab walks you through the process of getting MongoDB up and running on an instance and deploying a MongoDB replica set. Considerations for production workloads are discussed at each phase. The lab also discusses how to leverage Compute Engine's snapshot functionality as part of a sound disaster recovery plan.
Learning Objectives
Upon completion of this intermediate-level lab, you will be able to:
- Understand the benefits of multiple zone database deployments
- Install MongoDB on Linux machines
- Configure and deploy a MongoDB replica set
- Understand available options for backing up MongoDB data
- Create Google Compute Engine persistent disk snapshots
Intended Audience
- Cloud Engineers
- Database Administrators
- Anyone interested in self-hosting databases, particularly MongoDB
Prerequisites
Familiarity with the following will be beneficial but is not required:
- Working with Linux at the command line
- MongoDB fundamentals
The following content can help to fulfill the prerequisite:
Updates
June 5th, 2024 - Updated lab to use MongoDB 7.0
May 27th, 2022 - Added instructions to improve clarity