Search for Well Architected Advice
< All Topics
Print

Choose how to segment your workload

Workload segmentation plays a crucial role in defining the resilience requirements of your application. By avoiding monolithic architectures and utilizing service-oriented or microservices architectures, you can create a more scalable and reliable workload that can adapt to varying demands and failures.

Best Practices

Adopt Microservices Architecture

  • Identify components of your application that can be broken into smaller, independent services.
  • Design each microservice to be stateless, allowing horizontal scaling and simplifying deployment.
  • Use well-defined APIs for microservices communication to promote loose coupling and reusability.
  • Implement service discovery mechanisms to manage and locate services dynamically.

Implement Service-Level Objectives (SLOs)

  • Define clear SLOs for each service based on user expectations and business requirements.
  • Consider factors such as availability, latency, and error rates when establishing SLOs.
  • Continuously monitor performance against SLOs with automated tools to ensure reliability and to identify areas for improvement.

Utilize Managed Services

  • Leverage AWS managed services (e.g., Amazon RDS, AWS Lambda) to reduce operational overhead and increase reliability.
  • Managed services are designed to scale and handle failures automatically, enhancing your workload’s resilience.
  • Evaluate AWS service limits and ensure your architecture can scale within those limits while maintaining performance.

Design for Failure

  • Incorporate resilience patterns such as circuit breakers, retries, and fallbacks to handle service failures gracefully.
  • Use distributed architectures to avoid single points of failure and improve overall system reliability.
  • Regularly conduct chaos engineering practices to test and enhance the resilience of your services under real-world conditions.

Questions to ask your team

  • Have you identified which components of your application can be broken into smaller services?
  • What criteria did you use to determine the boundaries of your microservices?
  • Are all components designed to be stateless, where feasible, to enhance scalability?
  • How do you manage inter-service communication and dependencies?
  • Have you considered performance implications and load handling for each segmented service?
  • What mechanisms are in place to monitor the health and performance of your microservices?
  • How do you ensure that your service dependencies are resilient and fault-tolerant?
  • Is there a strategy for versioning and deploying your services independently?
  • How do you handle data management across your segmented services?

Who should be doing this?

Architect

  • Design the overall architecture based on service-oriented and microservices principles.
  • Identify components that can be segmented into microservices for improved reliability.
  • Ensure that the architecture supports scaling and resilience requirements.

DevOps Engineer

  • Implement and manage CI/CD pipelines for quick deployment of microservices.
  • Automate infrastructure provisioning and configuration for reliable workload operation.
  • Monitor system performance and reliability metrics to ensure SLAs are met.

Software Developer

  • Develop microservices according to defined interfaces and protocols.
  • Write stateless components wherever possible to maximize reliability.
  • Collaborate with the architect to ensure alignment with architectural guidelines.

QA Engineer

  • Conduct testing for each microservice to ensure reliability and performance under load.
  • Create and execute automated test cases for continuous integration.
  • Identify potential issues in workload segmentation and provide feedback.

Product Owner

  • Define and prioritize features that support the reliability of workload segments.
  • Stakeholder communication regarding the segmentation strategy and its benefits.
  • Ensure that the business requirements align with architectural decisions.

What evidence shows this is happening in your organization?

  • Microservices Segmentation Template: A structured template to help identify and design microservices by analyzing application components and their interdependencies, facilitating a transition from monolithic to microservices architecture.
  • Reliability Segmentation Checklist: A comprehensive checklist to guide teams in assessing which components of their applications can be segmented into microservices or services, ensuring a focus on resilience and scalability.
  • Service-Oriented Architecture (SOA) Design Guide: A detailed guide explaining best practices and principles for designing service-oriented architectures, including how to integrate microservices for enhanced reliability and performance.
  • Microservices Deployment Strategy: A strategic document outlining the steps for deploying microservices in a robust manner, emphasizing statelessness, scalability, and resilience requirements.
  • Workload Segmentation Model Diagram: A visual representation of the segmentation process for application workloads, demonstrating the relationship between components and suggested microservice boundaries.

Cloud Services

AWS

  • AWS Lambda: AWS Lambda allows you to run code without provisioning or managing servers, helping to segment workloads into smaller, stateless functions that can resiliently scale.
  • Amazon ECS (Elastic Container Service): Amazon ECS provides a container management service that supports microservices architecture, allowing you to run, stop, and manage containers that can communicate via service interfaces.
  • Amazon API Gateway: Amazon API Gateway enables you to create, publish, maintain, monitor, and secure APIs at any scale, which is essential for service-oriented or microservices architectures.
  • AWS Step Functions: AWS Step Functions enable you to coordinate components of distributed applications and microservices, providing workflows to improve reliability in your application design.

Azure

  • Azure Functions: Azure Functions is a serverless compute service that enables you to run event-driven code, promoting a microservices architecture by allowing segmentation into discrete functions.
  • Azure Kubernetes Service (AKS): AKS simplifies the deployment, management, and operations of Kubernetes, facilitating the use of microservices and improving overall application scalability and reliability.
  • Azure API Management: Azure API Management allows you to create consistent and modern API gateways, crucial for managing interactions in a service-oriented or microservices architecture.
  • Azure Logic Apps: Logic Apps help automate workflows and integrate applications and services, supporting service-oriented architecture by enabling smooth communication between different components.

Google Cloud Platform

  • Google Cloud Functions: Google Cloud Functions is a lightweight, event-driven compute solution that allows you to create microservices architecture by executing code in response to events.
  • Google Kubernetes Engine (GKE): GKE allows you to deploy, manage, and scale containerized applications using Kubernetes, supporting a microservices architecture that enhances reliability.
  • Cloud Endpoints: Cloud Endpoints is an API management system that helps you create, secure, and monitor APIs, making it easier to manage services in a microservices architecture.
  • Cloud Run: Cloud Run allows you to run containerized applications in a fully managed environment, enabling service segmentation and scaling of microservices efficiently.

Question: How do you design your workload service architecture?
Pillar: Reliability (Code: REL)

Table of Contents