Install and Configure HaProxy LBR KodeKloud

 


Question:

Solution:

At first find the port numbers of all appservers 

cat /etc/httpd/conf/httpd.conf| grep Listen

My port was 3002 for app01, app02 and app03 server

Then Enable, start and check status

systemctl enable httpd && service httpd start && service httpd status

Next login to LBR server and do the followings

yum -y install haproxy
cp /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.bkp
cat /etc/haproxy/haproxy.cfg | grep haproxy/stat
vi /etc/haproxy/haproxy.cfg


Save the cfg settings and then verify, enable, start and check status

haproxy -f /etc/haproxy/haproxy.cfg
systemctl enable haproxy && service haproxy start && service haproxy status

Finally validate the result using curl






Download Coding Interview Book and Get More Tutorials for Coding and Interview Solution: Click Here

Download System Design Interview Book and Get More Tutorials and Interview Solution: Click Here

Do you need more Guidance or Help? Then Book 1:1 Quick Call with Me: Click Here

Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment