Self-Hosting MongoDB on Google Compute Engine
Lab Steps
Ready for the real environment experience?
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
May 27th, 2022 - Added instructions to improve clarity
Logan has been involved in software development and research since 2007 and has been in the cloud since 2012. He is an AWS Certified DevOps Engineer - Professional, AWS Certified Solutions Architect - Professional, Microsoft Certified Azure Solutions Architect Expert, MCSE: Cloud Platform and Infrastructure, Google Cloud Certified Associate Cloud Engineer, Certified Kubernetes Security Specialist (CKS), Certified Kubernetes Administrator (CKA), Certified Kubernetes Application Developer (CKAD), and Certified OpenStack Administrator (COA). He earned his Ph.D. studying design automation and enjoys all things tech.