SlideShare a Scribd company logo
1 of 16
How To Configure Amazon EC2 Load Balancer
i | P a g e
Table of Contents
Overview ...........................................................................................................................................1
Applies To..........................................................................................................................................1
Pre-requisites.....................................................................................................................................1
Launch Instance..................................................................................................................................1
System Update...................................................................................................................................1
Node #1 – OS Packages Update....................................................................................................1
Node #2 – OS Packages Update....................................................................................................2
NTP Configuration ..............................................................................................................................2
System Date Time...............................................................................................................................3
Install – Web Server............................................................................................................................3
Webserver – Index File........................................................................................................................4
Add Node #1 – Content ...............................................................................................................4
Add Node #2 – Content ...............................................................................................................4
LoadBalancer......................................................................................................................................5
Load Balancer – Create LoadBalancer...............................................................................................5
Load Balancer – Definition...............................................................................................................5
Define LoadBalancer Name..........................................................................................................5
Create – Internal LoadBalancer....................................................................................................6
Create – Enable advanced VPC Configuration – Select Subnets.......................................................6
Create – Enable advanced VPC Configuration – Selected Subnets...................................................7
Verify – Security Group................................................................................................................7
Create – Assign Security Group ....................................................................................................8
Create – Configure Security Settings.............................................................................................8
Create – Configure Health Check..................................................................................................9
Create – Configure Health Check - Advanced.................................................................................9
Create – Configure Health Check - Advanced...............................................................................10
Create – Add Tag.......................................................................................................................10
Create – Review ........................................................................................................................11
Create – Creation Status – Progress............................................................................................11
How To Configure Amazon EC2 Load Balancer
ii | P a g e
Create – Creation Status – Successful .........................................................................................12
LoadBalancer – DNS Name................................................................................................................12
LoadBalancer – Test – First Request...............................................................................................12
LoadBalancer – Test – Second Request...........................................................................................12
Load Balancer – Instance Status.........................................................................................................13
Load Balancer – Availability Configured..............................................................................................13
Load Balancer – Remove Subnet........................................................................................................14
How To Configure Amazon EC2 Load Balancer
1 | P a g e
Overview
The purpose of thisdocumentis to configure AmazonAWSLoadBalancer with2 nodes(instance).Inthis
guide we will install apahce2 webserver on both the nodes to test the availability. The main purpose of
loadbalancer is service high availability.
Applies To
Amazon EC2 Instance
Pre-requisites
A minimum of 2 EC2 instances have to be running. In this document we would be configuring Linux
Operating System.
Launch Instance
Launch 2 instances of a Linux Operating System and start the instance.
System Update
Loginwiththe public IP address and update the operating system packages. Run the below command.
sudo yum update
Node #1 – OS Packages Update
How To Configure Amazon EC2 Load Balancer
2 | P a g e
Node #2 – OS Packages Update
NTP Configuration
Nextstepisto ensure NTPis configuredandTime serverisenabledtoverifyrunthe below commandon
both nodes.
cat /etc/ntp.conf | grep ^server
How To Configure Amazon EC2 Load Balancer
3 | P a g e
System Date Time
Next step is to ensure date and Time on both nodes are in sync and are set to same timezone (UTC).
Install – Web Server
After updating operating system “install web server”, to install the webserver group run the below
command on both the nodes (instances).
yum groupinstall -y "Web Server"
How To Configure Amazon EC2 Load Balancer
4 | P a g e
Webserver – Index File
Create a new “index.html” file in “/var/www/html” directory to create run the below command, run on
both the nodes.
cd /var/www/html
touch index.html
chmod 755 index.html
Add Node #1 – Content
Edit the “index.html” and a line to be displayed upon request from the browser.
<HTML>
<BODY>
<H1> This is message is from node ...... <i> One </i>
</BODY>
</HTML>
Add Node #2 – Content
Edit the “index.html” and a line to be displayed upon request from the browser.
<HTML>
<BODY>
<H1> This is message is from node ...... <i> Two </i>
</BODY>
</HTML>
How To Configure Amazon EC2 Load Balancer
5 | P a g e
LoadBalancer
The purpose of load balancer is to ensure service is
Load Balancer – Create LoadBalancer
Navigate to “Network & Security  Load Balancers” and click on “Create Load Balancer” button.
Load Balancer – Definition
Define LoadBalancer Name
In this step you need to define the loadbalancer name and Create LB inside (which inside network).
How To Configure Amazon EC2 Load Balancer
6 | P a g e
Create – Internal LoadBalancer
This option is to enable the loadbalancer only within the internal network. Ideally we configure load
balancer to the internet facing ones. Hence we would not choose the option.
Create – Enable advanced VPC Configuration – Select Subnets
This option is to enable the loadbalancer available to other availability zones and choose other zonesif
you need configure for higher availability.
How To Configure Amazon EC2 Load Balancer
7 | P a g e
Create – Enable advanced VPC Configuration – Selected Subnets
Choose the availability zones from different subnets, if needed for higher availability.
Verify – Security Group
In this guide,we are configuringhttpdservice,we needto ensure thatport 80 is openfrom the security
groups.
How To Configure Amazon EC2 Load Balancer
8 | P a g e
Create – Assign Security Group
Choose existing security groups or create new security group, if you opt to choose create new security
group ensure Port “80” rule is added.
Create – Configure Security Settings
In this guide we are configuring simple Load balancer without security feature. In order to configure
security you could configure HTTPS or SSL protocol for secured connections.
How To Configure Amazon EC2 Load Balancer
9 | P a g e
Create – Configure Health Check
Type of protocol “HTTP” and on port “80” and file “/index.html” that would be verified.
Create – Configure Health Check - Advanced
Inthissectionyouneedconfigureloadbalancerparameters,suchasResponseTimeout,intervalandother
parameters.
How To Configure Amazon EC2 Load Balancer
10 | P a g e
Create – Configure Health Check - Advanced
Nextstepwouldbe addthe EC2 instancesintothe loadbalancer.Clickonthe nodes thathasto be part of
the load balancer.
Create – Add Tag
Next step would be add tag to the loadbalancer.
How To Configure Amazon EC2 Load Balancer
11 | P a g e
Create – Review
Review the loadbalancer and click on “Create” button.
Create – Creation Status – Progress
Upon clicking “Create” button; Loadbalancer creation progress is displayed.
How To Configure Amazon EC2 Load Balancer
12 | P a g e
Create – Creation Status – Successful
After configuring the loadbalancer, loadbalancer will be created.
LoadBalancer – DNS Name
After creating loadbalancer successfully, DNS Name will be associated.
LoadBalancer – Test – First Request
Launch the DNS Name from the browser; the request is fetched from node One.
LoadBalancer – Test – Second Request
Launch the DNS Name from the browser; the request is fetched from node Two.
How To Configure Amazon EC2 Load Balancer
13 | P a g e
Load Balancer – Instance Status
From the load balancer choose the “effonelb”, click on the “Instances” to know the status of nodes.
s
Load Balancer – Availability Configured
From the load balancer choose the “effonelb”, click on the “Instances” to know the availability zones
configured.
How To Configure Amazon EC2 Load Balancer
14 | P a g e
Load Balancer – Remove Subnet
To remove zone(s) from the configured availability zones, click on “Remove from Load Balancer”.

