Use a City Planning Analogy to Visualize and Create your Cloud Architecture
AWS Architecture BlogUse a City Planning Analogy to Visualize and Create your Cloud Architectureby Marwan Al Shawi | on06 DEC 2021| inAmazon EC2,Amazon RDS,Amazon VPC,Architecture,AWS Transit Gateway,AWS WAF|Permalink|ShareIf you are new to creating cloud architectures, you might find it a daunting undertaking. However, there is an approach that can help you define a cloud architecture pattern by using a similar construct. In this blog post, I will show you how to envision your cloud architecture using this structured and simplified approach.Such an approach helps you to envision the architecture as a whole. You can then create reusable architecture patterns that can be used for scenarios with similar requirements. It also will help you define the more detailed technological requirements and interdependencies of the different architecture components.First, I will briefly define what is meant by an architecture pattern and an architecture component.Architecture pattern and componentsAnarchitecture patterncan be defined as a mechanism used to structure multiple functional components of a software or a technology solution to address predefined requirements. It can be characterized by use case and requirements, and should be tested and reusable whenever possible.Architecture patterns can be composed of three main elements: the architecture components, the specific functions or capabilities of each component, and the connectivity among those components.Acomponentin the context of a technology solution architecture is a building block.Modular architectureis composed of a collection of these building blocks.To think modularly, you must look at the overall technology solution. What is its intended function as a complete system? Then, break it down into smaller parts or components. Think about how each component communicates with others. Identify and define each block or component and its specific roles and function. Consider the technical operational responsibilities each is expected to deliver.Cloud architecture patterns and the city planning analogyLet’s assume a content marketing company wants to provide marketing analytics to its partners. It proposes a SaaS solution, by offering an analytics dashboard onAmazon Web Services (AWS). This company may offer the same solution in other locations in the future.How would you create a reusable architecture pattern for such a solution? To simplify the concept of a component and the architecture pattern, let’s use city planning as a frame of reference.Subarchitectures or componentsA city can be imagined as consisting of three organizing contexts or components:Overall City Architecture (the big picture)District ArchitectureBuilding ArchitectureLet’s define each of these components or subarchitectures, and see how they correlate to an enterprise cloud architecture.I. City Architectureconsists of the city structures and the integrations of services required by the population, see Figure 1.Figure 1. Oversimplified city layoutThe overall anticipated capacity within a certain period must be calculatedfor roads, sewage, water, electricity grids, and overall city layout. Typically, this structure should be built from the intended purpose or vision of the city. This can be the type of services it will offer, and the function of each district.Think of City Architecture as the overall cloud architecture for your enterprise. Include the anticipated capacity, the layout (single Region, multi-Region), type, and number ofAmazon Virtual Private Cloud (VPC)s. Decide how you will connect and integrate all these different architecture components.The initial workflow that can be used to define the high-level architecture pattern layout of the SaaS solution example is analogous to the overall city architecture. We can define its three primary elements: architecture components, specific functions of each component, and the connectivity among those components.Production environment.The front and backend of your application. It provides the marketing data analytics dashboard.Testing and development environment.A replica of, but isolated from the Production app. Users’ traffic doesn’t pass through security inspection layer.Security layer.Provides perimeter security inspection. Users’ traffic passes through security inspection layer.Translating this workflow into an AWS architecture, Figure 2 shows the analogous structure.Single AWS Region (to be offered in a specific geographical area)Amazon VPC to host theproductionapplicationAmazon VPC to host thetest/devapplicationSeparate VPC (or a layer within a VPC) to provide security services for perimetersecurity inspectionCustomer’sconnectivity(for example, over public internet, or VPN)AWS Transit Gateway(TGW) to connect and isolate the different components (VPCs and VPN)Figure 2. Architecture pattern (high-level layout)Domain-driven designAt this stage, you may also consider adomain-driven design(DDD). This is an approach to software development that centers on a domain model. With your DDD, you can break the solution into different bounded contexts. You can translate the business functions/capabilities into logical domains, and then define how they communicate.Let’s use the same SaaS example and further analyze the requirements of the solution with the DDD approach in mind. The SaaS solution is offered based on two types of industries: regulated with specific security compliance, and non-regulated. By translating this into logical domains, we can optimize the design to offer a more modular architecture. This will minimize the blast radius of the solution, as illustrated in Figure 3. WatchHow AWS Minimizes the Blast Radius of Failures.Figure 3. DDD-based architecture pattern (high-level layout)Now let’s think of governmental boundaries within a city and among its districts. This can be analogous to AWS accounts structures and the trust boundaries among them. By applying this to the example preceding, the VPC with the security compliance requirements can be placed in a separate AWS account. ReadDesign principles for organizing your AWS accounts.II. District Architectureconsists of the structures and integrations required within a district to manage its buildings, see Figure 4.Figure 4. City structure with districtsIt illustrates how to connect/integrate back to the city-wide architecture. It should consider the overall anticipated capacity within each district.For instance, a district can be designed based on the type of function/service it provides, such as residential district, leisure district, or business district.Mapping this to cloud architecture, you can envision it as the more specific functions/services you are expecting from a certain block, component, or domain. Your architecture can be within one or multiple VPCs, as shown in Figure 5. The structure of a domain or block can vary by number of Availability Zones and VPCs, type of external access, compliance requirements, and the hosted application requirements. Each of these blocks serves a different function and requires different specifications. However, they all need to integrate back to the overall cloud and network architecture to provide a cohesive design.The architect must define and specify clearly the communication model among the architecture components. You may further break the application architecture at the module level intomicroservicesusing the DDD approach. An example is the use ofMicro-frontend Architectures on AWS.Figure 5. Architecture module structureIII. Building Architecturerefers to the buildings’ structures and standards required to deliver the specific properties/services within a district. It also must integrate back with the district architecture.To apply this to your architecture, envision the specialized functions/capabilities you are expecting from your application within a module (subcomponents). What are the requirements needed for the application tiers? In this example, let’s assume that the VPC without security compliance requirements will use a frontend web tier onAmazon EC2. Its backend database will beAmazon Relational Database Service (RDS).Each of these subcomponents must integrate with other components and modules, as well as to the public internet. For example, anAWS Application Load Balancercould handle connections requests from external users, andAWS Web Application Firewall (AWS WAF)used as the perimeter security layer.AWS Transit Gatewaycould connect to other modules (VPCs). NAT gateways could provide connectivity to the internet for the internal systems in a VPC (shown in Figure 6.)Figure 6. Architecture module and its subcomponents structureConclusionThe vision and goal of a city architecture can set the basis for districts’ architectures. In turn, the district architecture sets the basis of the building architecture within a district. Similarly, the targeted enterprise cloud architecture goal should set the key requirements of the building blocks (or functional components) of the architecture.Each architecture block sets the requirements of the subcomponents. They collectively construct a system or module of a system, as illustrated in Figure 7.Figure 7. Structure of cloud architecture requirements and interdependenciesAs a next step, assess your architecture from both a scale and reliability perspective. Designing for scale alone is not enough.Reliable scalabilityshould be always the targeted architectural attribute. ReadArchitecting for Reliable Scalability.Marwan Al ShawiMarwan is an AWS Solutions Architect who has been in the IT industry for more than 15 years. He’s been involved in architecting, designing, and implementing various large-scale IT solutions with different organizations such as Cisco Systems, BT global services, and IBM Australia. Marwan has authored three advanced networking design books as well as several AWS blogs and whitepapers. He holds a Master of Science degree in internetworking from the University of Technology, Sydney.
If you are new to creating cloud architectures, you might find it a daunting undertaking. However, there is an approach that can help you define a cloud architecture pattern by using a similar construct. In this blog post, I will show you how to envision your cloud architecture using this structured and simplified approach. Such […]
Marwan Al Shawi
Amazon EC2 Amazon RDS Amazon VPC Architecture AWS Transit Gateway AWS WAF