In many organizations, crucial enterprise data is locked in dozens or hundreds of silos that may be controlled by different teams and stuck in systems that no longer serve business needs.

This type of data infrastructure complexity is a blocker for innovation and insights, and ultimately hampers the business’s ability to move forward. For example, imagine building a new mobile app for your customers that enables them to view their account data in a single view. Designing the app could require months to navigate the internal processes necessary to gain access to the legacy systems, then even more time to figure out how to integrate them. Additionally, the integration must ensure that all access to personal data is secure — especially if external partners or third parties may be building, using, or extending the app. 

In this blog post, we’ll review how MongoDB and Apigee can provide a great joint solution to this problem. 

Introduction to MongoDB

MongoDB is a versatile application data platform that powers a wide variety of workloads with a common query interface. MongoDB’s document model is simple for developers to learn and use, while still providing all the capabilities needed to meet the most complex requirements at any scale. Its unified query API is the most natural way to work with data in any form, supporting everything from simple CRUD operations to sophisticated data processing pipelines. With MongoDB, development teams no longer need to learn multiple ways of querying or working with data to address different operational database requirements.

MongoDB Atlas (fully-managed MongoDB as a service) extends MongoDB’s flexibility and ease of use with full-text search and real-time analytics, as well as event-driven and mobile experiences. You can build a wide range of application services while keeping your data architecture simple.

A trusted foundation is at the core of everything MongoDB offers. You can start with built-in data security and recovery defaults, then add the controls you need and run applications anywhere in the world with the global and multi-cloud reach of Atlas.

Introduction to Apigee

Apigee is a platform for developing and managing APIs. By fronting services with a proxy layer, Apigee provides an abstraction or facade for your backend service APIs and provides security, rate limiting, quotas, analytics, and more. With Apigee, you can design, secure, analyze, and scale APIs anywhere with visibility and control. Apigee helps you to:

  • Build and scale API programs with full API lifecycle capabilities
  • Drive consumption of APIs with flexible developer portal options
  • Gain actionable insights across the entire API value chain
  • Monetize API products and maximize the business value of your digital assets

Why MongoDB and Apigee ?

On the forefront of modern APIs, Apigee and MongoDB’s collaboration is a natural fit both in terms of technology compatibility and optimized business positioning.

Our customers need the right database to access agility and flexibility, as well as scale seamlessly and run in a hybrid mode. At the same time, the ability to consume data effectively is equally important. Developers require an API platform that provides a simple development experience, and performs analytics related to API usage and open business opportunities with API monetization. This is where MongoDB Atlas and Apigee present a perfect solution.

Build fast and scale
MongoDB’s dynamic schema is ideal for handling the requirements of modern applications and continuous delivery. When rolling out a new feature that changes the data model, there’s no requirement to update all the existing records, something that can take weeks with a relational database. Moreover, as the data size increases, you may need to horizontally scale with sharding. 

In the same spirit, Apigee offers a pure API management layer that scales with incoming traffic. Version control and zero-downtime architecture are key for a top-of-the-market API consumer experience with Apigee. Undesired traffic spikes or Distributed Denial of Service (DDOS) attacks can be managed easily within the Google Cloud platform due to Google’s machine learning capabilities. 

With Apigee and MongoDB, developers can quickly iterate and model data and APIs against an ever-changing environment, resulting in faster time to market and greater agility.

Deployment flexibility
Both Apigee and MongoDB provide flexibility in the way you can deploy, automate, and run the platforms. For example, MongoDB and Apigee can be deployed in a distributed microservices architecture. Both services are available as fully managed options in the cloud, but can also be deployed on-premises or in hybrid environments as needed. 

Regardless of the deployment model you select, built-in redundancy, automation by design, enterprise-scale monitoring, and analytics tools are a common part of every offering.

MongoDB Atlas offers advanced security controls for all your data, with authentication/authorization, encryption, auditing, network access controls, and more built into the platform. Enable enterprise-grade features to integrate with your existing security protocols and compliance standards. For example, Google Cloud Private Service Connect allows you to create private and secure connections from your Google Cloud networks to MongoDB Atlas, while integration with Google Cloud Key Management Services makes it easy to encrypt data with your own keys. 

