#1 Data Analytics Program in India
₹2,499₹1,499Enroll Now
4 min read
Question 23 of 27easy

What is MongoDB Atlas?

MongoDB cloud database service.

What You'll Learn

  • What Atlas is
  • Key features
  • Getting started

What is MongoDB Atlas?

MongoDB Atlas is a fully managed cloud database service that handles deployment, scaling, and maintenance.

Key Features

  • Multi-cloud: AWS, GCP, Azure
  • Auto-scaling: Adjusts resources automatically
  • Backups: Continuous with point-in-time recovery
  • Security: Encryption, VPC peering, IP whitelisting
  • Monitoring: Built-in performance insights

Getting Started

code.jsJavaScript
// 1. Create cluster on atlas.mongodb.com
// 2. Get connection string
// 3. Connect

const mongoose = require('mongoose');

mongoose.connect(
  'mongodb+srv://user:password@cluster.mongodb.net/mydb?retryWrites=true&w=majority'
);

Tiers

TierUse Case
M0 (Free)Learning, small projects
M2/M5Development
M10+Production
ServerlessVariable workloads

Atlas Search

code.jsJavaScript
// Full-text search with Atlas Search
db.movies.aggregate([
  {
    $search: {
      index: "default",
      text: {
        query: "adventure",
        path: "title"
      }
    }
  }
]);

Data API

code.jsJavaScript
// REST API access to your data
fetch('https://data.mongodb-api.com/app/data-xxx/endpoint/data/v1/action/findOne', {
  method: 'POST',
  headers: {
    'api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    dataSource: 'Cluster0',
    database: 'mydb',
    collection: 'users',
    filter: { email: 'john@example.com' }
  })
});