Load Balanced Architecture with Advanced Request Routing
Neal K. Davis
I've helped over 1 million cloud enthusiasts build hands-on skills and elevate their careers ?? Founder of Digital Cloud Training | AWS Community Builder | Cloud Solutions Architect | Udemy Instructor Partner
One of the main challenges when learning Cloud Computing is to build hands-on experience. When learning only the theory, one may end up struggling when it comes to implementing cloud solutions in the real world. That’s why here at Digital Cloud Training we have a strong focus on hands on lessons throughout the video courses we provide for AWS Certifications.?
Recently, we decided to take this to another level, by introducing AWS Bootcamps. We currently offer two bootcamps which are aligned with two certifications (AWS Certified Cloud Practitioner and AWS Certified Solutions Architect Associate). With these bootcamps, you not only develop the fundamental cloud skills you need to pass the AWS exam, but also learn how to build real-life, scalable and highly complex applications with a broad range of AWS Services.?Let’s explore how you could benefit from?joining an AWS Bootcamp.
Advantages of joining a Bootcamp
Sense of community
When participating in an?AWS Bootcamp?with Digital Cloud Training, you get to be surrounded by like minded individuals – all aspiring to get into the cloud or level up their cloud career. You will be able to network, share tips and build a group of people who you can help inspire – and be inspired by.
Career tips
Career preparedness sessions play an important part in our bootcamps. You get tailored advice on?how to kick-start your cloud career in AWS. Learn from industry experts who can give advice on how to get your CV to the top of the pile and how to network effectively on LinkedIn. These hacks will put you in a better position to find employment in the Cloud.?
Step-by-step guidance
With a structured training plan, there is no guess work in what steps to take on your way to success. A blend of self-paced video courses, virtual lab exercises paired with multiple live interactive sessions every week will help you develop experience and gain confidence. This is a perfect opportunity for those who are unsure of how to start your cloud journey.
One-on-one assistance
Bootcamp members enjoy one-on-one sessions with cloud experts whom they can ask anything from how to find a job, technical questions, etc. They get direct support and advice from people who currently work in the AWS cloud.
A realistic path to employment
The perpetual?dilemma of landing a job?which requires experience – whilst you have no experience – can be difficult to get past. Our hands-on bootcamp will give you the skills and knowledge needed to build scalable and realistic solutions on the cloud, using our live labs and real-world projects.
So without further ado, here is a taster of a lab lesson which our students built in a live communal environment in one of our most recent AWS Solutions Architect Associate Bootcamps.
Load Balanced Architecture with Advanced Request Routing
This lab guide from our??AWS Solutions Architect Associate Bootcamp, creates a simple website, hosted on EC2, behind an Application Load Balancer. Host-based and path-based routing rules will then be configured to route based on information in the host header or URL path.
Host-based routing allows you to route to multiple domains on a single load balancer by routing to a different set of EC2 instances or containers based on information in the host header.
Path-based routing is also referred to as URL-based routing. The Application load Balancer will forward the requests to the specific targets based on the rules configured on the load balancer.
Requirements (Prerequisites)
Resources
Download the “code-advanced-request-routing.zip” file using this link here:
Exercise Overview
Exercise 1 –?Create the Red and Blue EC2 instances
Exercise 2?– Enable Path-based Routing
Exercise 3?– Enable Host-based Routing
Exercise 4?– Clean up your resources
Exercise 1 –?Create the Red and Blue EC2 instances
Task 1 – Create the S3 Bucket and Upload the code
The first step is to upload the code we will use to create the websites into an S3 bucket.?
Task 2 – Create your Security Group
The second step is to pre-emptively create the Security Group for your EC2 instances.?
Task 3 – Create the Red EC2 instance.?
We will now launch the ‘Red’ EC2 instance and check to see if it has successfully retrieved the code from S3.?
Exercise 2 – Enable Path-based Routing
With path-based routing we will enter a path to our URL and the load balancer will route the request to the appropriate target group based on the rules we create. The architecture looks like this:
Task 1 – Create your target groups
The first step is to set up the target groups; you need at least 2 target groups to configure path-based routing.
领英推荐
For Red: /red/index.html
For Blue: /blue/index.html
5. Register the correct instance i.e., Red and be sure to click ‘include as pending below’.
Task 2 – Create your Application Load Balancer
The next step is to create the Application Load Balancer.?
Exercise 3 – Enable Host-based Routing
With host-based routing we will enter a subdomain to the domain name and the load balancer will route the request to the appropriate target group based on the rules we create. The architecture looks like this:
Task 1 – Edit host-based forwarding rules
The first step is to set up the forwarding rules. You need at least 2 target groups to configure host-based routing.
The rules should look like this:
Task 2 – Configure Records in Route 53
In this task we need to create the relevant subdomain DNS records in Amazon Route 53 and configure the load balancer as the target.
subdomain: blue or red
Record type: Select A type here.
Value/Route traffic to:
Select ‘Alias to Application and Classic Load Balancer’
Select region N.Virginia
Select the target load balancer we made earlier. It should look like this.
3. Finally hit ‘Define simple record’.
4. Make sure you repeat the above steps to ensure you have one DNS record for each of the blue and red subdomains.
5. The DNS records will look like this:
6. To check if everything is working as expected, open a web browser, and paste the DNS name of the load balancer and append it with either Red or Blue, like this:
red.mydomainname.com/red
blue.mydomainname.com/blue
You should see the webpages load and be populated with content. Bear in mind that the custom web pages exist under the /blue and /red paths, so you’ll need to add those to see that the correct pages are loading.
Exercise 4 – Clean up your resources
Task 1 – Delete your resources
You can now delete the resources you created:
Become an AWS expert with our value-packed training
AWS Training?– Our popular AWS training will maximize your chances of passing your AWS certification the first time.
Membership?– For unlimited access to our entire cloud training catalog, enroll in our monthly or annual membership program.
Challenge Labs?– Build hands-on cloud skills in a secure sandbox environment. Learn, build, test and fail forward without risking unexpected cloud bills.
This article originally appeared on: https://digitalcloud.training/load-balanced-architecture-with-advanced-request-routing/
AWS Solutions Architect|Cloud Engineer ??|Network Support Engineer|1xAWS|1xCISCO|2xEricsson
2 年Hi Neal, We are not able to download the code from the provided link in this article as it is asking for permissions?
MultiCloud Architect @ KTA Mobile Communications, Inc. | Cloud Solutions Architect, DevSecOps & IAM Security
2 年As always, great tips, Neal. Thanks for sharing.