More Related Content

What's hot

How To Configure Amazon EC2 Load Balancer
How To Configure Amazon EC2 Load BalancerHow To Configure Amazon EC2 Load Balancer
How To Configure Amazon EC2 Load BalancerVCP Muthukrishna
 
How to connect amazon aws ec2 with key pair – linux
How to connect amazon aws ec2 with key pair – linuxHow to connect amazon aws ec2 with key pair – linux
How to connect amazon aws ec2 with key pair – linuxVCP Muthukrishna
 
How To Install and Configure Apache SSL on CentOS 7
How To Install and Configure Apache SSL on CentOS 7How To Install and Configure Apache SSL on CentOS 7
How To Install and Configure Apache SSL on CentOS 7VCP Muthukrishna
 
How To Check IE Enhanced Security Is Enabled Windows PowerShell
How To Check IE Enhanced Security Is Enabled Windows PowerShellHow To Check IE Enhanced Security Is Enabled Windows PowerShell
How To Check IE Enhanced Security Is Enabled Windows PowerShellVCP Muthukrishna
 
How To Configure FirewallD on RHEL 7 or CentOS 7
How To Configure FirewallD on RHEL 7 or CentOS 7How To Configure FirewallD on RHEL 7 or CentOS 7
How To Configure FirewallD on RHEL 7 or CentOS 7VCP Muthukrishna
 
How To Create PowerShell Function
How To Create PowerShell FunctionHow To Create PowerShell Function
How To Create PowerShell FunctionVCP Muthukrishna
 
How To List Nginx Modules Installed / Complied on CentOS 7
How To List Nginx Modules Installed / Complied on CentOS 7How To List Nginx Modules Installed / Complied on CentOS 7
How To List Nginx Modules Installed / Complied on CentOS 7VCP Muthukrishna
 
How To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShellHow To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShellVCP Muthukrishna
 
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7VCP Muthukrishna
 
reModernize-Updating and Consolidating MySQL
reModernize-Updating and Consolidating MySQLreModernize-Updating and Consolidating MySQL
reModernize-Updating and Consolidating MySQLAmazon Web Services
 
Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL Amazon Web Services
 
Guide - Migrating from Heroku to AWS using CloudFormation
Guide - Migrating from Heroku to AWS using CloudFormationGuide - Migrating from Heroku to AWS using CloudFormation
Guide - Migrating from Heroku to AWS using CloudFormationRob Linton
 
Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7VCP Muthukrishna
 
Hands-on Lab: re-Modernize - Updating and Consolidating MySQL
Hands-on Lab: re-Modernize - Updating and Consolidating MySQLHands-on Lab: re-Modernize - Updating and Consolidating MySQL
Hands-on Lab: re-Modernize - Updating and Consolidating MySQLAmazon Web Services
 
Windows PowerShell Basics - How To List PSDrive Info
Windows PowerShell Basics - How To List PSDrive InfoWindows PowerShell Basics - How To List PSDrive Info
Windows PowerShell Basics - How To List PSDrive InfoVCP Muthukrishna
 
Secure360 - Beyond xp cmdshell - Owning the Empire through SQL Server
Secure360 - Beyond xp cmdshell - Owning the Empire through SQL ServerSecure360 - Beyond xp cmdshell - Owning the Empire through SQL Server
Secure360 - Beyond xp cmdshell - Owning the Empire through SQL ServerScott Sutherland
 
PowerUpSQL - 2018 Blackhat USA Arsenal Presentation
PowerUpSQL - 2018 Blackhat USA Arsenal PresentationPowerUpSQL - 2018 Blackhat USA Arsenal Presentation
PowerUpSQL - 2018 Blackhat USA Arsenal PresentationScott Sutherland
 
2019 Blackhat Booth Presentation - PowerUpSQL
2019 Blackhat Booth Presentation - PowerUpSQL2019 Blackhat Booth Presentation - PowerUpSQL
2019 Blackhat Booth Presentation - PowerUpSQLScott Sutherland
 
Moving Drupal to the Cloud
Moving Drupal to the CloudMoving Drupal to the Cloud
Moving Drupal to the CloudAri Davidow
 

What's hot (20)

How To Configure Amazon EC2 Load Balancer
How To Configure Amazon EC2 Load BalancerHow To Configure Amazon EC2 Load Balancer
How To Configure Amazon EC2 Load Balancer
 
How to connect amazon aws ec2 with key pair – linux
How to connect amazon aws ec2 with key pair – linuxHow to connect amazon aws ec2 with key pair – linux
How to connect amazon aws ec2 with key pair – linux
 
How To Install and Configure Apache SSL on CentOS 7
How To Install and Configure Apache SSL on CentOS 7How To Install and Configure Apache SSL on CentOS 7
How To Install and Configure Apache SSL on CentOS 7
 
How To Check IE Enhanced Security Is Enabled Windows PowerShell
How To Check IE Enhanced Security Is Enabled Windows PowerShellHow To Check IE Enhanced Security Is Enabled Windows PowerShell
How To Check IE Enhanced Security Is Enabled Windows PowerShell
 
How To Configure FirewallD on RHEL 7 or CentOS 7
How To Configure FirewallD on RHEL 7 or CentOS 7How To Configure FirewallD on RHEL 7 or CentOS 7
How To Configure FirewallD on RHEL 7 or CentOS 7
 
How To Create PowerShell Function
How To Create PowerShell FunctionHow To Create PowerShell Function
How To Create PowerShell Function
 
How To List Nginx Modules Installed / Complied on CentOS 7
How To List Nginx Modules Installed / Complied on CentOS 7How To List Nginx Modules Installed / Complied on CentOS 7
How To List Nginx Modules Installed / Complied on CentOS 7
 
How To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShellHow To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShell
 
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
 
User guide
 User guide User guide
User guide
 
reModernize-Updating and Consolidating MySQL
reModernize-Updating and Consolidating MySQLreModernize-Updating and Consolidating MySQL
reModernize-Updating and Consolidating MySQL
 
Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL
 
Guide - Migrating from Heroku to AWS using CloudFormation
Guide - Migrating from Heroku to AWS using CloudFormationGuide - Migrating from Heroku to AWS using CloudFormation
Guide - Migrating from Heroku to AWS using CloudFormation
 
Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7
 
Hands-on Lab: re-Modernize - Updating and Consolidating MySQL
Hands-on Lab: re-Modernize - Updating and Consolidating MySQLHands-on Lab: re-Modernize - Updating and Consolidating MySQL
Hands-on Lab: re-Modernize - Updating and Consolidating MySQL
 
Windows PowerShell Basics - How To List PSDrive Info
Windows PowerShell Basics - How To List PSDrive InfoWindows PowerShell Basics - How To List PSDrive Info
Windows PowerShell Basics - How To List PSDrive Info
 
Secure360 - Beyond xp cmdshell - Owning the Empire through SQL Server
Secure360 - Beyond xp cmdshell - Owning the Empire through SQL ServerSecure360 - Beyond xp cmdshell - Owning the Empire through SQL Server
Secure360 - Beyond xp cmdshell - Owning the Empire through SQL Server
 
PowerUpSQL - 2018 Blackhat USA Arsenal Presentation
PowerUpSQL - 2018 Blackhat USA Arsenal PresentationPowerUpSQL - 2018 Blackhat USA Arsenal Presentation
PowerUpSQL - 2018 Blackhat USA Arsenal Presentation
 
2019 Blackhat Booth Presentation - PowerUpSQL
2019 Blackhat Booth Presentation - PowerUpSQL2019 Blackhat Booth Presentation - PowerUpSQL
2019 Blackhat Booth Presentation - PowerUpSQL
 
Moving Drupal to the Cloud
Moving Drupal to the CloudMoving Drupal to the Cloud
Moving Drupal to the Cloud
 

Similar to How to configure amazon ec2 load balancer

How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7VCP Muthukrishna
 
Sun_AmazonEC2_GettingStartedGuide
Sun_AmazonEC2_GettingStartedGuideSun_AmazonEC2_GettingStartedGuide
Sun_AmazonEC2_GettingStartedGuideHiroshi Ono
 
ArcMC for AWS 2.2 P1 Setup Guide
ArcMC for AWS 2.2 P1 Setup GuideArcMC for AWS 2.2 P1 Setup Guide
ArcMC for AWS 2.2 P1 Setup GuideProtect724mouni
 
Spring boot-application
Spring boot-applicationSpring boot-application
Spring boot-applicationParag Patil
 
How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012Chen-Tien Tsai
 
AWS Instance Preparation
AWS Instance PreparationAWS Instance Preparation
AWS Instance PreparationEbizon
 
Aws overview part 2(compute services)
Aws overview   part 2(compute services)Aws overview   part 2(compute services)
Aws overview part 2(compute services)Parag Patil
 
AngularJS Unit Test
AngularJS Unit TestAngularJS Unit Test
AngularJS Unit TestChiew Carol
 
Automated Amazon EC2 Cloud deployments with openQRM
Automated Amazon EC2 Cloud deployments with openQRMAutomated Amazon EC2 Cloud deployments with openQRM
Automated Amazon EC2 Cloud deployments with openQRMopenQRM Enterprise GmbH
 
Aws project jenkins-build-server
Aws project jenkins-build-serverAws project jenkins-build-server
Aws project jenkins-build-serversaifam
 
Final Report To Executive ManagersXXXXXCCA 625Un
Final Report To Executive ManagersXXXXXCCA 625UnFinal Report To Executive ManagersXXXXXCCA 625Un
Final Report To Executive ManagersXXXXXCCA 625UnChereCheek752
 
Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2
Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2
Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2Amazon Web Services
 
AutoScaling and Drupal
AutoScaling and DrupalAutoScaling and Drupal
AutoScaling and DrupalPromet Source
 
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWSConfiguring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWSPuppet
 
AWS Certified Solutions Architect Associate Exam Guide 1st Edition 2024_KIRAN...
AWS Certified Solutions Architect Associate Exam Guide 1st Edition 2024_KIRAN...AWS Certified Solutions Architect Associate Exam Guide 1st Edition 2024_KIRAN...
AWS Certified Solutions Architect Associate Exam Guide 1st Edition 2024_KIRAN...Kiran Kumar Malik
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntukesavan N B
 
Glassfish JEE Server Administration - Module 4 Load Balancer
Glassfish JEE Server Administration - Module 4 Load BalancerGlassfish JEE Server Administration - Module 4 Load Balancer
Glassfish JEE Server Administration - Module 4 Load BalancerDanairat Thanabodithammachari
 

Similar to How to configure amazon ec2 load balancer (20)

How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7
 
AWS essentials EC2
AWS essentials EC2AWS essentials EC2
AWS essentials EC2
 
Sun_AmazonEC2_GettingStartedGuide
Sun_AmazonEC2_GettingStartedGuideSun_AmazonEC2_GettingStartedGuide
Sun_AmazonEC2_GettingStartedGuide
 
ArcMC for AWS 2.2 P1 Setup Guide
ArcMC for AWS 2.2 P1 Setup GuideArcMC for AWS 2.2 P1 Setup Guide
ArcMC for AWS 2.2 P1 Setup Guide
 
Spring boot-application
Spring boot-applicationSpring boot-application
Spring boot-application
 
How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012
 
AWS Instance Preparation
AWS Instance PreparationAWS Instance Preparation
AWS Instance Preparation
 
Aws overview part 2(compute services)
Aws overview   part 2(compute services)Aws overview   part 2(compute services)
Aws overview part 2(compute services)
 
AngularJS Unit Test
AngularJS Unit TestAngularJS Unit Test
AngularJS Unit Test
 
Automated Amazon EC2 Cloud deployments with openQRM
Automated Amazon EC2 Cloud deployments with openQRMAutomated Amazon EC2 Cloud deployments with openQRM
Automated Amazon EC2 Cloud deployments with openQRM
 
Aws project jenkins-build-server
Aws project jenkins-build-serverAws project jenkins-build-server
Aws project jenkins-build-server
 
Final Report To Executive ManagersXXXXXCCA 625Un
Final Report To Executive ManagersXXXXXCCA 625UnFinal Report To Executive ManagersXXXXXCCA 625Un
Final Report To Executive ManagersXXXXXCCA 625Un
 
Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2
Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2
Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2
 
Lampstack (1)
Lampstack (1)Lampstack (1)
Lampstack (1)
 
AutoScaling and Drupal
AutoScaling and DrupalAutoScaling and Drupal
AutoScaling and Drupal
 
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWSConfiguring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
 
AWS Certified Solutions Architect Associate Exam Guide 1st Edition 2024_KIRAN...
AWS Certified Solutions Architect Associate Exam Guide 1st Edition 2024_KIRAN...AWS Certified Solutions Architect Associate Exam Guide 1st Edition 2024_KIRAN...
AWS Certified Solutions Architect Associate Exam Guide 1st Edition 2024_KIRAN...
 
Auto Scaling on AWS
Auto Scaling on AWSAuto Scaling on AWS
Auto Scaling on AWS
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntu
 
Glassfish JEE Server Administration - Module 4 Load Balancer
Glassfish JEE Server Administration - Module 4 Load BalancerGlassfish JEE Server Administration - Module 4 Load Balancer
Glassfish JEE Server Administration - Module 4 Load Balancer
 

More from VCP Muthukrishna

How to Fix Duplicate Packages in YUM on CentOS 7
How to Fix Duplicate Packages in YUM on CentOS 7How to Fix Duplicate Packages in YUM on CentOS 7
How to Fix Duplicate Packages in YUM on CentOS 7VCP Muthukrishna
 
How To Install and Configure GNome on CentOS 7
How To Install and Configure GNome on CentOS 7How To Install and Configure GNome on CentOS 7
How To Install and Configure GNome on CentOS 7VCP Muthukrishna
 
How To Connect to Active Directory User Validation
How To Connect to Active Directory User ValidationHow To Connect to Active Directory User Validation
How To Connect to Active Directory User ValidationVCP Muthukrishna
 
How To Connect To Active Directory PowerShell
How To Connect To Active Directory PowerShellHow To Connect To Active Directory PowerShell
How To Connect To Active Directory PowerShellVCP Muthukrishna
 
How To List Files on Remote Server - PowerShell
How To List Files on Remote Server - PowerShellHow To List Files on Remote Server - PowerShell
How To List Files on Remote Server - PowerShellVCP Muthukrishna
 
How To List Files and Display In HTML Format
How To List Files and Display In HTML FormatHow To List Files and Display In HTML Format
How To List Files and Display In HTML FormatVCP Muthukrishna
 
How To Check and Delete a File via PowerShell
How To Check and Delete a File via PowerShellHow To Check and Delete a File via PowerShell
How To Check and Delete a File via PowerShellVCP Muthukrishna
 
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...VCP Muthukrishna
 
