Managed MongoDB

Operating and using Managed MongoDB on the ayedo SDP: handover, credentials, replica set, failover, backup boundaries, and operational checklist.

Managed MongoDB

This page describes the production usage of Managed MongoDB on the ayedo Software Delivery Platform (SDP) — from secure credential handover and replica-set failover behavior to the clear boundaries for backups and restores.

Binding details on backup frequencies, retention periods, and recovery types are defined in the Service Annex to the Terms and Conditions. For an overview of all database options on the SDP (including PostgreSQL with CloudNativePG), see Databases on the SDP.

Handover and Credentials

After your Managed MongoDB instance is provisioned, you typically receive:

  1. Connection String / Hosts: The addresses of the replica-set members or the internal cluster service DNS.
  2. Initial Credentials: Admin or application user credentials via an agreed secure channel (such as a Kubernetes Secret or password manager — never via plain-text email).
  3. TLS Parameters: Required CA certificates and connection options (tls=true) as specified in the handover documentation.

Recommended First Steps for Your Team:

  • Create dedicated application users per application following the principle of least privilege (scoped strictly to database and collection roles).
  • Rotate initial passwords immediately after handover.
  • Manage connection strings and credentials via OpenBao and the External Secrets Operator or Kubernetes Secrets — never in plain text in Git repositories.

Replica Set and Failover

Managed MongoDB is operated by default as a highly available Replica Set (primary and secondaries):

  • Read and Write Access: Write operations always go to the primary; reads can optionally be distributed to secondaries using your application's Read Preference.
  • Automatic Failover: If the primary fails or restarts during maintenance, the replica set automatically elects a new primary.
  • Brief Election Phase: A brief write interruption during primary election is technically expected.

Therefore, always configure your MongoDB drivers with the full replica-set URI, Retryable Writes enabled (retryWrites=true), and sensible connection timeouts. Perform manual administrative actions such as rs.stepDown() or removing replica-set members only after coordinating with support.

Backup Scope and Boundaries

Responsibilities between platform operations and the application team are clearly delineated for Managed MongoDB:

Scope Responsibility
Full-Server / Instance Backup (platform standard) Platform Operations (Managed Backup) — frequency and retention per the Service Annex to the Terms and Conditions
Single Database / Collection / Partial Restore Customer (e.g., dedicated CronJob running mongodump/mongorestore to S3), unless individually agreed otherwise
Application-Level Restore Validation Customer validates restored data after notification within the contractual timeframe

Monitoring and Alerting

Continuously monitor connection errors, replica lag, storage utilization, and slow queries in Grafana (Access & Observability), and configure custom threshold notifications as needed (User Alerts).

Operational Checklist

  • [ ] Connection string, DNS resolution, and TLS connectivity verified from within the cluster
  • [ ] Dedicated application users with least-privilege roles configured instead of shared admin credentials in production workloads
  • [ ] MongoDB driver configured with replica-set URI, retryWrites=true, and realistic timeouts
  • [ ] Need for partial backups (individual DBs / collections) clarified and implemented as application-level backups if required
  • [ ] Monitoring and alerts for connection errors, replica lag, and volume utilization configured in Grafana

Further Documentation