HAproxy configuration and Load balancing 2

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 พ.ย. 2024
  • Load balancing using HAProxy; a free, open source load balaning and proxying tool.
    You can provide high availability and scalibility to your system using simple steps of configuring HAProxy.
    This video is part 2 of the tutorial. It is highly recommended to watch the part 1 here before watching this video.
    • HAproxy configuration ...
    In this video we also talk about multiple proxy and how to peer them up together.
    There is a backround noise in this video because of chatty students in the hall. I appologize for that.

ความคิดเห็น • 55

  • @AhmedChoukri
    @AhmedChoukri 8 ปีที่แล้ว +2

    i installed 2 HAProxy servers and i was able to use "ucarp" with ubuntu 15.10 which allows you to use a VIP and automatically failover if the the MASTER or active node goes down, you still need to use the "peers" and "stick-tables" to keep the sessions in sync and point you public dns to the VIP, i have tested this today on a 3 tier env. with tomcat8 backend application servers and mysql DB and it worked like a champ ...
    many thanks Azizullah

    • @alexandernababan3093
      @alexandernababan3093 8 ปีที่แล้ว

      hey ahmed i'm a college student that struggle in my thesis about failover database replication. Can you share it to me how you do that?

  • @maheshjadhav1486
    @maheshjadhav1486 8 ปีที่แล้ว +2

    very good explanation and demonstration. In the last section you explained about haproxy logs. I think , logs are not created in /etc/haproxy/errors/ directory. Logs should go in /var/log/ directory . The directory /etc/haproxy/errors/ is for error html pages that will be forwarded to client when they hit bad request(400.html) or in case of server unavailable(503.html).

  • @Yunesieh
    @Yunesieh 3 ปีที่แล้ว +1

    i want ask something that cant find in internet about HAproxy, can we choose number of cores for each webservers? its for webservers with different cpus and different number of cpu cores, to send less load for older webservers.

  • @retrodog65
    @retrodog65 9 ปีที่แล้ว

    Very well explained and simple to follow. It can be used as a good foundation for going deeper into the other options for HA.

  • @negarzamiri761
    @negarzamiri761 6 ปีที่แล้ว

    عالی بود. پر از نکته های میان توضیح که شفاف میکد ذهن بیننده رو عااالی

  • @MrByGreez
    @MrByGreez 9 ปีที่แล้ว

    Everything is clear and cool explained. I envy your students. Thx!

  • @asmita4yogesh
    @asmita4yogesh 9 ปีที่แล้ว

    Very nicely created video , all the best for your masters

  • @iManiac7
    @iManiac7 9 ปีที่แล้ว

    Thanks a lot!! I would be happy to watch new videos with this stuff!

  • @docitpro2108
    @docitpro2108 9 ปีที่แล้ว +2

    Watched both parts, thank you for the videos.
    I'd like to comment on the last part regarding the logs. You seem to have incorrectly identified the html errorpages as haproxy logs around 23:30. According the the configuration at precise timestamp 23:30, the logs should be saved under the system log.

  • @SimurghAcademy
    @SimurghAcademy 4 ปีที่แล้ว

    بسیار عالی،‌ممنون از آموزشی که درست کردی

  • @marcelrond1058
    @marcelrond1058 9 ปีที่แล้ว +9

    Hi, I like your turorial, Stil a question, following Devraj question. If you a DNS record pointing tot 2 IP addresses, and one of the LB nodes is down. It could be the case that the client connects to the IP of the LB that is down. This would cause a time-out? We do not have a VIP in this config.
    I see some using using HAPROXY with Keepalived, which does provide a VIP.

    • @yuwuxiong1165
      @yuwuxiong1165 8 ปีที่แล้ว

      I have the same question in mind.

    • @sofyane3696
      @sofyane3696 6 ปีที่แล้ว

      use HAproxy with keepalived it s the best

    • @preethk9599
      @preethk9599 5 ปีที่แล้ว

      Even I have the same question. If anybody got the answer pls let us konw

  • @damien130970
    @damien130970 9 ปีที่แล้ว

    Thanks for your efforts. Well done and explained nicely. ps. I don't care if you have a three course meal when you record, I appreciate the time you have saved me.

  • @premanandramnath
    @premanandramnath 9 ปีที่แล้ว +1

    simply superb

  • @elgs1980
    @elgs1980 8 ปีที่แล้ว

    Thanks for the great tutorials. One thing you didn't mention was how did you make the same domain name to resolve to different IP addresses? Was it anycast or just two A records with different IP addresses in the zone file?

  • @dagemtaye9651
    @dagemtaye9651 9 ปีที่แล้ว +1

    Brilliant!
    you have got one follower.!

  • @okyerebonananayaw
    @okyerebonananayaw 4 ปีที่แล้ว

    How do you how are you making the peers share on dns name/IP?

  • @beixu9998
    @beixu9998 4 ปีที่แล้ว

    why does the two HAproxy needs to be peered? what is the benefit?

  • @ChandrasekharRaman
    @ChandrasekharRaman 7 ปีที่แล้ว

    @azizullah Parsa how did you run multiple instances of haproxy and apache server in terminal. PLEASE HELP ASAP

  • @2008sevenstar
    @2008sevenstar 5 ปีที่แล้ว

    I have two web application, I want to configure it so that it is behind haproxy. web app server uses certificate for handshake. How do i do that... Please suggest.

  • @babasahebjagtap3656
    @babasahebjagtap3656 4 ปีที่แล้ว

    will peers will start additional IPs on Lb2 when LB1 goes down

  • @sameerdeshmukh7133
    @sameerdeshmukh7133 9 ปีที่แล้ว

    Great tutorial, had all want i needed to know

  • @macwubu
    @macwubu 8 ปีที่แล้ว

    Hi Azizullah, even after configuring stick-table and peers like shown in the video, it looks like two haproxy servers still doing balancing of their own. From the video, I got impression that two haproxy servers will coordinate roundrobin balancing. Is there a way to make two haproxy do round-robin balancing on backend nodes ? Thanks.

  • @fuzailahm
    @fuzailahm 4 ปีที่แล้ว

    can it work for the mail servers instead of webservers

  • @williampolinchak
    @williampolinchak 8 ปีที่แล้ว

    What's the most common problem when one gets a server 400 error back from a server that is going through HAProxy?

  • @dscedsce7427
    @dscedsce7427 8 ปีที่แล้ว

    dear aziz hope you are fine i am quite new to this ubuntu but i want to make a redundant haproxy i have done that but i am unable to makee a dns server can you make a lab environment in which you can show in doing that

  • @walterchuzonsanchez631
    @walterchuzonsanchez631 8 ปีที่แล้ว

    Hello good night and seen His video I wonder if you can configure load balancing algorithms as road robin pacemaker or heart beat Within ... I hope you can answer me thank you very much

  • @MrDjegsi
    @MrDjegsi 8 ปีที่แล้ว

    Hi nice tutorial , but l didnt see how you are terminating SSL , sorry if missed , if you could advice me on this matter

  • @shaileshmurali.8838
    @shaileshmurali.8838 7 ปีที่แล้ว

    need help ,how to connect ha1 and ha2 to the domain ? thanks

  • @MrDjegsi
    @MrDjegsi 8 ปีที่แล้ว

    How you do it with sticky-session , can you explain me please

  • @smuralimohan1
    @smuralimohan1 9 ปีที่แล้ว

    Nice and sweet tutorial indeed.

  • @trading_caro
    @trading_caro 8 ปีที่แล้ว

    what is the physical configuration need to handle 10K http request per second

  • @C0PED0GG
    @C0PED0GG 8 ปีที่แล้ว

    Thanks for the Video :) Would you know how to route HTTP traffic to HTTPS traffic in HAPROXY? What are the functions I call in the haproxy.cfg script?

  • @devrajbhandari6890
    @devrajbhandari6890 9 ปีที่แล้ว

    can you please explain how you resolved virtual IP address that will produce real IP of one of LB, if it is simple line of configuration that can be done in any virtual machine, i would be happy to know. and i am amazed you made High availability without installing heartbeat, i was having big problem in configuring heartbeat

    • @azizparsa1145
      @azizparsa1145  9 ปีที่แล้ว +2

      Maybe I didn't get your question but if you are asking how to resolve domain name to IP this is the answer: "ha.cs.luc.edu" is a sub domain. when you configure your DNS zone, you can have two " A records" for a single domain name. each A record has an associated IP. So when you access the "ha.cs.luc.edu" it will read one A record IP at a time and send the request to it. So you get to one of HAproxy nodes. Then HApropxy has other virtual machines in backend, the configuration of HAproxy for that is explained in part one of the video. Link is in the description.
      I hope I answered you at least partially

    • @ChaimKerenTzion
      @ChaimKerenTzion 8 ปีที่แล้ว +3

      +Azizullah Parsa Nice tutorial. I think using 2 A records for "ha.cs.luc.edu" is not a good solution for a production system. With 2 A records, if one HAProxy goes down there will be a failure every other request. Multiple A records can only work well if the DNS server is smart enough to test the IP before giving it out (Amazon and other smart DNS services can do this, AFAIK plain BIND does not support this.) A better solution is to use a floating VIP with keepalived.

  • @dscedsce7427
    @dscedsce7427 8 ปีที่แล้ว

    hello azizullah can you make a video on how to make HA redundant through pacemaker? thank you!!

  • @ginoLfh
    @ginoLfh 9 ปีที่แล้ว

    Great tutorial, may i've a copy of your document "Rep of Class.pptx".

  • @lubomirnedoklanov3816
    @lubomirnedoklanov3816 5 ปีที่แล้ว

    I love how the guy explaining is indian, the comments are indian and everyone speaks english :D :D :D

  • @nirzarshome4893
    @nirzarshome4893 7 ปีที่แล้ว

    In this system only only one Database server ???

    • @AshishSingh-zq3kx
      @AshishSingh-zq3kx 6 ปีที่แล้ว

      you can use a cluster of the database .. but for this much server one database server is enough

  • @palashchanda4166
    @palashchanda4166 6 ปีที่แล้ว

    how to start two different Haproxy servers in ubuntu?

    • @AshishSingh-zq3kx
      @AshishSingh-zq3kx 6 ปีที่แล้ว

      its just done by either VMware ubuntu installed machines or EC2 instances with ubuntu

  • @BharatPatel-bb6lj
    @BharatPatel-bb6lj 6 ปีที่แล้ว

    very nice tutorial... lot of background noice.

  • @srinivasayarra7083
    @srinivasayarra7083 9 ปีที่แล้ว

    Awesome

  • @ml9586
    @ml9586 9 ปีที่แล้ว

    awsome

  • @Hellmiauz
    @Hellmiauz 4 ปีที่แล้ว

    You recorded this during a dinner party?

  • @karlmorrison2713
    @karlmorrison2713 8 ปีที่แล้ว

    You should really put which versions of both softwares your using here. And yes, stop eating while making videos.

  • @aaguilerav
    @aaguilerav 9 ปีที่แล้ว +2

    I really like the explanations, but please try not to eat while explaining.

    • @azizparsa1145
      @azizparsa1145  9 ปีที่แล้ว +15

      I will try not to eat next time. But it was during the busy exam days when I didn't have much time so I made the video in lunch hour. Last semester of Master degree in US is so stressful my friend.