<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anisabibi on Medium]]></title>
        <description><![CDATA[Stories by Anisabibi on Medium]]></description>
        <link>https://medium.com/@anisabibi677?source=rss-09f6adbb8e41------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*sTQ6U0mmhV6zvdxa</url>
            <title>Stories by Anisabibi on Medium</title>
            <link>https://medium.com/@anisabibi677?source=rss-09f6adbb8e41------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 06:07:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anisabibi677/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Highly Available Application Architecture]]></title>
            <link>https://medium.com/@anisabibi677/highly-available-application-architecture-887737f0c534?source=rss-09f6adbb8e41------2</link>
            <guid isPermaLink="false">https://medium.com/p/887737f0c534</guid>
            <dc:creator><![CDATA[Anisabibi]]></dc:creator>
            <pubDate>Thu, 23 Oct 2025 18:22:22 GMT</pubDate>
            <atom:updated>2025-10-23T18:22:22.112Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*79czLw54zEpqrN8T6aTnsw.png" /></figure><h3>Resources Purpose:</h3><h4>VPC (MyVPC)</h4><ul><li>Purpose: Creates an isolated network (10.0.0.0/16) for your AWS resources.</li></ul><h4>Internet Gateway (InternetGateway, AttachGateway)</h4><ul><li>Purpose: Provides internet access to resources in public subnets; attaches IGW to the VPC.</li></ul><h4>Public Subnets (PublicSubnet1, PublicSubnet2)</h4><ul><li>Purpose: Hosts resources that need direct internet access (ALB, NAT Gateway); provides a network zone in two Availability Zones for high availability.</li></ul><h4>Public Route Table &amp; Routes</h4><ul><li>Purpose: Allows traffic from public subnets to flow to the internet via the Internet Gateway.</li></ul><h4>Private Subnets (PrivateSubnet1, PrivateSubnet2)</h4><ul><li>Purpose: Hosts EC2 instances that should NOT have direct internet access; located in two Availability Zones for redundancy.</li></ul><h4>Private Route Table &amp; Routes</h4><ul><li>Purpose: Ensures private subnets route outbound internet traffic through the NAT Gateway (not directly to IGW).</li></ul><h4>NAT Gateway (NatGateway, NatEIP)</h4><ul><li>Purpose: Allows EC2 instances in private subnets to access the internet for updates, patches, etc., without exposing them directly.</li></ul><h4>Security Groups</h4><ul><li>EC2SecurityGroup: Allows HTTP (80) from anywhere; SSH (22) only from your specified TrustedIP.</li><li>ALBSecurityGroup: Allows HTTP (80) from anywhere to the ALB.</li></ul><h4>EC2 Instances (EC2Instance1, EC2Instance2)</h4><ul><li>Purpose: Hosts your web application (Apache HTTPD); each instance is deployed in a separate private subnet for HA.</li></ul><h4>Application Load Balancer (AppLoadBalancer)</h4><ul><li>Purpose: Distributes HTTP requests across both EC2 instances in private subnets; sits in public subnets for public accessibility.</li></ul><h4>Target Group (AppTargetGroup)</h4><ul><li>Purpose: Defines which instances ALB should forward traffic to (EC2Instance1 and EC2Instance2); checks their health.</li></ul><h4>ALB Listener (ALBListener)</h4><ul><li>Purpose: Listens for HTTP traffic on port 80 and forwards to the target group.</li></ul><h3>Traffic Workflow:</h3><h4>Inbound Traffic</h4><ol><li>User Requests (HTTP)</li></ol><ul><li>A user accesses the web service using the ALB’s public DNS name (exposed via ALBURL output).</li><li>Request enters the VPC through the Internet Gateway.</li><li>ALB, deployed in public subnets, receives the HTTP request on port 80.</li></ul><p>2. ALB Routing</p><ul><li>ALB forwards the request to one of the EC2 instances (EC2–1 or EC2–2) in the private subnets via the target group.</li><li>EC2s serve the web page.</li></ul><h4>Outbound Traffic (From EC2 in Private Subnets)</h4><ul><li>EC2 instances in private subnets cannot access the internet directly.</li><li>When they need to access the internet (e.g., for OS or package updates):</li><li>Traffic is routed through the NAT Gateway (located in PublicSubnet1).</li><li>NAT Gateway uses an Elastic IP and sends the request out via the Internet Gateway.</li><li>Response flows back to EC2.</li></ul><h4>Management (SSH Access)</h4><ul><li>If you SSH into EC2 instances (e.g., for troubleshooting), your connection:</li><li>Must come from the TrustedIP CIDR.</li><li>The EC2SecurityGroup allows SSH on port 22 only from this IP.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=887737f0c534" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>