Skip to main content

MongoDB

Deploy fully managed MongoDB clusters with replica sets, automated backups, and horizontal scaling.

What is MongoDB?

MongoDB is a document-oriented NoSQL database that stores data in flexible, JSON-like documents. Antryk offers fully managed MongoDB with replica sets for high availability.

Key Features

  • MongoDB 6.0 & 7.0: Latest stable versions
  • Replica Sets: Automatic failover and high availability
  • Automated Backups: Daily backups with snapshot restores
  • Horizontal Scaling: Shard clusters for large datasets
  • MongoDB Atlas API: Compatible with MongoDB Atlas
  • Monitoring: Real-time performance metrics
  • Indexes: Automatic index management

Use Cases

  • Content management systems
  • User profiles and catalogs
  • Real-time analytics
  • IoT data storage
  • Mobile applications
  • Product catalogs

Getting Started

  1. Create a MongoDB cluster from your dashboard
  2. Choose cluster tier (single node or replica set)
  3. Configure authentication and users
  4. Get connection string and credentials
  5. Connect your application

Connection Examples

Node.js

const { MongoClient } = require('mongodb');

const client = new MongoClient(process.env.MONGODB_URL);
await client.connect();

const db = client.db('mydb');
const collection = db.collection('users');

Python

from pymongo import MongoClient

client = MongoClient(os.environ['MONGODB_URL'])
db = client['mydb']
collection = db['users']

Cluster Types

  • Single Node: Development and testing
  • Replica Set: Production with 3 nodes
  • Sharded Cluster: Large-scale deployments

Scaling

  • Vertical Scaling: Increase memory and storage
  • Horizontal Scaling: Add shards and replica set members
  • Auto-scaling: Automatic storage scaling
  • Read Preferences: Distribute reads across replicas

Replica Sets

  • Primary: Handles all writes
  • Secondaries: Read replicas for scalability
  • Automatic Failover: Promote secondary to primary
  • Data Redundancy: Multiple copies of data

Security

  • Authentication: Username/password required
  • TLS Encryption: Encrypted connections
  • Network Isolation: Private network connectivity
  • IP Whitelisting: Restrict access by IP

Backups

  • Daily Backups: Automatic snapshots
  • Point-in-Time Restore: Restore to specific time
  • Backup Retention: 7-day retention (extendable)
  • Export: Export to JSON or BSON

Monitoring

Monitor your MongoDB cluster with:
  • Operational Metrics: Ops/second, queries/second
  • Replication Lag: Lag between primary and secondaries
  • Storage: Database size and document count
  • Performance: Slow query identification

Create MongoDB Cluster

Get started with MongoDB