Fiveable

☁️Cloud Computing Architecture Unit 6 Review

QR code for Cloud Computing Architecture practice questions

6.1 Cloud-native application design principles

☁️Cloud Computing Architecture
Unit 6 Review

6.1 Cloud-native application design principles

Written by the Fiveable Content Team • Last updated September 2025
Written by the Fiveable Content Team • Last updated September 2025
☁️Cloud Computing Architecture
Unit & Topic Study Guides

Cloud-native application design principles are revolutionizing how we build and deploy software. These principles focus on creating scalable, resilient, and agile applications that fully leverage cloud computing platforms, enabling faster development cycles and improved performance.

Key characteristics of cloud-native apps include microservices architecture, containerization, and serverless computing. These design approaches allow for modular, loosely coupled services that can be independently deployed and scaled, maximizing the benefits of cloud infrastructure.

Benefits of cloud-native design

  • Cloud-native design principles enable applications to leverage the full potential of cloud computing platforms, providing scalability, resilience, and agility
  • By adopting cloud-native practices, organizations can accelerate development cycles, reduce infrastructure costs, and improve application performance and reliability
  • Cloud-native applications are designed to be highly modular, loosely coupled, and independently deployable, allowing for rapid iteration and adaptation to changing business requirements

Characteristics of cloud-native apps

  • Cloud-native applications are built using a microservices architecture, where the application is decomposed into smaller, independently deployable services
  • These applications are containerized, meaning each service runs in its own isolated container environment, providing consistency and portability across different cloud platforms
  • Cloud-native apps are designed to be highly scalable, resilient, and able to handle failures gracefully, leveraging the elasticity and fault-tolerance capabilities of the cloud

Microservices architecture

Loosely coupled services

  • In a microservices architecture, services are designed to be loosely coupled, meaning they can be developed, deployed, and scaled independently of each other
  • Each service has its own specific responsibilities and encapsulates its own data and business logic, allowing for a clear separation of concerns
  • Loose coupling enables teams to work on different services in parallel, improving development velocity and reducing dependencies between teams

API-based communication

  • Microservices communicate with each other through well-defined APIs, typically using lightweight protocols such as REST or gRPC
  • API-based communication allows services to interact with each other in a standardized and platform-agnostic manner, promoting interoperability and flexibility
  • APIs act as contracts between services, defining the input and output data structures and the supported operations, enabling services to evolve independently as long as the API contract is maintained

Independent deployability

  • Each microservice can be deployed independently, without affecting the functionality of other services
  • Independent deployability enables faster release cycles, as services can be updated and deployed separately, reducing the risk and impact of deployments
  • It also allows for granular scaling, where individual services can be scaled up or down based on their specific performance requirements, optimizing resource utilization

Containerization

Container orchestration platforms

  • Containerization platforms, such as Docker, provide a standardized way to package and deploy applications as containers
  • Container orchestration platforms, such as Kubernetes, automate the deployment, scaling, and management of containerized applications across a cluster of machines
  • These platforms handle tasks such as container scheduling, load balancing, service discovery, and self-healing, abstracting away the complexities of managing containers at scale

Portability across environments

  • Containers provide a consistent runtime environment for applications, encapsulating all the necessary dependencies and configurations
  • This portability allows applications to be easily moved between different environments, such as development, testing, and production, without requiring any modifications to the application code
  • Containers also enable seamless migration between different cloud providers or on-premises infrastructure, reducing vendor lock-in and providing flexibility in deployment options

Serverless computing

Function as a Service (FaaS)

  • Serverless computing, particularly Function as a Service (FaaS), allows developers to focus on writing individual functions that perform specific tasks, without worrying about the underlying infrastructure
  • With FaaS, developers can deploy and run code snippets (functions) in response to events or triggers, such as HTTP requests, database changes, or message queue events
  • The cloud provider dynamically allocates resources to execute these functions, scaling them up or down based on the incoming workload, and billing only for the actual execution time and resources consumed

Event-driven architectures

  • Serverless computing is well-suited for event-driven architectures, where application components react to and process events as they occur
  • In an event-driven architecture, services can be triggered by various event sources, such as user actions, sensor data, or changes in data stores
  • Serverless functions can be used to process these events, performing tasks such as data transformation, aggregation, or triggering downstream actions, enabling the creation of highly responsive and scalable applications

Elastic scalability

