التخطي إلى المحتوى الرئيسي

What is Route53?

 



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."




تعليقات

المشاركات الشائعة من هذه المدونة

Uncontrolled form input in React-JS

  Uncontrolled form input in React-JS? If we want to take input from users without any separate event handling then we can uncontrolled the data binding technique. The uncontrolled input is similar to the traditional HTML form inputs. The DOM itself handles the form data. Here, the HTML elements maintain their own state that will be updated when the input value changes. To write an uncontrolled component, you need to use a ref to get form values from the DOM. In other words, there is no need to write an event handler for every state update. You can use a ref to access the input field value of the form from the DOM. Example of Uncontrolled Form Input:- import React from "react" ; export class Info extends React . Component {     constructor ( props )     {         super ( props );         this . fun = this . fun . bind ( this ); //event method binding         this . input = React . createRef ();...

JSP Page design using Internal CSS

  JSP is used to design the user interface of an application, CSS is used to provide set of properties. Jsp provide proper page template to create user interface of dynamic web application. We can write CSS using three different ways 1)  inline CSS:-   we will write CSS tag under HTML elements <div style="width:200px; height:100px; background-color:green;"></div> 2)  Internal CSS:-  we will write CSS under <style> block. <style type="text/css"> #abc { width:200px;  height:100px;  background-color:green; } </style> <div id="abc"></div> 3) External CSS:-  we will write CSS to create a separate file and link it into HTML Web pages. create a separate file and named it style.css #abc { width:200px;  height:100px;  background-color:green; } go into Jsp page and link style.css <link href="style.css"  type="text/css" rel="stylesheet"   /> <div id="abc"> </div> Exam...

JDBC using JSP and Servlet

JDBC means Java Database Connectivity ,It is intermediates from Application to database. JDBC has different type of divers and provides to communicate from database server. JDBC contain four different type of approach to communicate with Database Type 1:- JDBC-ODBC Driver Type2:- JDBC Vendor specific Type3 :- JDBC Network Specific Type4:- JDBC Client-Server based Driver  or JAVA thin driver:- Mostly we prefer Type 4 type of Driver to communicate with database server. Step for JDBC:- 1  Create Database using MYSQL ,ORACLE ,MS-SQL or any other database 2   Create Table using database server 3   Create Form according to database table 4  Submit Form and get form data into servlet 5  write JDBC Code:-     5.1)   import package    import java.sql.*     5.2)  Add JDBC Driver according to database ide tools     5.3)  call driver in program         ...