Graduate Program KB

Solutions Architect


Section 6: EC2 - Solutions Architect Level

  • Networking has both IPv4 and IPv6
  • IPv4 is still the most common, but IPv6 is newer
  • Almost running out of IPv4 addresses
  • Private and public IP are different
  • Companies typically have private networks, devices connect to internet gateway with private IP, which 'talks' to the internet through public IP
  • Public IP's must be unique across entire web
  • Public IP's can be geo-located easily
  • Private IP are unique in private network
  • Machines connect to WWW using a NAT + internet gateway (proxy)

Elastic IP

  • If an instance needs a fixed IP, use elastic IP
  • It is a public IPv4 you own
  • Can be attached to one instance at a time
  • You can have 5 in your account
  • Try to avoid using this when possible

IP in EC2

  • When stopped and restarted, an EC2 instance will get a new public IP
  • Also has a private IP
  • Use public IP for ssh, (we aren't in the same network)

Placement Groups

  • Sometimes you want control over the EC2 Instance placement strategy
  • When you create a placement group, you specify one of the following strategies for the group
    • Cluster: Instances in low-latency group in a single AZ
    • Spread: Instances across underlying hardware (max 7 instances per AZ) - for critical applications
    • Partition: Across many different partitions within AZ, Scales to 100s of EC2 instances per group

Cluster Placement Group

  • Great network (10 GBps bandwidth with enhanced networking enabled)
  • If the AZ fails, all instances will fail at same time
  • Use case: Big data jobs (fast), applications which need low latency

Spread Placement Group

  • Can span across AZ's, reduced risk of failure amongst all, on different physical hardware
  • Limited to 7 instances per AZ per placement group
  • Use case: Apps which need high availability, critical applications where failure isolation is critical

Partition Placement Group

  • Up to 7 partitions per AZ
  • Can span across multiple AZs in the same region
  • Up to 100s of EC2 instances
  • The instances in a partition do not share racks with the instances in the other partitions
  • EC2 instances get access to the partition information as metadata

Elastic Network Interfaces (ENI)

  • Logical VPC component, represent a virtual network card
  • ENI can have these attributes:
    • Primary private IPv4, one or more secondary IPv4
    • One elastic IP per private IPv4 and public IPv4
    • One or more security groups
    • A MAC address
  • You can create ENI independently and attach them on the fly (move them) on EC2 instances for failover
  • Bound to a specific availability zone (AZ)

EC2 Hibernate

When we hibernate in instance:

  • The in-memory (RAM) state is preserved
  • The instance boot is much faster (OS is not stopped/restarted)
  • Under the hood: the RAM state is written to a file in the root EBS volume
  • The root EBS volume must be encrypted

Good for long-running processes, saving the RAM state, and services which take time to initialise