How To Setup SSH Keys on CentOS 7
How To Setup SSH Keys on CentOS 7How To Setup SSH Keys on CentOS 7
How To Setup SSH Keys on CentOS 7VCP Muthukrishna
 
How To Install and Configure Open SSH Server on Ubuntu
How To Install and Configure Open SSH Server on UbuntuHow To Install and Configure Open SSH Server on Ubuntu
How To Install and Configure Open SSH Server on UbuntuVCP Muthukrishna
 
Windows PowerShell Basics – How To Create powershell for loop
Windows PowerShell Basics – How To Create powershell for loopWindows PowerShell Basics – How To Create powershell for loop
Windows PowerShell Basics – How To Create powershell for loopVCP Muthukrishna
 
How To Construct IF and Else Conditional Statements
How To Construct IF and Else Conditional StatementsHow To Construct IF and Else Conditional Statements
How To Construct IF and Else Conditional StatementsVCP Muthukrishna
 
How To Create PowerShell Function Mandatory Parameter and Optional Parameter
How To Create PowerShell Function Mandatory Parameter and Optional ParameterHow To Create PowerShell Function Mandatory Parameter and Optional Parameter
How To Create PowerShell Function Mandatory Parameter and Optional ParameterVCP Muthukrishna
 
How To Create Power Shell Function Mandatory Parameter Value
How To Create Power Shell Function Mandatory Parameter ValueHow To Create Power Shell Function Mandatory Parameter Value
How To Create Power Shell Function Mandatory Parameter ValueVCP Muthukrishna
 
How To Disable IE Enhanced Security Windows PowerShell
How To Disable IE Enhanced Security Windows PowerShellHow To Disable IE Enhanced Security Windows PowerShell
How To Disable IE Enhanced Security Windows PowerShellVCP Muthukrishna
 
Nginx bind() to 0.0.0.0:9080 failed
Nginx bind() to 0.0.0.0:9080 failedNginx bind() to 0.0.0.0:9080 failed
Nginx bind() to 0.0.0.0:9080 failedVCP Muthukrishna
 
How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7VCP Muthukrishna
 
How To Install and Configure Salt Master on Ubuntu
How To Install and Configure Salt Master on UbuntuHow To Install and Configure Salt Master on Ubuntu
How To Install and Configure Salt Master on UbuntuVCP Muthukrishna
 
How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7VCP Muthukrishna
 
How To Configure SNMP Logging on RHEL 7
How To Configure SNMP Logging on RHEL 7How To Configure SNMP Logging on RHEL 7
How To Configure SNMP Logging on RHEL 7VCP Muthukrishna
 

More from VCP Muthukrishna (20)

How to Fix Duplicate Packages in YUM on CentOS 7
How to Fix Duplicate Packages in YUM on CentOS 7How to Fix Duplicate Packages in YUM on CentOS 7
How to Fix Duplicate Packages in YUM on CentOS 7
 
How To Install and Configure GNome on CentOS 7
How To Install and Configure GNome on CentOS 7How To Install and Configure GNome on CentOS 7
How To Install and Configure GNome on CentOS 7
 
How To Connect to Active Directory User Validation
How To Connect to Active Directory User ValidationHow To Connect to Active Directory User Validation
How To Connect to Active Directory User Validation
 
How To Connect To Active Directory PowerShell
How To Connect To Active Directory PowerShellHow To Connect To Active Directory PowerShell
How To Connect To Active Directory PowerShell
 
How To List Files on Remote Server - PowerShell
How To List Files on Remote Server - PowerShellHow To List Files on Remote Server - PowerShell
How To List Files on Remote Server - PowerShell
 
How To List Files and Display In HTML Format
How To List Files and Display In HTML FormatHow To List Files and Display In HTML Format
How To List Files and Display In HTML Format
 
How To Check and Delete a File via PowerShell
How To Check and Delete a File via PowerShellHow To Check and Delete a File via PowerShell
How To Check and Delete a File via PowerShell
 
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
 
How To Setup SSH Keys on CentOS 7
How To Setup SSH Keys on CentOS 7How To Setup SSH Keys on CentOS 7
How To Setup SSH Keys on CentOS 7
 
How To Install and Configure Open SSH Server on Ubuntu
How To Install and Configure Open SSH Server on UbuntuHow To Install and Configure Open SSH Server on Ubuntu
How To Install and Configure Open SSH Server on Ubuntu
 
Windows PowerShell Basics – How To Create powershell for loop
Windows PowerShell Basics – How To Create powershell for loopWindows PowerShell Basics – How To Create powershell for loop
Windows PowerShell Basics – How To Create powershell for loop
 
How To Construct IF and Else Conditional Statements
How To Construct IF and Else Conditional StatementsHow To Construct IF and Else Conditional Statements
How To Construct IF and Else Conditional Statements
 
How To Create PowerShell Function Mandatory Parameter and Optional Parameter
How To Create PowerShell Function Mandatory Parameter and Optional ParameterHow To Create PowerShell Function Mandatory Parameter and Optional Parameter
How To Create PowerShell Function Mandatory Parameter and Optional Parameter
 
How To Create Power Shell Function Mandatory Parameter Value
How To Create Power Shell Function Mandatory Parameter ValueHow To Create Power Shell Function Mandatory Parameter Value
How To Create Power Shell Function Mandatory Parameter Value
 
How To Disable IE Enhanced Security Windows PowerShell
How To Disable IE Enhanced Security Windows PowerShellHow To Disable IE Enhanced Security Windows PowerShell
How To Disable IE Enhanced Security Windows PowerShell
 
Nginx bind() to 0.0.0.0:9080 failed
Nginx bind() to 0.0.0.0:9080 failedNginx bind() to 0.0.0.0:9080 failed
Nginx bind() to 0.0.0.0:9080 failed
 
How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7
 
How To Install and Configure Salt Master on Ubuntu
How To Install and Configure Salt Master on UbuntuHow To Install and Configure Salt Master on Ubuntu
How To Install and Configure Salt Master on Ubuntu
 
How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7
 
How To Configure SNMP Logging on RHEL 7
How To Configure SNMP Logging on RHEL 7How To Configure SNMP Logging on RHEL 7
How To Configure SNMP Logging on RHEL 7
 

