Тёмный

HOW TO:CONFIGURE HA-PROXY SERVER (LOAD BALANCER) 

Linux Techie
Подписаться 1,9 тыс.
Просмотров 49 тыс.
50% 1

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 76   
@mohitguptaji
@mohitguptaji 5 лет назад
You can join me on my whatsapp group for quick free queries and solution chat.whatsapp.com/E96jXVnZacM8MzffHKJkpv
@easternlai
@easternlai 2 года назад
I indirectly learned how important /var/log/message file is. Thanks!
@bevdawgproductions
@bevdawgproductions 5 лет назад
Thank you for the video - was pulling my hair out after reading many guides. To others: beware selinux it was not letting HAproxy bind the port.
@mohitguptaji
@mohitguptaji 5 лет назад
:)
@billbakshi3307
@billbakshi3307 5 лет назад
Thank you very much for explaining deeply. lots of thanks......
@mohitguptaji
@mohitguptaji 5 лет назад
Dont forget to subscribe if you really liked it
@diaco876
@diaco876 2 года назад
thanks very much, i think i 've undertstood something concerning ha proxy today
@NicolaeCristian175
@NicolaeCristian175 3 года назад
I wanted to watch some load balancer setting. I remain for troubleshooting. Thanks for sharing!
@yadakrishna2090
@yadakrishna2090 Год назад
Exactly what I am looking for an answer thanks brooo for this video 👍
@syedrahman7352
@syedrahman7352 3 года назад
Fantastic demonstration Mate.
@mohitguptaji
@mohitguptaji 3 года назад
Thanks and share with your friends too.
@nedhirdalleji9344
@nedhirdalleji9344 4 месяца назад
Thank you!
@OriMoscovitz
@OriMoscovitz 2 года назад
how did you get those three different roots in the terminal? (workstation, servera and serverb)
@mohitguptaji
@mohitguptaji 2 года назад
Those are hostname already set in 3 different virtual machines running in KVM.
@Trade4Living
@Trade4Living 4 года назад
Can you pls explain by enabling Selinux how can we make it configured?
@mohitguptaji
@mohitguptaji 4 года назад
You can join me on my whatsapp group for quick free queries and solution chat.whatsapp.com/E96jXVnZacM8MzffHKJkpv Mention this question in group by refering this video
@odompl7465
@odompl7465 5 лет назад
There is very nice and helpful !
@pkurkure
@pkurkure Год назад
can i configure 2 squid proxy under haproxy... means if my one proxy down its automatically going to other address
@Vintage_Antika
@Vintage_Antika 2 года назад
The requested files come from server A and server B to the server of HAProxy. All traffic is being collected in the HAProxy server. So if heavy traffic occurs, HAProxy server may get down due to high traffic. Why should we use HAProxy then? Could you please explain?
@mohitguptaji
@mohitguptaji 2 года назад
Good question.
@mohitguptaji
@mohitguptaji 2 года назад
Answer is HA proxy is anle to hamdle concurrent requests in millions because it is wprking as a proxy only. And you can vertically scale the server amd perform some OS level tuning to boost the performance Refer to below doc www.google.com/amp/s/www.freecodecamp.org/news/how-we-fine-tuned-haproxy-to-achieve-2-000-000-concurrent-ssl-connections-d017e61a4d27/amp/
@Supercraft2022
@Supercraft2022 3 года назад
can i use this for my minecraft server network, i have high load and the machine is alone with the proxyt but ihave 2 dedis more
@meganj7155
@meganj7155 Год назад
In serverA and serverB application is running using Apache?
@ankitagarwal6014
@ankitagarwal6014 3 года назад
How can I setup haproxy for Aws ECS fargate containers?
@mohitguptaji
@mohitguptaji 3 года назад
You can use HA proxy server right behind the NLB or load balancer and you can use some service discovery to discover your backend resources and map from ha proxy
@ankitagarwal6014
@ankitagarwal6014 3 года назад
@@mohitguptaji the thing is fargate ips keep on changing due to which my application connection is breaking. I was suggested to use reverse proxy with fixed ip so that all fargate containers can send and receive request through this reverse proxy server
@CLUB2627
@CLUB2627 2 года назад
Whenever i try to write my frontend. I keep having error. Saying that. My frontend server name is not recognised. And my back end name and ip address is not recognised as well. Please help me with this
@mohitguptaji
@mohitguptaji 2 года назад
Can you share you screenshot error on my WhatsApp group which you joined and left. chat.whatsapp.com/E96jXVnZacM8MzffHKJkpv
@unauthorizedaccess8062
@unauthorizedaccess8062 4 года назад
On which server would the traffic/data transfer be counted? Webserver or the load balancer?
@mohitguptaji
@mohitguptaji 4 года назад
Majour traffic would come to LB and it will distributed to backend servers half half
@unauthorizedaccess8062
@unauthorizedaccess8062 4 года назад
@@mohitguptaji thank you for replying. sir main outbound data xfer ka pooch raha hu. Load balancing server pe calculate hoga ya webserver pe. Example ke liye agar 10mb file download karni hai to outbound traffic server a/b pe calculate hoga ya balancing server pe? Ya fir load balancing server request ko sirf redirect karya hai?
@mohitguptaji
@mohitguptaji 4 года назад
@@unauthorizedaccess8062 if your a,b backend servers are on private network then charge would be very less. The main data transfer cost would be on LB because it will serve the file directly to client
@mohitguptaji
@mohitguptaji 4 года назад
And hope you liked the video and subscribe the channel it motivate me to upload more intresting videos
@unauthorizedaccess8062
@unauthorizedaccess8062 4 года назад
@@mohitguptaji thank you very much. And yes, I will subscribe.
@janakiramreddykarri1328
@janakiramreddykarri1328 6 лет назад
how to do tcp client ip forward to server side through haproxy ?
@saudnaeem8614
@saudnaeem8614 4 года назад
this was helpful. thanks mate
@mohitguptaji
@mohitguptaji 4 года назад
Pleas like subscribe and share also
@서형덕-e4g
@서형덕-e4g 4 года назад
Thank you for the video
@mohitguptaji
@mohitguptaji 4 года назад
Dont forget to like and subscribe
@criyotutorials6560
@criyotutorials6560 2 года назад
I though running curl localhost on the workstation will try to get the index.html file in workstation (if any) was there any settings you did apart from the settings in HA Proxy config? I thought you will "curl servera" or serverb. Did you point localhost to the 2 remote servers?
@mohitguptaji
@mohitguptaji 2 года назад
I have setup servera amd serverb dns in /etc/hosts file
@mohitguptaji
@mohitguptaji 2 года назад
And localhost is the haproxy itself
@ramanpreet2686
@ramanpreet2686 4 года назад
hey my haproxy is on rehl 7 and its unable to bind to a port. I have checked it and selinux is also disable as well as firewall . Also no other process is running on that bind port. What should i do .?
@mohitguptaji
@mohitguptaji 4 года назад
You must be doing something wrong can you share the errors you are getting so that can look into it
@ramanpreet2686
@ramanpreet2686 4 года назад
@@mohitguptaji Sep 03 11:17:01 HA-Proxy1 haproxy-systemd-wrapper[2382]: [ALERT] 246/111701 (2383) : Starting frontend apiserver: cannot bind socket [0.0.0.0:7443] Sep 03 11:17:01 HA-Proxy1 haproxy-systemd-wrapper[2382]: [ALERT] 246/111701 (2383) : Starting frontend dashboard: cannot bind socket [0.0.0.0:30000] Sep 03 11:17:01 HA-Proxy1 haproxy-systemd-wrapper[2382]: [ALERT] 246/111701 (2383) : Starting proxy stats: cannot bind socket [0.0.0.0:1936]
@mohitguptaji
@mohitguptaji 4 года назад
@@ramanpreet2686 3 diffetent ports 30000,7443 and other? Why 3 different port .
@ramanpreet2686
@ramanpreet2686 4 года назад
@@mohitguptaji as per the requiremnet. Earlier the haproxy set up was running fine including these three ports. but not now. I haven't made any change to it.
@mohitguptaji
@mohitguptaji 4 года назад
@@ramanpreet2686 need to check on remote i guess
@mias9825
@mias9825 11 месяцев назад
Which os i's this please and from where i get iso
@vanika5943
@vanika5943 4 года назад
hi sir can you please how is server a and server b insatlled in your local m/c and are they having same ip's.
@ITLAB91
@ITLAB91 5 лет назад
hei budy, can you help me? my haproxy canot working, always show error message " backend app has no server available!"
@mohitguptaji
@mohitguptaji 5 лет назад
Yeah did you follow all the steps correctly , and are you doing this on personally or on any production environment
@ITLAB91
@ITLAB91 5 лет назад
@@mohitguptaji I already follow your tutorial fully. I do this on personal my LAB. I have 2 node backend server and 1 load balancer. But all network is in diferent subnet. Is this work in diferent subnet for HAproxy? Help me. If you want to remote my pc.. please
@mohitguptaji
@mohitguptaji 5 лет назад
@@ITLAB91 doesnt matter if submet is different , they must be reachable . I can help you here only if you want my personal emvolvement then some commericial would be involved bro
@ITLAB91
@ITLAB91 5 лет назад
@@mohitguptaji my servers is reachable one each other. . this server1 hostname = server1.local, server2 hostname =server2.local. following my haproxy.cfg frontend app_servers *:80 default_backend apps frontend main bind *:5000 acl url_static path_beg -i /static /images /javascript /stylesheets acl url_static path_end -i .jpg .gif .png .css .js use_backend static if url_static default_backend web-servers #--------------------------------------------------------------------- # static backend for serving up images, stylesheets and such #--------------------------------------------------------------------- backend static balance roundrobin server static 127.0.0.1:4331 check #--------------------------------------------------------------------- # round robin balancing between the various backends #--------------------------------------------------------------------- backend app balance roundrobin server app1 127.0.0.1:5001 check server app2 127.0.0.1:5002 check server app3 127.0.0.1:5003 check server app4 127.0.0.1:5004 check backend web-servers server servera server1.local:80 check server serverb server2.local:80 check
@ITLAB91
@ITLAB91 5 лет назад
server1.local=192.168.10.100, server2.local=192.168.11.100 and load balancer haproxy installed is server3.local=192.168.12.100
@QikiIzdihar
@QikiIzdihar 5 лет назад
can haproxy be combined with sdn network? please help me
@mohitguptaji
@mohitguptaji 5 лет назад
Sdn network ????
@QikiIzdihar
@QikiIzdihar 5 лет назад
@@mohitguptaji I mean, Software Defined Network sir
@QikiIzdihar
@QikiIzdihar 5 лет назад
@@mohitguptaji can it be used?
@mohitguptaji
@mohitguptaji 5 лет назад
@@QikiIzdihar never inplemented or tried this.
@mohitguptaji
@mohitguptaji 5 лет назад
@@QikiIzdihar i think you should try and put an example
@UdaySingh-im4hd
@UdaySingh-im4hd 5 лет назад
is this rhel7
@mohitguptaji
@mohitguptaji 4 года назад
Yes
@MSRawat-sl7kz
@MSRawat-sl7kz Год назад
command url
@AmitSinghDalalsam
@AmitSinghDalalsam 4 года назад
Lol, before posting and creating A demo, at least make sure you know what you're doing.
@mohitguptaji
@mohitguptaji 4 года назад
What is the issue man ?
@AmilcarHernandezAmil
@AmilcarHernandezAmil 4 года назад
Although I would agree, I also benefited from the unforeseen issues he ran into, good learning experience.
@nedhirdalleji9344
@nedhirdalleji9344 4 месяца назад
He is being real, that's what happens in real life, we misspell things, forget minor things, what matters is that he understands the concept, that's better than flawless pre-made tutorials, and try to stop such childish comments and grow up
Далее
5 DIFFERENT WAYS TO CREATE FILE IN LINUX
3:38
HAproxy configuration and Load balancing
18:48
Просмотров 81 тыс.
Load Balancing with NGINX
30:03
Просмотров 65 тыс.
NGINX Tutorial - What is Nginx
14:32
Просмотров 193 тыс.
HAproxy configuration and Load balancing 2
24:47
Просмотров 55 тыс.
NixOS: Everything Everywhere All At Once
15:10
Просмотров 317 тыс.