Posts

Showing posts from December, 2019

AWS-ECS

Image
Elastic Container Service Virtual Machine vs Containerization Advantages Environment Encapsulation In the real enterprise development environment, configuring a local development environment spends too much time and sometimes needs to spend a few days to complete that. Too many unpredictable factors are able to affect the environment configuration. Faster boot time Difference Virtual Machine Infrastructure  contains different host hardware, like CPU, RAM, Disk, Network Interface Card, etc. Host Operating System  the operating system running in the host Hypervisor  running above the host operating system also can directly communicate with the physical host, some of the hypervisors need to run in the host operating system Virtual Machine like an individual machine, each VM has its own operating system and the apps running above the VM operating system spend too much time to launch a new EC2 instance (installing an operating system...

AWS-EC2-3

Auto Scaling The purpose we need to use the auto-scaling is to dynamically scale-out the number of services to satisfied for handling the incoming traffic. Launch Configuration/Template When the auto-scaling scale-out the auto-scaling group, it will use the launch configuration or launch template to launch a new instance. Launch Configuration Configurations Instance Type AMI Key Pair Block Storage Security Group User Data IAM Role ... Launch Template Support versioning Generating template by using the currently running EC2 instance Auto Scaling Group The group which contains one or more EC2 instances, which can help to scale-out or scale-in the number of instances, but it cannot do scale-up and scale-down The auto-scaling group is existing in a  single region ,  same to ELB But it can do auto-scaling cross AZ Trying to balance the amount of the instances in different AZs by some  scenarios If launching a new instance from an AZ failed...

AWS-EC2-2

Image
AWS Load Balancer For handling the high bandwidth of HTTP request and response. Multiple servers can host the same backend service, but it is hard to be picked by the client in which the IP address of the host is the one. Additional, when no matter the auto-scaling group working or manually to scale-out or scale-in, the IP address should be added to or be deleted from the list of hosts which for hosting the service Elastic Loading Balancing responses to separate and distribute the traffic to multiple targets, like EC2, ECS, Lambda, etc.  ELB listener should be assigned at least two availability zones Each availability zone only can have one ELB node which should be assigned to a public subnet in this AZ if the traffic is public traffic, but if the traffic is coming from internal AWS instance, then the ELB node should be assigned into the private subnet in this AZ, ELB categories: Classic Load Balancer Application Load Balancer Network Load Balancer Elastic Load Bal...

AWS-EC2-1

Image
Elastic Compute Cloud (EC2) Overview Structure Generally, EC2 is consists of three parts, hardware, hypervisor, and virtual machine instances. Like the fig below. The hypervisor is kind of like a physical interface that is responsible for interacting with the physical components of the host, like Virtual Box, Hyper-V, VMware.  Each virtual machine ( EC2 instance ) communicates with physical components through its operating system which communicates with the physical components through the hypervisor. EC2 Instance "E" from "EC2" is Elastic, which means  the computing power  is able to adjust (scaling), through the auto-scaling group to implements its ( the amount of EC2 instances ) elastic scaling (scale-out or scale-in) automatically. (In short, able to adjust the amount of EC2 instances, unable to adjust the resource for the specific EC2 instance) The user has the root permission, and this is an un-managed service which means A WS doesn't kno...

AWS-VPC-2

Image
VPC Endpoints Primary Issue Some of the services and resources from AWS do not exist in VPC itself but in AWS. If there is a service from VPC needs to access the AWS services or resources, it has to pass through the public internet and then go back to AWS. This will make the cost higher and slow the speed.  Solution - VPC endpoints That is the reason why VPC endpoint here for resolving the wasting issue. Interface endpoints: PrivateLink Private link could provide a private connection through the inner AWS internet connect between AWS services or resources and VPCs (under the same or different accounts)  ENI (Elastic Network Interface) , no need to expose to the public internet. Gateway endpoints: Gateway VPC Endpoint Gateway  provides the connection between  S3  or  DynamoDB  and VPC, through the router, any service could connect VPC Endpoint Gateway with normal way. VPC Peering VPC peering  provides a connection ...

AWS-VPC-1

Image
OSI (Open System Interconnection) Model There are 7 Layers: Application Layer - http request and so on Presentation Layer Session Layer Transport Layer  - wrap data to be a  segment/datagram , there is one example in the  load balancer Network Layer - wrap data to be a  package  to transfer Data Link Layer - wrap data to be a  frame  to transfer Physical Layer - communication by using  bit  unit TCP/IP (default protocol in this course, the most famous protocol suite) Using TCP (Transmission Control Protocol) in the Transport Layer. In this layer,  UDP  also is a famous protocol we are using. Using IP (Internet Protocol) in the Network Layer., in this layer,  ICMP  also is a famous protocol we are using, which is like we are typing `ping` in cmd. IP Address `ipconfig`, check your IP information, like IP address. LAN/WAN (local area network, wide area network), the private IP address is exi...