0% found this document useful (0 votes)
6 views10 pages

AWS My Notes With Examples

Uploaded by

Sam prabhakar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views10 pages

AWS My Notes With Examples

Uploaded by

Sam prabhakar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

AWS my notes with Examples.

Auto balancing and Load Balancer.

1. Autobalancing:

Autobalancing refers to automatically distributing tasks, workloads, or processes across


multiple resources (such as machines, threads, or servers) to achieve even distribution. This
helps optimize the performance and utilization of resources.

Example 1: Autobalancing in a CPU

Let's say you have a computer with 4 cores, and you want to run 4 different tasks (programs).
Instead of all tasks running on one core, the system can "autobalance" and distribute these
tasks across all 4 cores to ensure that none of the cores is overloaded. Each core runs one
task, preventing slowdowns due to an overworked core.

Example 2: Autobalancing in a To-Do List

Imagine you and three friends are assigned 12 tasks. Without autobalancing, one person
might end up with 8 tasks, while others only get 1 task each. With autobalancing, tasks are
evenly distributed so each person gets 3 tasks to ensure everyone shares the workload
equally.

2. Load Balancer:

A load balancer is a tool or a service that helps distribute incoming traffic (or tasks) across
multiple servers. This ensures that no single server gets overwhelmed and that the system
remains efficient and responsive.

Example 1: Website Traffic Load Balancer

Consider a website like an online store. If 10,000 users visit the site at the same time, a single
server might slow down or crash due to too much traffic. A load balancer sits between the
users and the servers and distributes the traffic across multiple servers. For example:

 3,000 users are sent to Server A


 3,500 users are sent to Server B
 3,500 users are sent to Server C

This distribution ensures that no single server becomes overwhelmed, and users experience
faster page loads.

Example 2: Restaurant with a Load Balancer

Imagine a restaurant with three waiters (representing servers). A "host" (acting as the load
balancer) stands at the door. As customers (incoming tasks) arrive, the host distributes them
to the waiters evenly so that no one waiter is overloaded with too many customers, ensuring
efficient service for everyone.

In short:

 Autobalancing focuses on distributing tasks evenly for better performance.


 Load balancer distributes traffic or tasks to multiple servers / resources to prevent
overloading one of them.

Both concepts aim to optimize system performance and ensure that resources are efficiently
utilized.

1. HTTP (HyperText Transfer Protocol):

HTTP is the protocol used for transferring data (like text, images, videos) between your
browser and a web server. It's how websites communicate with your device.

 Example: When you type a website URL like http://example.com in your browser, your
device uses HTTP to request the webpage from the server. The server then sends the
webpage back to your browser.

However, HTTP is not secure — the data sent between your browser and the server can be
intercepted and read by others.

2. HTTPS (HyperText Transfer Protocol Secure):

HTTPS is a secure version of HTTP. It encrypts the data exchanged between your browser
and the server, making it much harder for others to read or tamper with it.

 Example: When you visit a website like https://example.com, your browser establishes a
secure connection with the server. All the information, such as passwords or credit
card details, is encrypted and safe from eavesdroppers.

You can recognize an HTTPS site by the padlock icon in the browser's address bar.

3. TCP (Transmission Control Protocol):

TCP is a protocol that ensures reliable and accurate delivery of data between two devices
over the internet. It breaks data into smaller packets and makes sure all packets arrive
correctly and in order.
 Example: When you download a file from a website, TCP ensures the entire file is
transferred correctly, with no missing or out-of-order pieces. If some data packets are
lost, TCP resends them to ensure complete delivery.

TCP is used in applications where accuracy matters (like downloading files, emails, or web
browsing).

4. UDP (User Datagram Protocol):

UDP is a protocol used for fast, but less reliable, data transmission. Unlike TCP, it doesn't
check if all packets arrived or if they arrived in the right order. This makes UDP faster but
less reliable than TCP.

 Example: Streaming a live video or playing an online game. In these cases, speed is
more important than perfect accuracy. Some data packets might get lost, but you
won’t notice because the stream or game continues without waiting for missing data.

UDP is ideal for real-time applications where small delays are acceptable, but speed is
critical.

