Build it like you MEAN it with MongoDB Atlas on GCP
[Editor’s note: Today, we hear from the folks at MongoDB, who give their take on how to build high-performance web and mobile apps with fully managed cloud and database services.]
As a developer, you’re likely familiar with the LAMP stack—Linux, Apache, MySQL and PHP—, open-source components for building dynamic websites and web applications. In recent years, LAMP has given way to MEAN and MERN—development stacks used to build web and mobile applications.
The MEAN stack is comprised of the following open-source components:
- MongoDB, a NoSQL database
- Express.js, a web application framework that runs on Node.js
- Node.js, an execution environment for event-driven, server-side, and networking applications
The benefits of MongoDB Atlas—Managed Cloud Database
MongoDB is a document-oriented NoSQL database known for its scalability, rich queries, and auto-sharding. MongoDB Atlas delivers all the same functionality but as a fully managed cloud database. MongoDB Atlas features built-in operational and security capabilities that automate time-consuming administration tasks such as infrastructure provisioning, database setup, ensuring availability, global distribution, backups, and more. With Atlas, sharding a cluster or building out a three-node replica set is as easy as clicking a button. The UI and API are easy to use, so developers can spend more time building applications and less time managing the database.
We offer a free tier of MongoDB Atlas on Google Cloud Platform (GCP), which provides 512 MB of storage, enough space for developers to play with the database and build a prototype without ever entering a credit card number.
Here at MongoDB, we’re big fans of GCP, which lets organizations reduce infrastructure costs while improving application reliability and scalability. Each selectable region in MongoDB Atlas contains at least three zones for availability with the ability to offer backup and disaster recovery on a global scale to prevent service disruptions. This enables us to provide higher availability, lower latency, and improved security.
Deploying a MEAN or MERN app to GCP
There are a couple ways you can deploy your MEAN or MERN web application on GCP. You could, for example, use the Google Compute Engine and install everything from scratch. But our favorite method for deploying a MEAN or MERN application to Google Cloud Platform is to leverage containers and Google Kubernetes Engine (GKE). Doing so can be done in just three steps:
Deploy a container using Cloud Build.
Register the container in the GCP environment using Container Registry.
Finally, add these images to GKE to provide a highly available application environment.