Software Engineering & Digital Products for Global Enterprises since 2006
CMMi Level 3SOC 2ISO 27001
Menu
View all services
Staff Augmentation
Embed senior engineers in your team within weeks.
Dedicated Teams
A ring-fenced squad with PM, leads, and engineers.
Build-Operate-Transfer
We hire, run, and transfer the team to you.
Contract-to-Hire
Try the talent. Convert when you're ready.
ForceHQ
Skill testing, interviews and ranking — powered by AI.
RoboRingo
Build, deploy and monitor voice agents without code.
MailGovern
Policy, retention and compliance for enterprise email.
Vishing
Test and train staff against AI-driven voice attacks.
CyberForceHQ
Continuous, adaptive security training for every team.
IDS Load Balancer
Built for Multi Instance InDesign Server, to distribute jobs.
AutoVAPT.ai
AI agent for continuous, automated vulnerability and penetration testing.
Salesforce + InDesign Connector
Bridge Salesforce data into InDesign to design print catalogues at scale.
View all solutions
Banking, Financial Services & Insurance
Cloud, digital and legacy modernisation across financial entities.
Healthcare
Clinical platforms, patient engagement, and connected medical devices.
Pharma & Life Sciences
Trial systems, regulatory data, and field-force enablement.
Professional Services & Education
Workflow automation, learning platforms, and consulting tooling.
Media & Entertainment
AI video processing, OTT platforms, and content workflows.
Technology & SaaS
Product engineering, integrations, and scale for tech companies.
Retail & eCommerce
Shopify, print catalogues, web-to-print, and order automation.
View all industries
Blog
Engineering notes, opinions, and field reports.
Case Studies
How clients shipped — outcomes, stack, lessons.
White Papers
Deep-dives on AI, talent models, and platforms.
Portfolio
Selected work across industries.
View all resources
About Us
Who we are, our story, and what drives us.
Co-Innovation
How we partner to build new products together.
Careers
Open roles and what it's like to work here.
News
Press, announcements, and industry updates.
Leadership
The people steering MetaDesign.
Locations
Gurugram, Brisbane, Detroit and beyond.
Contact Us
Talk to sales, hiring, or partnerships.
Request TalentStart a Project
Emerging Technologies

Migrating from Atlas Data API and Custom HTTPS Endpoints (Previously Realm) – What Are Your Options

SS
Sukriti Srivastava
Technical Content Lead
January 15, 2025
16 min read
Migrating from Atlas Data API and Custom HTTPS Endpoints (Previously Realm) – What Are Your Options — Emerging Technologies |

Introduction: Understanding the Deprecation

MongoDB's decision to deprecate the Atlas Data API and Custom HTTPS Endpoints (formerly MongoDB Realm) impacts thousands of applications that relied on HTTP-based access to Atlas clusters. These services provided convenient REST endpoints for serverless architectures, mobile applications, and microservices that needed direct database access without managing dedicated server infrastructure.

The deprecation reflects the cloud-native ecosystem's evolution toward purpose-built serverless functions, managed API gateways, and GraphQL layers that offer better security, performance, and scalability than generic HTTP-to-database proxies. Teams must now migrate to modern alternatives — but the migration path depends on application architecture, performance requirements, and team expertise. This guide provides a structured migration framework covering all viable alternatives.

Impact Assessment: What Breaks and What Needs Migration

Before choosing a migration path, audit every dependency on the deprecated services:

  • Atlas Data API Consumers: Identify all applications making HTTP requests to Atlas Data API endpoints — serverless functions, mobile apps, IoT devices, third-party integrations, and internal tools. Document request patterns, authentication methods, and data volumes.
  • Custom HTTPS Endpoints: Map all custom server-side logic deployed as Realm/Atlas HTTPS endpoints — these combined business logic with data access, requiring both API and compute migration.
  • Authentication Dependencies: Atlas Data API used API keys and JWT-based authentication — replacement services need equivalent or stronger auth mechanisms. Document which clients use which auth methods.
  • Trigger and Scheduled Functions: Atlas App Services triggers (database triggers, scheduled triggers, authentication triggers) that co-existed with HTTPS endpoints need separate migration paths to Atlas Functions or cloud-native alternatives.
  • Data Access Patterns: Analyse query patterns — simple CRUD operations migrate easily, but complex aggregation pipelines, change streams, and transactions require careful translation to new service layers.

Option 1: MongoDB Atlas Functions (Recommended Path)