Summary:

 HTTP: Basic, non-secure web communication (e.g., browsing http://example.com).


 HTTPS: Secure web communication, encrypted (e.g., https://example.com).
 TCP: Reliable data transfer where accuracy is critical (e.g., downloading a file).
 UDP: Fast data transfer where speed is more important than accuracy (e.g., live
streaming).

4o

An Application Load Balancer (ALB) and a Network Load Balancer (NLB) are two types
of load balancers that distribute incoming traffic across multiple servers to ensure no single
server is overwhelmed. Here’s a simple breakdown with examples:

Application Load Balancer (ALB):

 Layer: Works at the Application Layer (Layer 7 of the OSI model).


 Traffic: It deals with HTTP/HTTPS traffic, making decisions based on content (like
URLs, headers, and cookies).
 Use case: Best for web applications.
 Example: Imagine a website like www.example.com that has multiple web servers.
When someone requests a page, the ALB can direct the traffic to the server based on
URL patterns (e.g., /images to one server, /videos to another).
o Scenario: If a user requests www.example.com/images, the ALB can send them to
a server that specializes in handling images, ensuring faster responses.

Network Load Balancer (NLB):

 Layer: Works at the Network Layer (Layer 4 of the OSI model).


 Traffic: It handles TCP/UDP traffic, making decisions based on IP addresses and
ports without looking at the content.
 Use case: Best for low-latency, high-performance applications (like real-time gaming
or financial apps).
 Example: Suppose you have a chat service that requires high-speed communication
between users. An NLB will quickly distribute incoming connections to different
servers based purely on IP address and port.
o Scenario: When users connect to a chat app, the NLB quickly routes each
connection to an available server without inspecting what’s inside the
messages.

Summary:

 ALB: Best for web applications where you need to route traffic based on content
(URL, headers, etc.).
 NLB: Best for high-performance apps where speed and simplicity are crucial, and
traffic is distributed based on IPs and ports.

VPC ===Virtual Private Network


A Virtual Private Cloud (VPC) is like a private network within a public cloud environment,
such as AWS, Google Cloud, or Microsoft Azure. It allows you to have your own isolated
part of the cloud where you can run resources like virtual machines, databases, and web
applications, just as if they were on your own private network.

Key Concepts of VPC:

1. Isolation:
o A VPC gives you control over a private section of the cloud where your
resources (servers, databases) are kept separate from others' resources. Think
of it like renting your own office space within a large building. Even though
you're in the same building as others, you have your own private area.
2. Subnets:
o Inside your VPC, you can create subnets, which are smaller network
segments. Each subnet can be used for different parts of your application. For
example, you might want a public subnet for web servers that the internet can
access and a private subnet for databases that only your web servers can
access (not the internet directly).

Example:

o Public subnet: A web server that's accessible to users visiting your website.
o Private subnet: A database that's only accessible to the web server, not directly
to users.
3. IP Addressing:
o You assign IP addresses to your resources in the VPC, just like in a
traditional data center. These addresses are either public (internet-facing) or
private (internal only). Private IP addresses are used for communication
between resources inside the VPC, while public IPs allow external access.

Example:

o A database might use a private IP address because it only needs to talk to your
web server, not the internet.
4. Routing:
o You use routing tables to control how traffic moves within your VPC. For
example, you might set a rule that says all internet-bound traffic from your
web servers should go to a specific internet gateway (a doorway to the
internet), while traffic between subnets should stay private.

Example:

o When a user types in your website address, the request is routed from the
public internet, through the VPC’s internet gateway, and to your web server.
5. Security Groups & Network ACLs:
o Security groups are like firewalls for your VPC. They control which types of
traffic are allowed to enter or leave your resources (such as a virtual machine
or database).
o Network ACLs (Access Control Lists) work similarly but apply at the subnet
level, adding an additional layer of security.

Example:

o Security group: You can allow only HTTP (port 80) traffic to your web server
and block everything else.
o Network ACL: You can block all traffic from a specific IP address range (e.g.,
if you think those addresses are malicious).
6. Internet Gateway (IGW):
o An Internet Gateway allows your VPC to connect to the public internet. If
you have resources like a web server that need to be accessed by users on the
internet, you'll route their traffic through the internet gateway.

Example:

o Your web server, which is in the public subnet, uses the internet gateway to
receive user requests from the internet.
7. NAT Gateway:
o A NAT (Network Address Translation) Gateway allows resources in a
private subnet (such as a database) to access the internet for things like
software updates but prevents the internet from initiating a connection with
those resources.

Example:

o Your database can download security patches from the internet but remains
invisible to anyone trying to reach it from outside the VPC.

Example Use Case: Hosting a Website in a VPC

1. Create a VPC: You create a VPC for your application in a cloud provider like AWS.
2. Subnets:
o You create two subnets:
 Public subnet: for the web server.
 Private subnet: for the database.
3. Security Groups:
o Web server security group: Allow HTTP and HTTPS traffic from the internet.
o Database security group: Only allow traffic from the web server in the private
subnet.
4. Routing:
o Set up routing so traffic to the web server goes through the internet gateway,
and traffic between the web server and the database stays within the VPC.
5. NAT Gateway:
o If your database needs to access the internet (e.g., to download updates), you
set up a NAT gateway in the public subnet to handle this.
6. Internet Gateway:
o The web server uses the internet gateway to communicate with users who visit
your website.

In this way, a VPC helps you organize, secure, and control your cloud infrastructure while
maintaining the flexibility to scale and connect resources as needed.

ICG === Internet Gateway (IGW

In AWS, an Internet Gateway (IGW) is a tool that allows resources in your VPC (like
virtual machines or web servers) to connect to the internet. It acts as a doorway between your
private network in the cloud and the public internet.

For example, if you have a website hosted in AWS, the IGW helps users on the internet
access it. Similarly, it allows your cloud resources to reach the internet, such as to download
updates.
Implicit Router

In AWS, the "implicit router" refers to the default, hidden router that handles traffic within a
Virtual Private Cloud (VPC). This router is automatically available and doesn't require
manual configuration. It routes traffic between subnets in the same VPC and enables
communication between resources, like EC2 instances, inside the VPC. You don't see or
manage the router directly; instead, its behavior is governed by the VPC's route tables, which
define how traffic is directed.

In essence, the implicit router acts as the backbone for VPC networking, allowing smooth
internal communication between resources without the need for explicit setup.

Route table

In AWS, a route table is like a map that tells your network traffic where to go. It contains a
set of rules, called routes, that define how data should be directed within your VPC (Virtual
Private Cloud).

Each subnet in your VPC must be associated with a route table. The table specifies which
traffic should stay inside the VPC and which traffic can go outside, such as to the internet
through an Internet Gateway (IGW).

For example, a route table could have a rule that says, "Send all traffic for the 10.0.0.0/16
network (your VPC) internally, but send everything else to the internet via the IGW."

In short, it controls the flow of data inside your network and to the outside world.

IP Address

In AWS, an IP address is used to identify resources, like EC2 instances, within a network.
There are two main types of IP addresses in AWS:

1. Private IP Address: This is used for internal communication within your VPC.
Resources with private IPs can talk to each other inside the VPC, but they can't be
reached from the internet.
2. Public IP Address: This is assigned to resources like EC2 instances that need to be
accessible from the internet. A public IP allows people outside your VPC (on the
internet) to connect to your resource.

Example:

 Private IP: A web server in a VPC can talk to a database server using their private
IPs.
 Public IP: If the web server needs to be accessed by users from the internet, it will be
given a public IP address.

AWS automatically assigns private IPs when you launch an instance, and you can opt for
public IPs if needed.
S3-------> Simple Storage Service,

In AWS, S3 stands for Simple Storage Service, a service that allows users to store and
retrieve any amount of data at any time from anywhere on the web. It’s widely used because
it is scalable, durable, secure, and easy to integrate. Here’s a simple breakdown of S3
concepts:

1. Buckets:

 Buckets are containers for storing your data. Every object (file) in S3 is stored in a
bucket. Each bucket has a globally unique name across AWS, and you can think of it
as a folder.

2. Objects:

 Objects are the actual files or data you store in a bucket. Each object consists of data,
metadata (information about the file), and a unique identifier (key). Objects can be
any type of file like images, videos, documents, etc.

3. Keys:

 A key is the unique identifier for an object within a bucket. Every object in an S3
bucket has a key, which is its name in that bucket, similar to a file name in a folder.

4. Storage Classes:

 S3 offers different storage classes based on how often you access your data:
o Standard: Used for frequently accessed data.
o Intelligent-Tiering: Automatically moves data to the most cost-effective
storage based on usage.
o Glacier: For long-term, archival storage that is rarely accessed but needed for
compliance.
o Others like One Zone-IA for less critical, infrequent access data.

5. Versioning:

 S3 can store multiple versions of an object. If versioning is enabled, S3 keeps


different versions of the same file so that you can restore older versions if needed.

6. Access Control:

 You can control who has access to your data in S3. This can be done using:
o Bucket Policies: These are rules that define who can access your bucket and
its contents.
o Access Control Lists (ACLs): Define permissions for individual objects or
buckets.
7. Data Encryption:

 S3 offers encryption to protect your data, both at rest and in transit. You can use
server-side encryption (AWS manages the encryption keys) or client-side encryption
(you manage the encryption).

8. Lifecycle Policies:

 These allow you to automatically move objects to different storage classes or delete
them after a certain period. For example, you can move infrequently accessed files to
cheaper storage after 30 days.

9. Cross-Region Replication (CRR):

 This feature lets you automatically replicate your data from one S3 bucket to another
in a different AWS region. It’s useful for disaster recovery or if you need to keep data
close to your users in multiple regions.

10. S3 Transfer Acceleration:

 This feature speeds up the transfer of files to and from S3 over long distances by
using optimized AWS network paths.

Key Benefits of S3:

 Scalability: S3 can handle massive amounts of data without requiring you to manage
infrastructure.
 Durability: S3 provides 99.999999999% durability, meaning your data is safe and
reliable.
 Availability: S3 ensures high availability of your data, meaning it’s almost always
accessible.
 Cost-effective: You only pay for what you use, and you can use cheaper storage
classes for data you don’t access often.

In short, AWS S3 is a highly flexible and scalable cloud storage service that supports various
use cases, from simple file storage to large-scale data backups and disaster recovery.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy