Every developer wants to write the best applications possible. But that’s hard to do when you’re spending valuable time managing your IT infrastructure. With cloud computing and cloud architectures, you can outsource these tasks to specialists who ensure you have secure, available, resilient compute and storage precisely at the minute you need it. With cloud computing, your infrastructure just works, and you can get back to writing great code.
This article will cover the fundamentals of Cloud Architecture and show how MongoDB Atlas, MongoDB’s Data-as-a-Service platform, harnesses cloud architectures to boost productivity, availability and reliability. We will also explain how MongoDB Realm can become a key part of such an architecture.
Table of Contents
Cloud Architecture refers to the way various components combine together to form a cloud environment. Cloud environments offer a wide variety of services and infrastructures on demand with near limitless expansion possibilities. The main elements are:
Cloud architecture is divided into two types: Frontend and Backend.
Frontend Architecture consists of:
Backend Architecture consists of:
Management & Security underpin all the above components
The way we connect all of those together is considered to be our Cloud native architecture.
Your cloud architecture may be based on just one type of cloud; more commonly, you may build an architecture that uses several of the four main cloud types working together.
We should ask ourselves the following questions when considering the design of our cloud architecture :
What are we trying to build, and how do we want to provide it to end-users? Are we building a web application, mobile app, a service or an integration component? This will determine our choice of components. For example, for a web application we will probably need to host a frontend with DNS services to route to our site address, a compute layer to provide a backend API, and a database to store data.
How do we want our application to scale and grow in the future? Growth could be quick or unpredictable, or possibly spread over many geographies; in those cases, we may need elastic infrastructure and scalable API endpoints.
Finally, we need to consider the cost and productivity of our developer teams. Developers shouldn’t be spending significant time managing infrastructure -- that’s something vendors can do more efficiently and cost-effectively.
Using MongoDB Atlas and MongoDB Realm allows you to benefit from the power of public clouds, multi-cloud, and hybrid solutions:
A MongoDB Example
Although each application and business effort is unique, there is a set of cloud architecture patterns to take into account when designing your cloud architecture.
When building an application, whether in the cloud or not, we need to consider expansion as a key aspect of our design. Atlas Scalability is one of the main reasons developers love the MongoDB platform.
Atlas allows you to scale your databases (Atlas Auto-scaling) and backend seamlessly, while our proactive monitoring tools and advisories highlight any improvements that would benefit your schema design or improve database performance.
You can spin up a multi-sharded environment with just a few clicks, and your compute power can be boosted at any time, giving you valuable peace of mind.
Modern cloud architectures take into account the fact software and hardware can fail. To accommodate such failures, we need to build fault-tolerant components that can be replaced easily or automatically fail over to healthy ones.
In a cloud environment, replacing or rebuilding components is available by design. MongoDB Clusters use replication and replica sets to ensure availability. MongDB Atlas clusters use a three-node deployment for each replica set by default.
The elasticity and flexibility of cloud components make them a very good choice for hosting multi-tenant applications. Having said that, there are known multi-tenancy hazards:
MongoDB Atlas allows for flexibility when managing multiple tenants. You can::
Users expect perfect uptime and availability, making disaster recovery and high availability crucial parts of our implementation process. It’s best to deploy applications on several regional sites to ensure availability when a single site or an entire cloud is down or unavailable.
MongoDB Atlas and MongoDB Realm allow applications and database clusters to be deployed over multiple regions with automatic failover and repair processes.
The world of cloud architecture is big and getting bigger, however, MongoDB Atlas and MongoDB Realm offer a wealth of features to build cloud-first applications:
Networking : DNS, Internet Gateways, Internal networking