As the main facade to access your data, Apigee is the best way to secure your entry point. Apigee X is integrated with Google Cloud Armor and reCAPTCHA to complete the best-in-class architecture. Authentication and authorization flows such as OAuth, OIDC, Content-based security, and private networking allow for a fully-secured delivery of incoming requests to MongoDB data.

Finally, APIs handle the complexities of both authentication and authorization requirements — and do so by honoring the data at rest security requirements that MongoDB solves for. Apigee solves this as a secure facade for the data layers, taking auditability into account. With MongoDB Atlas, your data is protected with preconfigured security features for encryption at rest and in motion, granular RBAC controls for data, and a marriage between MongoDB’s security paradigms and Apigee’s authorization controls.

Manage microservices
Just as organizations need services management for microservices, they need API management for their APIs. Apigee API management platform complements Istio and Envoy by extending API management natively into the microservices stack. Because microservices architecture is distributed by nature, there are more potential failure points. Therefore, microservices must be designed for redundancy. With its flexible schema and capabilities for redundancy, automation, and scalability, MongoDB is well suited for powering a microservices architecture. 

To make building applications with MongoDB seamless for developers, MongoDB provides native drivers for popular programming languages and frameworks. Supported drivers include Java, Node.js, C#/.NET, Go, Python, Ruby, PHP, Swift, Rust, and more. This allows developers to interact with the database in a way that is idiomatic for their chosen programming language, and eliminates the need for cumbersome and fragile ORM or ODM layers.

Developers looking for HTTPS-based access also have the option of using the Atlas Data API – a fully managed, REST-like API for accessing Atlas data. The Data API makes querying Atlas without any operational overhead or network management easy. 

Data, even refined data, isn’t particularly useful to anyone until that data is accessible. Wrapping the data in APIs or exposing machine learning systems with Apigee provides a vehicle to make the data accessible and to control that access over time. 

Data alone is useful internally to those with direct and low-level access. Otherwise, data is a passive resource. By publishing data through an API interface, we take this passive resource and make it an active one. Furthermore, this data becomes a marketable and monetizable asset when published through Apigee. Controls on data size, filtering, and raw vs. digested data all become their own discrete dials in terms of product pricing and availability. 

How it Works

Consider the solution architecture in Figure 1, which shows how siloed data locked in legacy systems can be seamlessly moved to Atlas on Google Cloud and exposed to new channels, such as web and mobile, using Apigee.

Solution architecture that illustrates modernizing to MongoDB Atlas using Apigee platform.jpg
Figure 1: Solution architecture that illustrates modernizing to MongoDB Atlas using Apigee platform

We can migrate the data from legacy systems to Atlas using Dataproc and have data syncing in real time using Google Cloud Dataflow pipelines. MongoDB Atlas acts as an operational data store (ODS), which exposes the data securely through the Apigee platform. 

Now consider the architecture in Figure 2 to learn how we can build and deploy the application layer on Google Cloud. 

Apigee API platform to monetize data.jpg
Figure 2: Solution architecture of MongoDB Atlas on Google Cloud enabling the Apigee API platform to monetize data

Based on the application requirements, we may need individual Atlas clusters for each of the microservices, or there can be a cluster that serves multiple microservices in common. MongoDB can elastically scale and adjust deployment size based on changes in data size and throughput over time. We can deploy the applications on VMs using Google Compute Engine, which is the traditional model. We can also deploy services within containers using Google Kubernetes Engine (GKE) or Cloud Functions, which are serverless. Finally, Apigee API platform is used to surface the APIs to consumers. 

Here, we can see the flexibility of using Google Cloud’s modern apps platforms, such as GKE or Cloud Functions, interfaced with both MongoDB and Apigee in a reference architecture to serve the final customer experience. 


Using MongoDB and Apigee together is a great way to accelerate your transformation journey, get more value out of enterprise data, and unlock innovative use cases.

With the best-of-breed technologies in terms of modern API management (Apigee) and modern datastores (MongoDB), you can meet new business needs for sharing your data securely both internally to your development teams, and externally to your partners and customers. 

Next Steps

For more information about Apigee and MongoDB, visit: