Lab complete!
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool
Traditionally most workloads are designed to withstand infrastructure failure by deploying workload components across multiple Availability Zones/Regions, implementing self-healing capabilities such as AutoScaling, etc. While such techniques are effective in ensuring uptime of workload resources, they do not address issues introduced at the workload application level (i.e. a software bug). Leveraging techniques like sharding and shuffle sharding will provide additional reliability to workloads by limiting the blast radius of failures so that only a subset of users are impacted by such failures.
The following diagram shows the initial architecture you will deploy. This architecture has no sharding:
You will use AWS CloudFormation to provision the resources needed for this lab. The CloudFormation stack that you provision will create an Application Load Balancer, Target Groups, and EC2 instances in a new VPC.
If you are attending an in-person workshop and were provided with an AWS account by the instructor:
If you are using your own AWS account:
Go to the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation and click Create Stack > With new resources (standard)
For Prepare template select Template is ready
https://aws-well-architected-labs-virginia.s3.amazonaws.com/Reliability/300_Fault_Isolation_with_Shuffle_Sharding/regular.yaml
Click Next
For Stack name use Shuffle-sharding-lab
No changes are required for Parameters. Click Next
For Configure stack options click Next
On the Review page:
Note: The template creates an IAM role and Instance Profile for EC2. These are the minimum permissions necessary for the instances to be managed by AWS Systems Manager. These permissions can be reviewed in the CloudFormation template under the “Resources” section - InstanceRole.
This will take you to the CloudFormation stack status page, showing the stack creation in progress.
The stack takes about 5 mins to create all the resources. Periodically refresh the CloudFormation stack events until you see that the Stack Status is in CREATE_COMPLETE. The stack creates the following resources:
Once the stack is in CREATE_COMPLETE, visit the Outputs section for the stack and note down the Key and Value for each of the outputs. This information will be used in the lab.
Now that the application has been deployed, it is time to test it to understand how it works. The sample application used in this lab is a simple web application that returns a message with the Worker that responded to the request. Customers pass in a query string as part of the request to identify themselves. The query string used here is name.
Visit the Outputs section of the CloudFormation stack created in the previous step. You will see a list of URLs next to customer names.
Open one of the customer links in a new browser tab. Refresh the web browser a few times to see that responses are being returned from different EC2 instances on the back-end.
Open the links for a few other customers and verify that they are able to get responses from different EC2 instances. The different customers are - Alpha, Bravo, Charlie, Delta, Echo, Foxtrot, Golf, and Hotel.
Refresh the web browser multiple times to verify that all customers are able to receive responses from all EC2 instances (workers) in the back-end.
The lab uses Amazon CloudWatch Synthetics canaries to check availability of the workload for each of the customers. The results are aggregated in a CloudWatch Dashboard so you can see the availability of the workload for every customer in a single location.
Visit the Outputs section of the CloudFormation stack created as part of this lab and open the AvailabilityDashboard in a new browser window.
You will see individual graphs for each customer. The graphs represent successful requests made by the corresponding canary to the sample workload. Currently, the workload is available for all customers.
Keep the AvailabilityDashboard open as you will revisit it later in the lab.
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool