What is Route53?

0

 



Step 1: What is Route 53? (Classroom Explanation)

Route53 is intermediate service of AWS that connect custom domain to AWS Instance.

Domain provide path or url such as www.google.com is the domain and int point to google.com server.

We should always integrate hosting server as a nameserver property under domain name.

create free domain https://freedomain.one/Direct.sv?cmd=userDomainPanel&domainname=codemugindore.work.gd

#!/bin/bash

sudo yum update -y



# Install Apache web server (httpd)

sudo yum install -y httpd

sudo systemctl start httpd

sudo systemctl enable httpd



# Create a simple HTML file to verify the web server is running

echo "<html><h1>Welcome to Apache Web Server on Amazon Linux!</h1></html>" >
/var/www/html/index.html


  • "Imagine the internet is a giant city, and every website is a house with a unique address (IP address, like 192.0.2.1). But these addresses are hard to remember, so we give houses names—like 'www.example.com.'
    Route 53 is like a super-smart phonebook that matches these names to their addresses so your browser can find them fast."

  • "Route 53 is Amazon’s tool to manage this phonebook (DNS) and decide how people (traffic) reach your websites or apps. It can even check if a website is 'open' and redirect people if it’s 'closed.'"

Key Points:


  • DNS: Translates names to IP addresses.

  • Routing: Controls where traffic goes (e.g., one server or many).

  • Health Checks: Ensures your website is working.




Practical Article 1: Registering a Domain and Setting Up a Simple Website


Goal: Show how Route 53 connects a domain to a website.


Student Level: Beginner.


Real-World Example: "Imagine you open a lemonade stand called 'lemonadestand.com.' Route 53 helps customers find your stand by linking the name to your location (a web server)."


Steps (Simplified for Teaching):


  1. Get a Domain:
    • "In real life, you’d buy a domain like 'lemonadestand.com' from Route 53 for $12/year. For class, let’s pretend we did this."


  2. Set Up a Website:
    • "Your website is a simple page saying 'Welcome to Lemonade Stand!' hosted on an AWS S3 bucket (a storage space). Its address is something like 's3-website-us-east-1.amazonaws.com.'"
    • create Ec2 machine with this script


  3. Link Domain to Website:
    • "In Route 53, you create a 'hosted zone' for 'lemonadestand.com.' This is your phonebook page."

    • "Add an 'A record' (like a phonebook entry) pointing 'lemonadestand.com' to your S3 bucket using an Alias (a special AWS shortcut)."


  4. Test It:
    • "Type 'lemonadestand.com' in a browser, and Route 53 says, 'Go to the S3 bucket!' You see your welcome page."


Class Demo (No AWS Needed):


  • Use paper: Write "lemonadestand.com" on one card and "S3 bucket address" on another. Draw an arrow between them labeled "Route 53 A Record." Explain how a browser follows this arrow.

Key Takeaway: "Route 53’s simplest job is connecting a name to one place."



Practical Article 2: Load Balancing Traffic with Weighted Routing


Goal: Teach how Route 53 splits traffic between multiple resources.


Student Level: Intermediate.


Real-World Example: "Now your lemonade stand is so popular, you open two stands—one in New York and one in California. Route 53 can send 70% of customers to New York (bigger stand) and 30% to California (smaller stand)."


Steps:


  1. Set Up Two Websites:
    • "Pretend you have two S3 buckets: 'ny-lemonade.com' and 'ca-lemonade.com,' each with a welcome page."


  2. Create Weighted Records:
    • "In Route 53’s hosted zone for 'lemonadestand.com,' add two A records:
      • 'ny-lemonade.com' with weight 70.

      • 'ca-lemonade.com' with weight 30."


    • "Both records use the same name, 'lemonadestand.com,' but Route 53 decides who goes where."


  3. How It Works:
    • "Out of 100 customers, about 70 see the New York page, and 30 see the California page—it’s random but follows the weights."


  4. Test It:
    • "Visit 'lemonadestand.com' multiple times; you’ll see different pages based on the weights."


Class Demo (No AWS Needed):


  • Use a spinner or dice: Assign 1-7 as "New York" (70%) and 8-10 as "California" (30%). Spin/roll for 10 “customers” and tally where they “go.”

Key Takeaway: "Route 53 can split traffic to balance the load, like managing crowds at multiple stores."



Practical Article 3: Failover Routing with Health Checks


Goal: Show how Route 53 handles failures with a backup plan.


Student Level: Intermediate/Advanced.


Real-World Example: "Your New York lemonade stand is your main one, but if a storm shuts it down, Route 53 sends customers to California instead."


Steps:


  1. Set Up Primary and Backup:
    • "Main site: 'ny-lemonade.com' (S3 bucket)."

    • "Backup site: 'ca-lemonade.com' (another S3 bucket)."


  2. Add Health Check:
    • "Tell Route 53 to check 'ny-lemonade.com' every 30 seconds. If it’s down (e.g., returns an error), mark it unhealthy."


  3. Create Failover Records:
    • "In Route 53:
      • Primary record: 'lemonadestand.com' to 'ny-lemonade.com' (if healthy).

      • Failover record: 'lemonadestand.com' to 'ca-lemonade.com' (if primary fails)."



  4. Simulate Failure:
    • "Turn off 'ny-lemonade.com' (in real life, delete the S3 bucket temporarily). Route 53 notices and switches to 'ca-lemonade.com.'"


  5. Test It:
    • "Visit 'lemonadestand.com'—you’ll see California’s page when New York is down."


Class Demo (No AWS Needed):


  • Use two cards: "New York (Primary)" and "California (Backup)." Flip a coin for "health" (heads = healthy, tails = down). If New York is down, point students to California.

Key Takeaway: "Route 53 keeps things running by switching to a backup when something fails."




Tags

Post a Comment

0Comments

POST Answer of Questions and ASK to Doubt

Post a Comment (0)