Horizontal vs vertical scaling

  • Elastic scalability refers to the ability of an application to automatically adjust its resource allocation based on the incoming workload
  • Horizontal scaling, also known as scaling out, involves adding more instances of a service to handle increased traffic or processing demands
  • Vertical scaling, or scaling up, involves increasing the resources (CPU, memory) allocated to a single instance of a service to handle higher workloads
  • Cloud-native applications typically leverage horizontal scaling, as it provides better flexibility, fault-tolerance, and cost-efficiency compared to vertical scaling

Auto-scaling strategies

  • Auto-scaling is a key feature of cloud-native applications, allowing them to dynamically adjust the number of service instances based on predefined metrics or policies
  • Reactive auto-scaling responds to changes in resource utilization or application performance, adding or removing instances to maintain the desired service level
  • Predictive auto-scaling uses machine learning algorithms to anticipate future workload patterns and proactively adjust the number of instances to meet the expected demand
  • Auto-scaling strategies can be based on various metrics, such as CPU utilization, request rate, or queue length, and can be customized to meet the specific requirements of each service

Resilience and fault tolerance

Distributed systems challenges

  • Cloud-native applications, being distributed systems, face challenges such as network latency, partial failures, and eventual consistency
  • Distributed systems need to handle scenarios where individual components or services may fail or become unavailable, without impacting the overall functionality of the application
  • Techniques such as circuit breakers, retry mechanisms, and fallbacks are used to build resilience into cloud-native applications, allowing them to gracefully handle and recover from failures

Chaos engineering principles

  • Chaos engineering is a practice of intentionally introducing controlled failures or disruptions into a system to test its resilience and identify weaknesses
  • By simulating real-world failure scenarios, such as network partitions, random instance terminations, or increased latency, chaos engineering helps validate the system's ability to withstand and recover from failures
  • Chaos engineering principles emphasize the importance of testing resilience in production environments, as it provides a more realistic representation of how the system behaves under stress
  • Tools like Netflix's Chaos Monkey or Gremlin can be used to automate chaos experiments and continuously validate the resilience of cloud-native applications

Immutable infrastructure

Infrastructure as code (IaC)

  • Immutable infrastructure is an approach where infrastructure components, such as servers or containers, are never modified after they are deployed
  • Instead of making changes to running instances, new instances with the desired modifications are created and deployed, replacing the old instances
  • Infrastructure as Code (IaC) is a practice of managing and provisioning infrastructure using declarative configuration files, treating infrastructure as software
  • IaC tools, such as Terraform or CloudFormation, allow infrastructure to be defined, versioned, and managed in a consistent and repeatable manner, enabling automation and reducing the risk of manual errors

Idempotent provisioning

  • Idempotency is a property where applying the same operation multiple times produces the same result as applying it once
  • In the context of infrastructure provisioning, idempotent provisioning ensures that the desired state of the infrastructure is achieved consistently, regardless of the initial state
  • Idempotent provisioning scripts or configurations can be run multiple times without causing unintended changes or side effects, making infrastructure updates and rollbacks safer and more predictable
  • Idempotency is a key principle in immutable infrastructure, as it allows for reliable and consistent provisioning of infrastructure components

Continuous integration/continuous deployment (CI/CD)

Automated testing and deployment

  • Continuous Integration (CI) is a practice where developers regularly merge their code changes into a central repository, triggering automated builds and tests to ensure code quality and compatibility
  • Continuous Deployment (CD) takes CI a step further by automatically deploying the successfully tested code changes to production environments
  • CI/CD pipelines automate the process of building, testing, and deploying applications, reducing the manual effort and risk associated with traditional deployment processes
  • Automated testing, including unit tests, integration tests, and end-to-end tests, is a critical component of CI/CD, ensuring that code changes do not introduce regressions or break existing functionality

GitOps methodology

  • GitOps is an operational framework that applies DevOps best practices to infrastructure and application deployment
  • In GitOps, the desired state of the infrastructure and applications is declared in version-controlled Git repositories, acting as the single source of truth
  • Changes to the desired state are made through pull requests, triggering automated pipelines that apply the changes to the target environments
  • GitOps promotes a declarative and immutable approach to infrastructure and application deployment, enabling faster and more reliable updates, as well as easier rollbacks in case of issues

Observability and monitoring

