Elastic Network Interface & Fabric Adapter - devian-al/AWS-Solutions-Architect-Prep GitHub Wiki
ENI Simplified
An elastic network interface is a networking component that represents a virtual network card. When you provision a new instance, there will be an ENI attached automatically and you can create and configure additional network interfaces if desired. When you move a network interface from one instance to another, network traffic is redirected to the new instance.
ENI Key Details
- ENI is used mainly for low-budget, high-availability network solutions
- However, if you suspect you need
high network throughput
then you can useEnhanced Networking ENI.
- Enhanced Networking ENI
- uses
single root I/O virtualization
to provide high-performance networking capabilities on supported instance types. - SR-IOV provides higher I/O and lower throughput and it
ensures higher bandwidth
, higher packet per second (PPS) performance, and consistently lower inter-instance latencies. - SR-IOV does this by dedicating the interface to a single instance and effectively bypassing parts of the Hypervisor which allows for better performance.
- Adding more ENIs won’t necessarily speed up your network throughput, but Enhanced Networking ENI will.
- There is
no extra charge
for using Enhanced Networking ENI and the better network performance it provides.The only downside is that Enhanced Networking ENI is not available on all EC2 instance families and types.
- uses
- You can attach a network interface to an EC2 instance in the following ways
- When it's running (hot attach)
- When it's stopped (warm attach)
- When the instance is being launched (cold attach).
- If an EC2 instance fails with ENI properly configured, you (or more likely,the code running on your behalf) can attach the network interface to a hot standby instance. Because ENI interfaces maintain their own private IP addresses, Elastic IP addresses, and MAC address, network traffic will begin to flow to the standby instance as soon as you attach the network interface on the replacement instance. Users will experience a brief loss of connectivity between the time the instance fails and the time that the network interface is attached to the standby instance, but no changes to the VPC route table or your DNS server are required.
Elastic Fabric Adapter (EFA)
- For instances that work with Machine Learning and High Performance Computing, use
EFA
- EFAs accelerate the work required from the above use cases. EFA provides lower and more consistent latency and higher throughput than the TCP transport traditionally used in cloud-based High Performance Computing systems.
EFA can also use OS-bypass (on linux only)
that will enable ML and HPC applications to interface with the Elastic Fabric Adaptor directly, rather than be normally routed to it through the OS. This gives it a huge performance increase.- You can enable a VPC flow log on your network interface to capture information about the IP traffic going to and from a network interface.