KC4
DHCP - Connect you to the network
ARP - Finding the next hop
DNS - Resolving a name to an IP address
NAT - Keeping your private
IP address off the public internetHTTP - Requesting and sending the files (HTML, CSS, etc.)
Packets
Objectives
Difference between circuit switching and packet switching
What makes packets switching effective for data packets
Circuit switching
How phones used to work. Changing circuits to talk to different people. Operator did it
Advantages of Circuit switching
Dedicated, exclusive connection
Consistent bandwidth, minimal delay
Drawbacks of circuit switching
Expensive
Inefficient (not using all of your bandwidth)
Single point of failure (one circuit fails, everything fails)
Packet switching
Created to make the internet work
Break a message into chunks (packets)
Send packets independently.
Every single packet can take a different map
Like sending a book through mail
Individually packaging each page and putting it into the mail. Each piece will probably make it to the end, but they will take different paths
Packet switching advantages
More efficient
Greater redundancy. If one link goes down, there are still paths that can be taken to get from one to the other, it’s just not as direct. Route around paths
Packet disadvantages
Latency
Dropped packets
If network is too congested, new packets get dropped and disappear
Cloud computing
On demand delivery of IT resources with pay as you go pricing
Has resources when you need them
IT resources
Amazon EC2
Amazon Elastic Compute Cloud
Flexible, cost effective, quick
Request what you want when you want
Only pay for what you use, not stopped or terminated instances
Can choose operating system
Give instance more CPU and storage whenever you want
Hypervisor
Keeps instances secured and separate
Types of EC2 instances
They serve client request
Grouped under instance family
General Purpose
Good balance of resources
Compute Optimized
Compute intensive tasks
High performance processors
Memory Optimized instances
Fast delivery for workloads that process large datasets in memory
Accelerated computing
Hardware accelerators to perform some functions more efficiently than is possible in software running on CPUs.
Storage optimized instances
For workloads that require high sequential read and write access to large datasets on local storage.
Pricing (WTF is this commercial we are watching????)
HOW MUCH WILL IT COST?!?
On demand
Per hour or per second
Savings plan
One or 3 year term
Save lots of money
Reserved instances
Predictable uses. Big discount.
Spot Instances
Amazon can reclaim instances at any time.
Dedicated hosts
Physical servers with EC2 instance capacity that is fully dedicated to one company’s use.
Scaling Amazon EC2
Using only the resources you need
Auto scales to work load that is needed
Scale up
Add more machines that are running to take care of more customers
End up with the exact right amount of power for each service
Auto Scaling Configurations
Minimum capacity
Desired Capacity
Maximum Capacity
Directing Traffic
Multiple instances that run the same program and purpose, load balancing is an application that sends users to the lesser used instances to balance the workload. Properly distributes traffic.
Elastic Load Balancing
Addresses load balancing
Regional Construct. Runs at region level so it can handle traffic well
Talks to instances to figure out how much traffic is going on and directs it according to traffic demands.
True decoupled architecture
Messaging and Queuing
Tightly coupled architecture (monolithic application). Two applications talk. If one fails, then the other fails
Loosely coupled architecture (microservices). Has a buffer between applications and allows for messages to be saved if one application fails
Amazon SNS
Send messages to services and to subscribers
Payload: Message protected until delivery
Sends to all subscribers in one go
Publish messages on a single topic (group of people) or multiple to different people all at once
Amazon SQS Simple Queue Service
Send, store and receive messages between software components without losing messages or requiring other services to be available.
Compute Services
EC2 instances are virtual machines
Serverless compute options (you can’t see the underlying architecture)
All taken care of for you. Just focus on application
Just upload code without worrying about server side stuff. It’s what AWS is for
AWS Lambda
Runs code for under 15 minutes
Scales functions to application demand
Container
Docker container
Delivers software in containers (package for code)
AWS ECS
Supports docker containers
Launch and stop Docker applications
AWS EKS
Run Kubernetes on AWS
Kubernetes
Open source software that enables you to deploy and manage containerized applications at scale.
AWS Fargate
Serverless compute engine for containers. Works with both ECS and EKS.
No provision or server management
Review
Cloud computing
Requests for IT resources over the internet. Available on demand.
EC2
Spin up and spin down EC2 instances
Can build instances for specific purposes
Scale vertically (add power) or horizontally (add more quantity)
Billing
On-demand
Most flexible. No contract
Spot Instances
Get a discount from unused space
Reserved Instances
Get a discount when you sign a contract to only have a certain amount of usage per month
Savings Plans
EC2, Lambda
SQS
Decouple system components
SNS
Sending messages (emails, notifications, whatever) to subscribers
ECS
EKS
Both are container orchestration tools
AWS Fargate
Runs containers on serverless gate
AWS Lambda
Only costs when functions are run
AWS Global Infrastructure
Events can happen. When we own a data center, if something happens then that data center stops.
AWS Data centers are built in regions.
Each region is connected to a high speed fiber network.
You chose what region you want to run out of.
Data never leaves the region unless you explicitly request the data be exported.
Data us subject to the laws where the region is at
You can pick whatever region you want.
Make sure that:
Compliance. You follow regulations
Proximity. Make sure that you have minimum latency.
Feature availability. Some regions don’t have all the features that other regions have.
Pricing. Even when hardware is equal, some countries charge more than others with taxes.
Region
Availability Zones
Regions are not one location. Regions have many data centers inside of it. The data centers are built far apart from each other. If one goes down, others can stay up.
Don’t run an availability zone in the same locations.
Run across at least two availability zones.
ELB - regional construct. Runs across all availability zones.
Regionally scoped service
Edge Locations
Amazon CloudFront delivers things to customers around the world no matter where they are.
Edge locations are different from regions.
Run a DNS called amazon route 53
AWS outpost
Runs mini region isolated within a building
Regions are geographically isolated areas.
Regions contain availability zones.
Edge locations run amazon cloudfront to get services to customers around the world.
API = Application Programming Interface
AWS Management Console
Browser based
Manage things visually
Build test environments
AWS bills
Monitoring
Non technical resources
AWS CLI
Make API calls using the terminal on machine
Scriptable and repeatable
Less susceptible to human error
AWS SDKs
Interact with AWS resources through various programming languages
Manage Environment with tools
Elastic beanstalk
Provide application code and desired configurations.
It builds the environment for you.
Focus on business application
AWS Cloud Formation
Infrastructure as code tool used to define a wide variety of AWS resources
Use JSON
Builds without specifying exactly how to build it
Storage
Define resources in template
Gets resources for template
Creates identical environments
Module 3 Summary
Availability zones make up regions
Choose what you want to run out of
Deploy infrastructure in at least 2 availability zones
Edge locations to speed up delivery to customers far from the data center
Module 4
Networking
Amazon Virtual Private Cloud
Launch AWS resources in the virtual network that you define. Can be public or private.
VPC
Private cloud. EC2 instances. Place them into different subsets.
Subnets
Chunks of IP addresses that allow us to group resources together
Determines if things are public or private
Internet facing or
Public traffic
Needs internet gateway
Doorway open to the public
Private gateway
Only allows certain users into VPC
Virtual private gateway is needed to determine who gets in
AWS Direct Connect
Establish private fiber connection from data center to AWS.
Helps sidestep bandwidth issues
Subnets and Network Access Control Lists
VPC
Nothing comes in or out, only with Internet gateway
Need more to cover security
Network hardening
Happens inside VPC
Subnets control packet permissions
Network ACL determines if a packet has permission to enter the subnet
Check traffic going into or leaving subnets
Doesn’t evaluate if a packet can get to an EC2 specifically
Security groups
Every EC2 comes with it
Blocks everything by default
Needs to be modified to accept specific kinds of traffic
Stateful. Remember who came in or out.
Only checks if sender is on approved list
Go from one subnet to another
Goes from EC2 instance
To Network ACL
To second subsets ACL and then to the security group for the second subnet.
Stateless controls always check lists.
State remembers packets. If they are once approved, they are always approved.
Global Networking
How do customers interact?
AWS Route 53
DNS - translates website names into IP addresses
Direct people to different points
Register domain names on AWS
Amazon CloudFront
CND: Deliver edge content to users based on location
Access same content, but from a closer location
Class!!!
KNOW THESE FOR KC4
EC2
EC2 Autoscaling
Elastic Load Balancing
Load Balancing
Does not initiate autoscaling
Simple Notification Service (SNS)
Lambda
Serverless computing
Functions as a service
CloudFormation
AWS infrastructure as code
All configurations with servers (select OS, instance, server size, key, server login, installed nginx) remembers
Can copy configurations to other servers
Regions/AZs (Availability Zones)/Edge Locations
Regions consist of availability zones
Edge locations are copies of resources
VPC
Network ACLs
Stateless
Looks at every single packet and checks list of rules to see if it follows the rules
Security Groups
Route 53
DNS. That’s all that it is.
CloudFront
Uses edge locations to get data to people that are far from data centers
Stateless (NACL) - checks both directions, in and out. Doesn’t remember
Stateful (Security Group) - checks messages coming in, not out. Remembers things too
Cloud
On-prem
Managing physical location. You run it.
Hybrid deployment
Both cloud and on-prem
Vertical scaling
One instance and add resources to make it more powerful
Horizontal scaling
Multiple EC2 instances with smaller resources, uses load balancing to distribute load among instances
Benefits of cloud computing