Distributed tracing

  • Observability is the ability to understand the internal state and behavior of a system based on its external outputs
  • In cloud-native applications, observability is critical for troubleshooting, performance optimization, and ensuring the overall health and reliability of the system
  • Distributed tracing is a technique used to monitor and analyze the flow of requests through a distributed system, providing end-to-end visibility into the performance and dependencies of microservices
  • Tools like Jaeger, Zipkin, or OpenTelemetry can be used to instrument applications and collect tracing data, allowing developers to identify performance bottlenecks, latency issues, and service dependencies

Real-time metrics and logging

  • Real-time metrics provide insights into the performance and resource utilization of cloud-native applications, allowing for proactive monitoring and alerting
  • Metrics can include data points such as response times, error rates, CPU and memory usage, and network throughput, collected at various levels (application, infrastructure, or platform)
  • Logging is the practice of capturing and storing log data generated by applications and infrastructure components, providing valuable information for debugging, auditing, and troubleshooting
  • Centralized logging solutions, such as ELK stack (Elasticsearch, Logstash, Kibana) or Fluentd, aggregate and analyze log data from multiple sources, enabling efficient searching, filtering, and visualization of log events

Data management in cloud-native apps

Stateless vs stateful services

  • Cloud-native applications often follow a stateless design, where services do not maintain any persistent state between requests
  • Stateless services are easier to scale and more resilient to failures, as any instance can handle a request without relying on previous state information
  • However, some services may require maintaining state, such as user sessions, shopping carts, or databases
  • Stateful services need to handle data consistency, replication, and persistence, and may require specialized storage solutions or distributed databases to ensure data integrity and availability

Polyglot persistence

  • Polyglot persistence is the practice of using multiple database technologies within a single application, each chosen based on its strengths and suitability for specific use cases
  • Cloud-native applications often leverage a combination of SQL databases (PostgreSQL, MySQL), NoSQL databases (MongoDB, Cassandra), and caching solutions (Redis) to meet different data storage and retrieval requirements
  • Polyglot persistence allows developers to choose the most appropriate database technology for each service or data type, optimizing for performance, scalability, and data consistency
  • However, managing multiple database technologies can introduce complexity in terms of data consistency, data migration, and operational overhead, requiring careful planning and implementation

Security considerations

Zero-trust security model

  • The zero-trust security model assumes that no user, device, or network should be inherently trusted, and access should be granted based on continuous verification and least privilege principles
  • In a zero-trust architecture, every request, whether originating from inside or outside the network, is authenticated, authorized, and encrypted before granting access to resources
  • Zero-trust principles are particularly relevant in cloud-native environments, where applications are distributed across multiple services and infrastructure boundaries
  • Implementing zero-trust in cloud-native applications involves techniques such as mutual TLS authentication, fine-grained access controls, and micro-segmentation of network traffic

Secrets management

  • Secrets, such as database credentials, API keys, or encryption keys, are sensitive information that needs to be securely stored and accessed by cloud-native applications
  • Storing secrets in plain text or committing them to version control repositories is a security risk, as it exposes them to unauthorized access or leakage
  • Secrets management solutions, such as HashiCorp Vault or AWS Secrets Manager, provide secure storage, encryption, and access control for secrets
  • These solutions allow applications to dynamically retrieve secrets at runtime, reducing the risk of secrets being compromised or exposed in configuration files or environment variables

Best practices for cloud-native development

12-factor app methodology

  • The 12-factor app methodology is a set of best practices for building cloud-native applications that are scalable, maintainable, and portable
  • The 12 factors include principles such as using declarative formats for setup automation, storing configuration in the environment, treating backing services as attached resources, and maintaining a strict separation between build, release, and run stages
  • Following the 12-factor methodology helps ensure that applications are designed to be cloud-friendly, with a focus on automation, scalability, and resilience
  • The 12-factor principles provide a common language and framework for developing and deploying cloud-native applications consistently across different teams and organizations

Domain-driven design (DDD)

  • Domain-driven design (DDD) is an approach to software development that focuses on modeling the business domain and aligning the software architecture with the domain concepts and relationships
  • DDD emphasizes the importance of understanding the domain, collaborating with domain experts, and creating a shared language (ubiquitous language) to bridge the gap between business and technical stakeholders
  • In the context of cloud-native applications, DDD principles can be applied to design microservices that are aligned with business capabilities and domain boundaries
  • Bounded contexts, a key concept in DDD, help define the boundaries and responsibilities of each microservice, ensuring loose coupling and high cohesion within the system
  • DDD techniques, such as event storming and context mapping, can be used to identify and model the domain events, entities, and relationships, guiding the design and implementation of cloud-native services