Atlas Functions provide the closest migration path — serverless JavaScript/TypeScript functions running within the Atlas ecosystem:

  • Direct Atlas Integration: Functions access MongoDB collections through the built-in context.services API — no connection string management, connection pooling, or driver configuration. Queries execute within Atlas's network with minimal latency.
  • HTTP Endpoint Replacement: Expose functions as HTTPS endpoints with configurable authentication (API key, JWT, anonymous) — direct 1:1 replacement for deprecated Custom HTTPS Endpoints with the same URL pattern capabilities.
  • Event-Driven Triggers: Database triggers fire functions on insert/update/delete operations — replace change stream-based logic with declarative trigger configuration. Scheduled triggers replace cron-based Atlas Data API polling patterns.
  • Migration Steps: (1) Extract business logic from existing HTTPS endpoints, (2) create Atlas Functions with equivalent logic, (3) configure HTTPS endpoint routing, (4) update client applications to new endpoint URLs, (5) validate with parallel testing before cutover.
  • Limitations: 300-second execution timeout, 350MB memory limit, and limited runtime environment (Node.js subset). Complex applications with heavy compute, large file processing, or custom npm dependencies may need alternative solutions.

Option 2: AWS Lambda + API Gateway with MongoDB Driver

For applications needing full serverless flexibility, AWS Lambda provides the most capable alternative:

  • Architecture: API Gateway handles HTTP routing, authentication, and rate limiting — Lambda functions execute business logic and connect to MongoDB Atlas using the official Node.js/Python driver. Use VPC peering or PrivateLink for secure Atlas connectivity.
  • Connection Management: MongoDB connections must persist across Lambda invocations — initialise the MongoClient outside the handler function and reuse connections. Set maxPoolSize: 1 for Lambda to prevent connection exhaustion.
  • Cold Start Mitigation: Use provisioned concurrency for latency-sensitive endpoints, ARM64 (Graviton) for 20% cost reduction, and Lambda layers for shared dependencies (MongoDB driver, utility libraries).
  • API Gateway Integration: Configure REST API or HTTP API (lower cost) with Lambda proxy integration — API Gateway handles authentication (Cognito, API keys, custom authorisers), CORS, throttling, and request validation.
  • Cost Model: Pay-per-request pricing (Lambda: $0.20/million invocations + compute time, API Gateway: $1.00-3.50/million requests) — typically 40-60% cheaper than always-on server infrastructure for variable traffic patterns.

Option 3: GraphQL Layers — Hasura, Apollo, and Atlas GraphQL

For applications that consumed Atlas Data API for flexible data queries, GraphQL provides a superior replacement:

  • Hasura: Instant GraphQL API over MongoDB with real-time subscriptions — auto-generates queries, mutations, and subscriptions from collection schemas. Supports role-based access control (RBAC), webhook authentication, and remote schemas for composing multiple data sources.
  • Apollo GraphQL: Build custom GraphQL servers with Apollo Server — define schemas, resolvers, and data sources. Apollo Federation enables microservices composition. Apollo Client handles caching, pagination, and optimistic updates on the frontend.
  • MongoDB Atlas GraphQL: Atlas provides native GraphQL endpoint generation — define schemas in Atlas App Services, configure access rules per collection, and expose a managed GraphQL endpoint. Simpler than Hasura but less feature-rich.
  • Migration Benefits: GraphQL eliminates over-fetching and under-fetching problems inherent in REST/Data API — clients request exactly the fields they need, reducing bandwidth and improving mobile performance.
  • Schema Stitching: Combine MongoDB data with other sources (PostgreSQL, REST APIs, microservices) in a single GraphQL gateway — provide unified data access without client-side data orchestration.

Transform Your Publishing Workflow

Our experts can help you build scalable, API-driven publishing systems tailored to your business.

Book a free consultation

Data Layer Refactoring: Direct Driver Migration

For applications that can manage server-side infrastructure, migrating to direct MongoDB driver access provides maximum control:

  • Node.js/Express Backend: Replace Data API HTTP calls with MongoDB Node.js driver queries — MongoClient.connect() with connection pooling, retry logic, and read/write concern configuration. Express.js or Fastify provides the HTTP layer.
  • Mongoose ODM: For applications needing schema validation and middleware — Mongoose provides schema definitions, pre/post hooks, virtuals, and population for MongoDB. Ideal for structured applications that previously relied on Data API's implicit schema handling.
  • Connection Pooling: Configure optimal pool sizes based on workload — maxPoolSize: 10 for typical web servers, minPoolSize: 5 to avoid cold connection latency. Monitor pool metrics with MongoDB driver events.
  • Replica Set Awareness: Configure read preferences (secondaryPreferred for read-heavy workloads), write concerns (w: "majority" for durability), and retry writes for automatic failover handling.
  • Containerised Deployment: Deploy Node.js backend in Docker containers on AWS ECS, Azure Container Apps, or Google Cloud Run — auto-scaling, health checks, and managed SSL without server administration.

Testing and Validation Strategy

Migration validation requires comprehensive testing at every layer:

  • API Compatibility Testing: Record all existing Data API request/response pairs — replay against the new implementation and validate response bodies, status codes, headers, and latency. Use tools like Postman collections or k6 for automated API testing.
  • Data Consistency Verification: Run parallel queries against both old and new implementations during the transition period — compare results programmatically to catch query translation errors, especially in aggregation pipelines and projection fields.
  • Load Testing: Simulate production traffic patterns against the new backend — validate that connection pooling, cold starts (Lambda), and auto-scaling handle peak loads. Use k6 or Artillery with realistic concurrency levels.
  • Authentication Testing: Verify all authentication flows work with the new service — API key validation, JWT token verification, OAuth flows, and anonymous access. Test token expiration, refresh, and revocation scenarios.
  • Rollback Procedure: Maintain the ability to route traffic back to Atlas Data API during the migration window — use DNS-based routing, API gateway traffic splitting, or feature flags to control cutover percentage.

Production Cutover and MDS Migration Services

Successful production migration requires phased execution with safety nets:

  • Canary Deployment: Route 5-10% of traffic to the new implementation — monitor error rates, latency p99, and data consistency before increasing traffic percentage. Use API gateway weighted routing or feature flags for traffic control.
  • Blue-Green Switchover: Run both old and new implementations simultaneously — cut over DNS/routing when canary validation passes. Maintain the old implementation for 2-4 weeks as a rollback path.
  • Client SDK Updates: Update mobile and frontend SDKs to point to new endpoints — use configuration-based endpoint URLs (environment variables, remote config) rather than hardcoded URLs to enable future migrations.
  • Monitoring Dashboard: Create unified monitoring for the new stack — track request rates, error rates, latency distributions, MongoDB connection pool utilisation, and Lambda/function cold start frequency. Set alerts for degradation.
  • Documentation and Runbooks: Document the new architecture, deployment procedures, troubleshooting guides, and incident response procedures — ensure the operations team is trained before deprecation deadline.

MDS provides end-to-end Atlas migration services — from impact assessment and architecture design through implementation, testing, and production cutover, ensuring zero-downtime transition from deprecated Atlas Data API to modern, scalable alternatives.

FAQ

Frequently Asked Questions

Common questions about this topic, answered by our engineering team.

MongoDB is deprecating these services because the cloud-native ecosystem now offers purpose-built alternatives (serverless functions, managed API gateways, GraphQL layers) that provide better security, performance, and scalability than generic HTTP-to-database proxies. Atlas Functions, AWS Lambda, and GraphQL services handle authentication, rate limiting, and complex business logic more robustly.

The recommended path is MongoDB Atlas Functions for direct Atlas integration with minimal migration effort. For full flexibility, use AWS Lambda + API Gateway with the MongoDB driver. For flexible data querying, adopt GraphQL via Hasura or Apollo. For maximum control, migrate to direct driver access with Node.js/Express and containerised deployment.

Initialise MongoClient outside the Lambda handler function to reuse connections across invocations. Set maxPoolSize to 1 to prevent connection exhaustion. Use VPC peering or PrivateLink for secure Atlas connectivity. Enable provisioned concurrency for latency-sensitive endpoints to avoid cold start connection delays.

Record all existing Data API request/response pairs and replay against the new implementation to validate compatibility. Run parallel queries during the transition to catch query translation errors. Load test with production traffic patterns to validate connection pooling and auto-scaling. Test all authentication flows and maintain rollback capability throughout.

Use canary deployment — route 5-10% of traffic to the new implementation, monitor error rates and latency, then gradually increase. Maintain blue-green capability for instant rollback. Use configuration-based endpoint URLs in client SDKs for future flexibility. Keep the old implementation running for 2-4 weeks as a safety net.

Discussion

Join the Conversation

Ready when you are

Let's build something great together.

A 30-minute call with a principal engineer. We'll listen, sketch, and tell you whether we're the right partner — even if the answer is no.

Talk to a strategist
Need help with your project? Let's talk.
Book a call