AWS placement group ,ENI ,EIP学习笔记

来源:互联网 发布:手机发帖软件 编辑:程序博客网 时间:2024/05/19 13:15

Placement Groups(Single Availability Zone)

a logical grouping of instances within a single Availability Zone. Using placement groups enables applications to participate in a low-latency , 10 Gbps network.

A placement group can't span multiple Availability Zones.

ENI (需选择subnet)

包含一个primary private ip;一个或者多个 secondary private ip address;一个EIP/per private ip address; 一个public ip address(will be auto-assigned to the ENI for eth0).


图中:eth0 是primary interface,因为在instance状态为stopped or running 下 , primary interface 是不支持deattach。所以将EIP attach 到eth1中,在instance 意外fail之后,可迅速将其所使用eth1 attach到standby instance上。

To ensure failover capabilities, consider using a secondary private IP for incoming traffic on a network interface. In the event of an instance failure, you can move the interface and/orsecondary private IP address to a standby instance(manually).

实际操作中: default vpc下建的instance,它default primary interface, private ip addr 已经对应了一个 public ip。如果需要再attach EIP 需要再加sendary private ip,这之后才能进行相应操作。

实际应用场景:

you can use an ENI as your primary or secondary network interface to a critical service such as a database instance or a NA T instance.比如RDS primary down了,将其使用的ENI attach 到standbby,可以通过手动或者代码的方式(代码的方式还有待研究),reattach 期间会损失一些用户请求,但是极大的保证了系统的available.

EIP

An Elastic IP address(EIP) is a static IP address designed for dynamic cloud computing. With an EIP , you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account. ENI 很好的体现了一个思想 design for failure.

一种情况: 当你disassociate an EIP address from an instance launched in default VPC, the instance 在几分钟之内会自动assign一个public ip,但是如果你attach了一个eth1,就不会assign一个新的public ip。  (不明白为什么)

EIP属于稀缺资源,AWS建议use an EIP primarily f or load balancing use cases, and use DNS hostnames for all other inter-node communication.

0 0