How to configure amazon ec2 load balancer

  • 1. How To Configure Amazon EC2 Load Balancer i | P a g e Table of Contents Overview ...........................................................................................................................................1 Applies To..........................................................................................................................................1 Pre-requisites.....................................................................................................................................1 Launch Instance..................................................................................................................................1 System Update...................................................................................................................................1 Node #1 – OS Packages Update....................................................................................................1 Node #2 – OS Packages Update....................................................................................................2 NTP Configuration ..............................................................................................................................2 System Date Time...............................................................................................................................3 Install – Web Server............................................................................................................................3 Webserver – Index File........................................................................................................................4 Add Node #1 – Content ...............................................................................................................4 Add Node #2 – Content ...............................................................................................................4 LoadBalancer......................................................................................................................................5 Load Balancer – Create LoadBalancer...............................................................................................5 Load Balancer – Definition...............................................................................................................5 Define LoadBalancer Name..........................................................................................................5 Create – Internal LoadBalancer....................................................................................................6 Create – Enable advanced VPC Configuration – Select Subnets.......................................................6 Create – Enable advanced VPC Configuration – Selected Subnets...................................................7 Verify – Security Group................................................................................................................7 Create – Assign Security Group ....................................................................................................8 Create – Configure Security Settings.............................................................................................8 Create – Configure Health Check..................................................................................................9 Create – Configure Health Check - Advanced.................................................................................9 Create – Configure Health Check - Advanced...............................................................................10 Create – Add Tag.......................................................................................................................10 Create – Review ........................................................................................................................11 Create – Creation Status – Progress............................................................................................11
  • 2. How To Configure Amazon EC2 Load Balancer ii | P a g e Create – Creation Status – Successful .........................................................................................12 LoadBalancer – DNS Name................................................................................................................12 LoadBalancer – Test – First Request...............................................................................................12 LoadBalancer – Test – Second Request...........................................................................................12 Load Balancer – Instance Status.........................................................................................................13 Load Balancer – Availability Configured..............................................................................................13 Load Balancer – Remove Subnet........................................................................................................14
  • 3. How To Configure Amazon EC2 Load Balancer 1 | P a g e Overview The purpose of thisdocumentis to configure AmazonAWSLoadBalancer with2 nodes(instance).Inthis guide we will install apahce2 webserver on both the nodes to test the availability. The main purpose of loadbalancer is service high availability. Applies To Amazon EC2 Instance Pre-requisites A minimum of 2 EC2 instances have to be running. In this document we would be configuring Linux Operating System. Launch Instance Launch 2 instances of a Linux Operating System and start the instance. System Update Loginwiththe public IP address and update the operating system packages. Run the below command. sudo yum update Node #1 – OS Packages Update
  • 4. How To Configure Amazon EC2 Load Balancer 2 | P a g e Node #2 – OS Packages Update NTP Configuration Nextstepisto ensure NTPis configuredandTime serverisenabledtoverifyrunthe below commandon both nodes. cat /etc/ntp.conf | grep ^server
  • 5. How To Configure Amazon EC2 Load Balancer 3 | P a g e System Date Time Next step is to ensure date and Time on both nodes are in sync and are set to same timezone (UTC). Install – Web Server After updating operating system “install web server”, to install the webserver group run the below command on both the nodes (instances). yum groupinstall -y "Web Server"
  • 6. How To Configure Amazon EC2 Load Balancer 4 | P a g e Webserver – Index File Create a new “index.html” file in “/var/www/html” directory to create run the below command, run on both the nodes. cd /var/www/html touch index.html chmod 755 index.html Add Node #1 – Content Edit the “index.html” and a line to be displayed upon request from the browser. <HTML> <BODY> <H1> This is message is from node ...... <i> One </i> </BODY> </HTML> Add Node #2 – Content Edit the “index.html” and a line to be displayed upon request from the browser. <HTML> <BODY> <H1> This is message is from node ...... <i> Two </i> </BODY> </HTML>
  • 7. How To Configure Amazon EC2 Load Balancer 5 | P a g e LoadBalancer The purpose of load balancer is to ensure service is Load Balancer – Create LoadBalancer Navigate to “Network & Security  Load Balancers” and click on “Create Load Balancer” button. Load Balancer – Definition Define LoadBalancer Name In this step you need to define the loadbalancer name and Create LB inside (which inside network).
  • 8. How To Configure Amazon EC2 Load Balancer 6 | P a g e Create – Internal LoadBalancer This option is to enable the loadbalancer only within the internal network. Ideally we configure load balancer to the internet facing ones. Hence we would not choose the option. Create – Enable advanced VPC Configuration – Select Subnets This option is to enable the loadbalancer available to other availability zones and choose other zonesif you need configure for higher availability.
  • 9. How To Configure Amazon EC2 Load Balancer 7 | P a g e Create – Enable advanced VPC Configuration – Selected Subnets Choose the availability zones from different subnets, if needed for higher availability. Verify – Security Group In this guide,we are configuringhttpdservice,we needto ensure thatport 80 is openfrom the security groups.
  • 10. How To Configure Amazon EC2 Load Balancer 8 | P a g e Create – Assign Security Group Choose existing security groups or create new security group, if you opt to choose create new security group ensure Port “80” rule is added. Create – Configure Security Settings In this guide we are configuring simple Load balancer without security feature. In order to configure security you could configure HTTPS or SSL protocol for secured connections.
  • 11. How To Configure Amazon EC2 Load Balancer 9 | P a g e Create – Configure Health Check Type of protocol “HTTP” and on port “80” and file “/index.html” that would be verified. Create – Configure Health Check - Advanced Inthissectionyouneedconfigureloadbalancerparameters,suchasResponseTimeout,intervalandother parameters.
  • 12. How To Configure Amazon EC2 Load Balancer 10 | P a g e Create – Configure Health Check - Advanced Nextstepwouldbe addthe EC2 instancesintothe loadbalancer.Clickonthe nodes thathasto be part of the load balancer. Create – Add Tag Next step would be add tag to the loadbalancer.
  • 13. How To Configure Amazon EC2 Load Balancer 11 | P a g e Create – Review Review the loadbalancer and click on “Create” button. Create – Creation Status – Progress Upon clicking “Create” button; Loadbalancer creation progress is displayed.
  • 14. How To Configure Amazon EC2 Load Balancer 12 | P a g e Create – Creation Status – Successful After configuring the loadbalancer, loadbalancer will be created. LoadBalancer – DNS Name After creating loadbalancer successfully, DNS Name will be associated. LoadBalancer – Test – First Request Launch the DNS Name from the browser; the request is fetched from node One. LoadBalancer – Test – Second Request Launch the DNS Name from the browser; the request is fetched from node Two.
  • 15. How To Configure Amazon EC2 Load Balancer 13 | P a g e Load Balancer – Instance Status From the load balancer choose the “effonelb”, click on the “Instances” to know the status of nodes. s Load Balancer – Availability Configured From the load balancer choose the “effonelb”, click on the “Instances” to know the availability zones configured.
  • 16. How To Configure Amazon EC2 Load Balancer 14 | P a g e Load Balancer – Remove Subnet To remove zone(s) from the configured availability zones, click on “Remove from Load Balancer”.