Wednesday, July 8, 2020

All you need to know about Amazons Network Load Balancer

All you need to know about Amazons Network Load Balancer All you need to know about Amazons Network Load Balancer Back Home Categories Online Courses Mock Interviews Webinars NEW Community Write for Us Categories Artificial Intelligence AI vs Machine Learning vs Deep LearningMachine Learning AlgorithmsArtificial Intelligence TutorialWhat is Deep LearningDeep Learning TutorialInstall TensorFlowDeep Learning with PythonBackpropagationTensorFlow TutorialConvolutional Neural Network TutorialVIEW ALL BI and Visualization What is TableauTableau TutorialTableau Interview QuestionsWhat is InformaticaInformatica Interview QuestionsPower BI TutorialPower BI Interview QuestionsOLTP vs OLAPQlikView TutorialAdvanced Excel Formulas TutorialVIEW ALL Big Data What is HadoopHadoop ArchitectureHadoop TutorialHadoop Interview QuestionsHadoop EcosystemData Science vs Big Data vs Data AnalyticsWhat is Big DataMapReduce TutorialPig TutorialSpark TutorialSpark Interview QuestionsBig Data TutorialHive TutorialVIEW ALL Blockchain Blockchain TutorialWhat is BlockchainHyperledger FabricWhat Is EthereumEthereum TutorialB lockchain ApplicationsSolidity TutorialBlockchain ProgrammingHow Blockchain WorksVIEW ALL Cloud Computing What is AWSAWS TutorialAWS CertificationAzure Interview QuestionsAzure TutorialWhat Is Cloud ComputingWhat Is SalesforceIoT TutorialSalesforce TutorialSalesforce Interview QuestionsVIEW ALL Cyber Security Cloud SecurityWhat is CryptographyNmap TutorialSQL Injection AttacksHow To Install Kali LinuxHow to become an Ethical Hacker?Footprinting in Ethical HackingNetwork Scanning for Ethical HackingARP SpoofingApplication SecurityVIEW ALL Data Science Python Pandas TutorialWhat is Machine LearningMachine Learning TutorialMachine Learning ProjectsMachine Learning Interview QuestionsWhat Is Data ScienceSAS TutorialR TutorialData Science ProjectsHow to become a data scientistData Science Interview QuestionsData Scientist SalaryVIEW ALL Data Warehousing and ETL What is Data WarehouseDimension Table in Data WarehousingData Warehousing Interview QuestionsData warehouse architectureTalend T utorialTalend ETL ToolTalend Interview QuestionsFact Table and its TypesInformatica TransformationsInformatica TutorialVIEW ALL Databases What is MySQLMySQL Data TypesSQL JoinsSQL Data TypesWhat is MongoDBMongoDB Interview QuestionsMySQL TutorialSQL Interview QuestionsSQL CommandsMySQL Interview QuestionsVIEW ALL DevOps What is DevOpsDevOps vs AgileDevOps ToolsDevOps TutorialHow To Become A DevOps EngineerDevOps Interview QuestionsWhat Is DockerDocker TutorialDocker Interview QuestionsWhat Is ChefWhat Is KubernetesKubernetes TutorialVIEW ALL Front End Web Development What is JavaScript รข€" All You Need To Know About JavaScriptJavaScript TutorialJavaScript Interview QuestionsJavaScript FrameworksAngular TutorialAngular Interview QuestionsWhat is REST API?React TutorialReact vs AngularjQuery TutorialNode TutorialReact Interview QuestionsVIEW ALL Mobile Development Android TutorialAndroid Interview QuestionsAndroid ArchitectureAndroid SQLite DatabaseProgramming s Network Load Balancer Last updated on Apr 24,2020 3.8K Views Kalgi Shah Kalgi Shah works at Edureka as Research Analyst. Always curious about the... Kalgi Shah works at Edureka as Research Analyst. Always curious about the wonders of technology. Fields like Artificial Intelligence, DevOps, Data Analytics, Kubernetes attract... Bookmark 11 / 11 Blog from AWS Compute Services Become a Certified Professional Web sites these days go viral within no time and such applications need to be prepared for both the extremes, worst and the best. In this blog, Im going to talk about how Network Load Balancer prepares your application for all kinds of traffic.Topics that Im going to cover in this blog:What Is Elastic Load Balancer?Types Of Elastic Load BalancerNetwork Load BalancerFeatures Of Network Load BalancerDemo to Create and Demonstrate the Working Of Network Load BalancerWhat Is Elastic Load Balancer?Before getting into what is Elastic Load Balancer, lets first understand the concept of Load balancing wi th a scenario based example. You enter a retail store, pick up things you need to buy and approach the billing counters. You see, there are 3 counters that are open and all 3 of them has a very long queue. The store manager sees you and other customers getting annoyed. He decides to open the other two counters. Now the load on those three counters gets reduced and eventually divided amongst the five counters. This makes the customers happy and reduces the cashiers workload. This is the concept of load balancing.Load balancing is efficiently distributing the incoming traffic across a group of backend servers. Amazon provides its very own service for load balancing called Elastic Load Balancer. Types of Elastic Load BalancersThere are three main types of Load Balancers provided by AWS. You can choose the one best suited for your requirement.Classic Load Balancer(CLB)This is the most basic form of Load Balancer which distributes incoming traffic between various EC2 instances in differe nt Availability Zones. This increases the fault tolerance of your application that is deployed on the EC2 instances. You can always add and remove instances from the load balancers as and when needed. Elastic Load Balancer scales the load balancer according to the incoming traffic(dynamically).Application Load Balancer(ALB)An application Load Balancer functions at the Application Layer of the OSI model, which is the seventh layer. You add listeners to your load balancers. Listener basically checks for connection requests from the clients and routes based on the rules youve defined. Rules consist of conditions, priority and target group. So basically when the listener finds a client connection, it checks for the defined condition and priority and routes the traffic to the target groups.Have a look at this blog which explains Application Load Balancer with a demonstration of how it works, to give you a better idea.Network Load Balancer(NLB)Network Load Balancer functions on the fourth layer of the OSI Model, i.e, the Transport Layer. Its capable of handling millions of client requests per second. It is best suited for treating volatile incoming traffic. It gives very low latency and hence considered to be one the best and most efficient Elastic Load Balancers.Network Load BalancerAs Ive mentioned earlier, Network Load Balancer functions on the fourth layer of the OSI Model. It can handle millions of client requests per second. Its considered to be the best and most efficient Load Balancer provided by AWS.Just like Application Load Balancer, Network Load Balancer also consists of listeners, that listens to the client connection requests. This Listener configuration specifies the port and protocol for making the front-end connections(Client to Network Load Balancer) as well as the back-end connections(Network Load Balancer to instances). Once the connection request is received, Network Load Balancer analyzes the rules defined by the user and picks a target group t o route the client request. The Network Load Balancer opens a TCP connection to the selected target by opening the port specified in listener configuration.You have an option to enable Availability Zone for your Network Load Balancer. When you do that, Elastic Load Balancer creates a Load Balancer Node in that particular Availability Zone. Each Load Balancer Node distributes traffic in that particular Availability Zone. If you enable multiple Availability Zones for your Network Load Balancer, each Load Balancer Node distributes traffic across the registered targets in multiple Availability Zones. This is called Cross Zone Load Balancer.Network Load Balancer selects target using the Hash Algorithm. This algorithm is based on the protocol, Source IP, Source Port, Destination IP, Destination port, TCP sequence number. So basically, your Network Load Balancer creates a Network Interface for each Availability Zone that youve enabled and each Load Balancer Node in that Availability Zone u ses this Network Interface to get the static IP address.Features Of Network Load BalancerConnection based Load Balancing Load Balancing of TCP traffic to targets like EC2 instances, microservices, containers, and IP addresses.High Availability If an unhealthy target is detected, then it stops routing to that unhealthy target and starts routing to the healthy target in the same or different Availability Zone based on the enabled Availability Zone.High Throughput Can handle sudden volatile traffic patterns.Low Latency Offers very low latency for applications whose performance depends on latency.Preserves Source IP Address Preserves client side IP address.Static IP Support Automatically provides a static IP per availability zone. This static IP can be used as the front-end IP of the load balancer by the deployed applications.Elastic IP Support Along with providing static IP, it also provides an option to assign an Elastic IP per Availability Zone.Health Checks Supports both app lication and network target health checks.DNS Fail-Over Network Load Balancer is integrated with Route53 and hence if it encounters any unhealthy targets, it re-routes the traffic to other healthy targets.Integration with AWS Services Network Load Balancer is integrated with other AWS services like AutoScaling, EC2 instances, CloudFormation, CodeDeploy, etc.Demo to Create and Demonstrate the Working Of Network Load BalancerLets understand the working of a Network Load balancer by creating it and demonstrating the routing of the traffic amongst different EC2 instances. Im going to create two EC2 instances, deploy Nginx web server on both of them, one which says server1 and the other one says server2 so that we can differentiate between the two.Lets start with creating a Network Load Balancer.Step 1: Create two EC2 instances and connect your EC2 instances with your either cmder or putty.Step 2: Now that youve created the EC2 instances, lets install Nginx web-servers on both of them. Execute the following commands on both your instances to install Nginx:$ sudo apt-get update $ sudo apt install nginx $ sudo ufw app list $ sudo ufw allow 'Nginx HTTP' $ sudo ufw statusThis should give you an output of status showing active.Step 3: Now when you visit the public IP of your instances you should see a page that says Welcome to Nginx. Since we need to differentiate between the two servers, let us change the display to Welcome to Nginx Server1 and on the other to Welcome to Nginx Server2.Go to the following directory:cd /var/www/html sudo vi index.nginx-debian.htmlChange the H1 tag from Welcome to Nginx to Welcome to Nginx Server1 on one instance and Welcome to Nginx Server2 on the other.Step 4: Lets finally create a Network Load Balancer.In the navigation pane, under LOAD BALANCING, choose Load Balancers.Choose Create Load Balancer.On the Select Load Balancer type page, choose Create Network Load BalancerLets Configure the Load Balancer. For Name, type the name you would like your Load Balancer to have. For Scheme either select Internet-facing or Internal. In this case, Ive chosen internet-facing. Internet-facing basically routes requests from clients to the target over the internet.For Listeners, the default is to accept TCP traffic on port 80 and Im continuing with the same default listener configuration. In case you want to add another listener, you can choose Add Listener.For configuring the Availability Zones, select the VPC that youve used to create your EC2 instances. If youve created your instances in different Availability Zones, then select those availability zones and subnet for that particular Availability Zones.Select on Next: Configure Security Settings.Youll see a warning as shown in the picture below. But its just a warning and you can ignore it.For Target Group, keep the default setting New Target Group.For Name, type in the name you would like your new Target Group to have.Set Protocol and Port as required.Leave the rest with the default settings.Click on Next: Register Targets.Register your instances with the target group and click on Next: Review. Review your Load Balancer and then finally click on Create.Youll see that your Load Balancer is getting provisioned.Give it a few minutes and youll see the status as active.Now that youve created the Load Balancer, lets test if its working fine. Copy your Load Balancers DNS Name and paste it on a search engine like a URL. You should see your first instances Nginx page.Now you go to another browser and paste the same DNS name as a URL, it should show you the second instances deployment.So now the load on both your EC2 instances will be handled by this Load Balancer. Another way to test the working of your Load Balancer is to shut one instance and check if its deployments are deployed on the Load Balancers DNS.This brings us to the end of this Network Load Balancer blog. I hope you guys have understood the concept behind this amazing service provided by Amazon. For more such blogs, visit Edureka | Blog.If you wish to learn more about Cloud Computing and build a career in Cloud Computing, then check out ourCloud Computing Courseswhichcomes with instructor-led live training and real-life project experience.This training will help you understand Cloud Computing in depth and help you achieve mastery over the subject.Got a question for us? Please mention it in the comments section and we will get back to youorpost your question atEdureka | Community.At Edureka Community we have more than 1,00,000+ tech-fanati cs ready to help.Recommended videos for you Microsoft Azure Tutorial Step-By-Step Tutorial In Azure Watch Now AWS Certifications All You Need To Know Watch Now Power The Hadoop Cluster With AWS Cloud Watch Now Architecting in Cloud-II Watch Now AWS vs Google Cloud Cloud Platform Compared Watch Now AWS Tutorial A Complete Tutorial On Amazon Web Services Watch Now What Is AWS Getting Started With AWS Watch Now What Is Cloud Computing? A Beginners Guide To Understanding Cloud Watch Now Architecting in Cloud-III Watch Now Efficient Disaster Recovery with Cloud Computing Watch Now AWS Vs Azure Cloud Platform Comparison Watch Now Building Scalable Application on Cloud Watch Now Cloud Computing with AWS II Watch NowRecommended blogs for you Microservices vs SOA : Whats the Difference Read Article Introduction to Amazon CloudWatch Read Article Azure Virtual Network For Beginners Securing Your Applications Using VPC Read Article 6 AWS Cloud Use Cases which are Revolutionizing Busine ss Read Article Introduction to Internet of Things: IoT Tutorial with IoT Application Read Article AWS Migration: Migrating An On-Premise Application To Cloud Read Article Top 50 Salesforce Interview Questions And Answers You Must Prepare In 2020 Read Article Everything You Need To Know About Microservices Design Patterns Read Article What Is Microservices Introduction To Microservice Architecture Read Article How To Restore EC2 From Snapshot? Read Article How To Develop A Chat Bot Using Amazon Lex? Read Article What Is ServiceNow? A Cloud Solution For Your Enterprise Read Article Salesforce Career Path: How To Bag Top Salesforce Jobs With Salesforce Certification Read Article Microservices Security How To Secure Your Microservice Infrastructure? Read Article Top 50 Azure Interview Questions You Must Prepare In 2020 Read Article Everything you need to know about Salesforce Certification Read Article Google Cloud Platform Tutorial : Getting Started With Google Cloud Platform Read A rticle AWS Lambda Tutorial: Your Guide To Amazon Serverless Computing Read Article Big Data In AWS Smart Solution For Big Data Read Article AWS vs Azure: What Is The Difference? Read Article Comments 0 Comments Trending Courses in Cloud Computing Microsoft Certified Expert: Azure Solutions A ...6k Enrolled LearnersWeekendLive Class Reviews 5 (2250)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.