Showing posts with label ENI. Show all posts
Showing posts with label ENI. Show all posts

AWS ENI - Query from Viewers -- 005

Hi guys, 

I have got following doubts from one of our viewers on this video -- 


So by adding multiple ENI to AN INSTANCE 
1. Still its a single point of failure, Where in if the instance fails, all the attached ENI also fails right? 
ANS: Yes, if instance fails all the ENIs attached to that instance would not be of any use. Mutiple ENIs do not increase Availability or Bandwidth of the machine. Rather, they are there for the isolation purpose.

2. Normally in an ON-PREM INFRA, we used to have muti NIC for the webserver not to have a single point of failure in case of one NIC CARD fails? Where as in AWS its a virtual world and I assume its a managed service right? we don't have to worry about the Primary failing at all ? 
ANS: On AWS, we handle that scenario via Auto-scaling Group. So that if a machine becomes unreachable, another instance takes its place. 

3. Why should we disable the SOURCE/DESTINATION CHECK FLAG for the ENI? I think we disable the "SOURCE/DESTINATION" only when we create a NAT INSTANCE, that's right? 
ANS: That's correct. Other than NAT, you do not have to disable it. 

4. The primary ENI can't be detached, Becoz that's the one which makes the instance to have a public and/or private IP right? 
ANS: Not so. It is more of a restriction from AWS implementation perspective. In future, they might start allowing it (as you can detach ROOT EBS volume for a stopped machine).

5. So the best use case for multi eni would be, Where in a. In a single large instance with multi ENI, that one instance can be part of both private and public subnet b. Having said that, I can have web server facing the internet in the public ENI and the database also in the same instance in the private ENI and configure the security group accordingly. 
ANS: Sorry, Incorrect! When you create ENI, you can see that its scope is a Subnet (same way scope of an EC2 is also Subnet). Hence, an EC2 and an ENI would be there only in one subnet (not two). 
You can use multi ENI to give 2 different IPs to 2 different user groups. E.g. On an EC2 open port 8080 on IP1 and port 22 on IP2. Also, attach different security groups in above ENIs. Hence, the users would never know they are accessing the same machine. 

 6. So with multiNIC, I can have multiple websites on the same server, with each Nic attached to one website?
ANS: You can have multiple websites on one machine even without multi-NIC. Different webservers (like IIS) support the same. 

Getting started with Amazon EC2 (AWS Compute Service)

EC2 (Elastic Compute Cloud) is equivalent of servers (on-premises). There are many attributes we need to provide while creating an EC2; e.g. instance type, AMI id, subnet id, security group etc. This tutorial explains you above concepts in detail and shows you how to launch an EC2 in default VPC. (Click here to learn how to create a custom VPC)


Tenancy is a critical attribute to understand in case of EC2 instances. There are 3 tenancy models available:

  1. Shared (or Default)
  2. Dedicated Instances
  3. Dedicated Host
Many of the learners remain confused on the tenancy models of EC2. Learn them quickly in this video and understand when to use which Tenancy model. Please do read the description of the video. It is important to understand Tenancy as to satisfy any compliance standards your organisation might require.


An EC2 instance will always have a Private IP address. In addition to this, it can be allocated a Public IP address as well. But, the Public IP changes if instance is stopped and started. It does not change on reboot though. If you want a Public IP which should not change on every stop & start, you can make use of Elastic IP. Elastic IP costs you only when it is not attached to an instance, or when it is attached to a stopped instance. You should understand clearly the difference between 3 types of IP on AWS, please watch this video.


Along with EC2, an Elastic Network Interface (ENI) gets created automatically (this is called Primary ENI for the instance). This is virtualized form of Network Interface Card (NIC). Every ENI will have a Private IP, which is called the primary IP of that ENI. You can add more secondary IPs on an ENI as well. You can attach multiple ENIs to an EC2 instance as well. The primary ENI can never be detached from an EC2 instance. You should learn how to work with ENI in the following video:


At last, in terms of EC2 you should understand the different pricing models available. There are 6 pricing models with EC2 instances and understanding them saves you from all the future bill related surprises. All 6 different models are explained here concisely.


When it comes to AWS EC2 reservation, you need to learn different options which are available. AWS offers multiple options to suit your needs and save money for you. You can understand in following video, with examples, which type of reservation you should take for a given scenario.


RECENT UPDATES

AWS announced few new features on EC2 recently, you can understand those in quick 10-15 below.




Happy learning AWS !!! Please comment down for any doubts. Don't forget to SHARE this URL with your friends. 

Selected videos!