Blog
4/1/1: 4 Random Thoughts from me, 1 tools to help Sales Engineers, 1 quote for motivation
AWS SAA-C03 Novice Journey: EC2 Network Interfaces and Placement
- July 27, 2022
By Ramzi Marjaba
4/1/1 Weekly
And now it’s time to talk about networking for EC2 instance. Now the concept for me was not hard to understand, but there were a few things that I had a hard time understanding why they did it that way, or what’s the purpose behind it, and then how I explain the concepts. I found several videos that are so similar to each other, I think they just took the AWS documentation and regurgitate it, and if that’s what you need, great, go read those.
Here’s my attempt at explaining it. Now, as I mentioned earlier, an EC2 is a virtual machine. A virtual machine runs on a physical server. So let’s start with that.
A physical server has physical NICs [Network Interface Cards] on it. The NIC car has 1 to 4 ports. I don’t know if they came out with more dense cards, but for the purpose of the explanation, let’s say each NIC has 1 port.
On this physical server, you will have multiple VMs running, or in AWS, EC2s.
In the example above, we have 9 VMs to be exact.
These VMs need to be to talk to each other and to the outside world. So these NICs can be connected to a virtual Switch, which is then connected to the NIC.
So if the top right VM wants to communicate to the outside world, it is connected through NIC 1. You can also have NICs on the same vSwitch talking to each other.
And this leads us to the networking interfaces available in AWS, the first being:
Elastic Network Interface
ENI: Stands for Elastic Network Interface and that is sort of what I described above. Each EC2 instance gets one by default. But you can add other ones as well. Let’s say you are running a web application. The default ENI can be used by web app visitors to access and do things on it. Then you can create another ENI for all the logs that your EC2 instance is generating which is not visible or used to the general population, only to the IT department.
This is a low-budget option with high availability. Can go up to 10G.
Then you have:
Enhanced Networking
EN which is enhanced networking. This is for when a little more bandwidth is needed and goes up to 25GBPS . The way it works is that the VM will bypass the switch and be connected directly to the NIC.
There are 2 options here, the ENA (Elastic Network Adaptor) and the 82599. It sounds like the focus should be on ENA.
Elastic Fabric Adaptor
Finally, there is EFA, Elastic Fabric Adaptor, which is then used for high computing, up to 100GBPS, and like the EN bypasses the virtual switch, the EFA does OS-Bypass and although I could find anything specific to explain this, I suspect that there is some lower layer operating system processes that that the EFA simply skips and allows high bandwidth.
VM Placement
Then they talk about optimizing EC2s Placement of VMs. Sometimes multiple EC2s are needed by a company to do the work that needs to be done. If that’s the case, we can choose, to an extent, how these EC2s are placed on the different physical servers.
There’s the Cluster Placement Groups, if you have something that requires low latency or high bandwidth, then you need VMs that are close to each other, so this stays within the same AZ.
On the other hand, if you don’t need that and want something that can survive a server crapping out, for example, then Spread Placement Groups. They are spread across different hardware.
And then there are the Partition placement groups, each partition is on a separate rack.
The last 2 things I wanted to talk about are that you can deploy VMware on AWS for Hybrid clouds, and there is something called AWS Outpost, where AWS sends some servers and install them on the customer premises, basically extending the AWS cloud to the premises.
Stay in the loop
Subscribe to get our latest content by email.
Success! Now check your email to confirm your subscription.