Skip to content

Instantly share code, notes, and snippets.

@aj07mm
Last active February 20, 2019 15:59
Show Gist options
  • Save aj07mm/d30f786dac05cb314396a976db2366d6 to your computer and use it in GitHub Desktop.
Save aj07mm/d30f786dac05cb314396a976db2366d6 to your computer and use it in GitHub Desktop.
aws.md

Region > AZ


Cloudfront

 User <--(edge location)--> origin(__s3__, __ec2__, elb, route53)
              ^
              |
              ---- cache specified by a ttl

Distribution - This is the name given to the CDN which consists of a collection of Edge Locations

  • Web distribution - Typically used for websites
  • RTMP - used for Media Streaming

OBS:

  • You can have an origin that isn't hosted on AWS
  • edge locations are for Read and Write
  • You can clear cache but you'll be charged

Elastic Load Balancer

               Autoscaling Group(uses Launch Configuration)
load balancer --|--> ec2 instance (AZ1)
              --|--> ec2 instance (AZ2)
              --|--> ec2 instance (AZ3)
                ^
                |
                ------- Target Group

if one ec2 instance dies the load balancer redirects the requests to the other and the group autoscales to the number of min and max instances according to the launch configuration and bootscript

OBS:

Auto Scaling Group is just a group of identical instances that AWS can scale up(add a new one) or down(remove) automatically based on some configurations you've specified. You use this to ensure at any point in time, there is the specific number of instances running your application, and when a threshold is reached(like CPU utilization), it scales up or down.

Target Group is a way of getting network traffic routed via specified protocols and ports to specified instances. It's basically load balancing on a port level. This is used mostly to allow accessing many applications running on different ports but the same instance.

src: https://stackoverflow.com/questions/48529074/how-is-target-groups-different-from-auto-scaling-groups-in-aws


VPC (Virtual Private Cloud)

vpc is a virtual data center in the cloud. It's an isolated section of the aws cloud where you launch aws resources in a virtual network that you define.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment