Thursday, July 9, 2020
Elastic Load Balancer Tutorial- 1 step solution for the uncertain
Elastic Load Balancer Tutorial- 1 step solution for the uncertain Elastic Load Balancer Tutorial One Step Solution For The Uncertain 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 One Step Solution For T he Uncertain Last updated on Apr 24,2020 4.5K Views Priyaj Kumar Priyaj Kumar is an AWS aspirant working as a Research Analyst at... Priyaj Kumar is an AWS aspirant working as a Research Analyst at Edureka. He is working on different AWS services and has good knowledge... Bookmark 9 / 11 Blog from AWS Compute Services Become a Certified Professional In fiction, we find the predictable boring. In real life, we find the unpredictable terrifying. The best possible option is to be prepared for the uncertain. In this Elastic Load Balancer Tutorial, Ill talk about how Load Balancer comes to the rescue in such vulnerable and uncertain situations.Agenda for this Elastic Load Balancer Tutorial:What Is Load Balancing?Need for Load BalancingAlgorithms Used For Load BalancingDemo: Create A Load BalancerAlso, take a look at thecourse provided by Edureka.What Is Load Balancing?Amazon provides its own service for load balancing known as Elastic Load Balancer. Lets first talk about what is l oad balancing before digging into Elastic Load Balancer Tutorial.Suppose you have an application deployed on an EC2 instance which is getting limited traffic and hence youve allocated only limited resources to it. Fig 1 Elastic Load Balancer TutorialBut, what if you wake up one day and realize the tables have turned. What if, your application starts getting a lot of unexpected traffic? This is amazing, isnt it?But is your application ready for it? Can it handle so much traffic?Fig 2 Elastic Load Balancer TutorialWith the load balancing mechanism, yes!Fig 3 Elastic Load Balancer TutorialThe Load Balancer realized that theres too much traffic on that one service and the application might end up crashing. AWS has the feature of scaling up or scaling down the resources. Load balancer automatically scales up your resource which is sufficient enough to handle the large incoming traffic.Load Balancing refers to efficiently distributing incoming network traffic across a group of backend servers in a manner that increases speed and performance.The Elastic Load Balancer is similar to all the other load balancers. It basically serves the purpose of a single point of contact for the client. To make it simple, the client sends a request to the load balancer and it then distributes them to the targets like EC2, lambda function, etc in different Availability Zones.There are three types of Elastic Load Balancers available. You can use the one best suited for your work.Classic Load Balancer(CLB)This is the most basic form of the load balancer, that was used initially for classic EC2 instances. It is operated on connection level as well as request level. The main drawback of this type of load balancer is, it does not support features like host-based routing or path-based routing. Once the load balancer is configured, it balances load across the servers regardless of what is present on the server which might end up reducing the efficiency and performance in certain situations .Application Load BalancerThis type of Load Balancer is used when there are HTTP and HTTPS traffic routing. Im sure you guys are aware of the OSI Model. This load balancer works at the Application layer of the OSI Model. It provides advanced routing features such as host-based and path-based routing. It also works well with containers and microservices. Im going to show a demo on how to create an application load Balancer and demonstrate how the traffic is routed amongst the available servers further in this Elastic Load Balancer Tutorial.Network Load BalancerNetwork Load Balancer works at layer 4 of the OSI Model(connection level). Its mainly used for load balancing TCP traffic. This Load Balancer can handle millions of traffic and is best suited for maintaining low latencies. Its capable of handling uncertain traffic while maintaining a static IP address.Now that you know what is a load balancer, lets get to know why do we need it.Need For Load BalancingThe main use for an Elastic Load Balancer is to make your resources highly available. There are four types of forwarding rules that a user can assign to a load balancer, and they can be broken down as follows:HTTP It is the standard balancing request based on HTTP mechanism. It directs the traffic to the backend information for the original request.HTTPS It is the same as the HTTP forwarding rule with an additional feature of encryption. Encryption here is handled in one of the two ways: SSL Passthrough (encryption is all the way to backend) and SSL termination (encryption is done by the load balancer). In SSL termination, the traffic is sent to backend unencrypted.UDP A UDP Load Balancer uses User Datagram protocol which provides low latency for applications. TCP TCP is used for Load Balancing all the applications that do not use protocols like HTTP and HTTPScing.Now that you understand the working of a load balancer, lets learn the algorithms that govern load balancing. Let me guide you through each of the algorithms used for load balancing.Algorithms Used For Load BalancingRound Robin It is the simplest algorithm used to distribute the clients request across a group of servers. Round Robin will first traverse the list of server in the group and then forward the client request to each server one by one and once it reaches the end of the list, it will again start from the top of the list. There are two variations of the Round Robin algorithm:Weighted Round Robin: Weight is assigned to each server based on some criteria and servers are chosen accordingly.Dynamic Round Robin: Weight is assigned dynamically based on real-time data like current load and idle capacity.Least Connections When a load balancer is configured to use the least connection algorithm, it selects a server with the least number of connections to serve the request. This way it ensures that the load is balanced equally among the servers.Source This algorithm basically selects a server based on a hash of source IP request s e.g. Clients IP address. This way Source Algorithm makes sure that the request from a particular IP is served by a particular server only.Interesting, isnt it? These are the different algorithms that work on the backend to make your service available.Lets move further and create a Web page and use a load balancer to make it highly available.Demo: Create An Application Load BalancerIt this demo, I will create 2 EC2 instances and will make them work like servers. I will then host a Web page on each of them. By using a load balancer, I will handle the request to my web page. So, lets dig deep into this load balancer tutorial and find out how to implement the above-said scenario.Step 1: Create an EC2 Instance.Choose EC2 in AWS Console like shown below.Click on Launch Instance to launch an instance.Select the Amazon Machine Image best suited for you. For this demo, Ive used the Amazon Linux 2 image, as highlighted in the image below.Choose the Type of Instance. In this case, Ive used t 2.micro.Configure the Instance Details. Add the number of instances you wish to create and choose the network and the subnet you wish to use.Now Add Storage. You will not require more than 8GB for this Demo.You can Add Tags to identify your instances. This step is optional.You have to Configure Security Group and make sure you have permissions for SSH, TCP HTTP.Click on Review Instance Launch to launch the instance.The final step Choose a Key Pair or create a new key pair. You can either choose from an existing key pair or create a new key pair which is required to create an instance.Step 2: Access your Instance.See how to access your EC2 instance using Putty here.Step 3: Install HTTPD in your instance. Here are the commands you need to run.$ sudo yum install httpd $ sudo service httpd start $ sudo chkconfig httpd on $ sudo service httpd statusStep 4: Create an HTML file named index.htmlHere is the code I used. html head h1Hello Community!/h1 h2This is our First Server/h2/head body bgcolor=#98fb98 a href=https://www.edureka.co/community/amp;gt;Visit Edureka | Community /a /body /html html head h1Hello Community!/h1 h2This is our Second Server/h2/head body bgcolor=#5DBCD2 a href=https://www.edureka.co/community/ Visit Edureka | Community /a /body /html Use the same file just change the servers number so that you can understand how is your request served. Step 5:Create a Load Balancer.Navigate to Load Balancing and click on Create Load Balancer.Select the Load balancer type. In this case, Ive used the HTTP/HTTPS.You have to Configure your load balancer. Add name, Schema and IP address type(which is IPV4) in this case.Select your VPC for Configure Load Balancer. Add your VPC and Availability Zones.Now you have to Configure Security Settings. Youll be prompted a warning as displayed in the picture below. This warning is just to let you know that you should use HTTPS instead of HTTP.To configure Security Groups, start by assigning a security group.Now the main part, Configure Routing. Configure the routing as shown below in the image.Now, just add your instance, i.e. Register Targets.The final step Review all the settings if theyre fine.Now, wait for 3-5 mins for the load balancer to configure.Step 6:Select the DNS from the description . Paste it as a URL in your browser.And you should see something similar to the above image. It says This is our First server, indicating the web page got deployed on the first server. Hit Refresh and youll find another page(shown in the image below) being displayed which shows that the web page got deployed on the second server.You can see how Load balancer diverts the traffic to different servers to service the request from users. I hope you liked this blog about Elastic Load Balancer Tutorial. 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-fanatics ready to help.Recommended videos for you What Is Cloud Computing? A Beginners Guide To Understanding Cloud Watch Now Microsoft Azure Tutorial Step-By-Step Tutorial In Azure Watch Now AWS Vs Azure Cloud Platform Comparison Watch Now AWS Tutorial A Complete Tutorial On Amazon Web Services Watch Now Power The Hadoop Cluster With AWS Cloud Watch Now What Is AWS Getting Started With AWS Watch Now Efficient Disaster Recovery with Cloud Computing Watch Now Architecting in Cloud-III Watch Now Architecting in Cloud-II Watch Now Cloud Computing with AWS II Watch Now AWS vs Google Cloud Cloud Platform Compared Watch Now AWS Certifications All You Need To Know Watch Now Building Scalable Application on Cloud Watch NowRecommended blogs for you Introduction to Cloud Computing with AWS Read Article Microsoft Azure Tutorial Cloud Computing With Azure Read Article Salesforce Certifications: Jump-Start Your Career In Salesforce Rea d Article Creating Highly Available Websites using AWS Global Infrastructure Read Article Everything You Need To Know About Instances In AWS Read Article 6 AWS Cloud Use Cases which are Revolutionizing Business Read Article AWS Resume: How To Make Your Professional Parchment Look Attractive? Read Article AWS Salary: How Much Does An AWS Professional Make? Read Article Cloud Security: A Guide for Cloud Users Read Article Cloud Computing Services: A Deeper Dive Into Cloud Computing Read Article Top 50 Microservices Interview Questions You Must Prepare In 2020 Read Article How To Secure Web Applications With AWS WAF? Read Article Introduction to Amazon CloudFormation Read Article Building A Kubernetes App With Amazon EKS Read Article AWS Certification â" All you need to know Read Article AWS Tutorial: Introduction to Cloud Computing Read Article What Is Amazon Athena? The New Serverless Data Analytics Tool Read Article What is Google Cloud Platform (GCP)? Introduction to GCP Service s GCP Account Read Article What is Identity and Access Management(IAM) in AWS? Read Article Raspberry Pi Tutorial: Getting Started with Raspberry Pi Read Article Comments 0 Comments Trending Courses in Cloud Computing Microsoft Certified Expert: Azure Solutions A ...6k Enrolled LearnersWeekendLive Class Reviews 5 (2250)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.