Kullanıcı1233
Kıdemli Üye
- 19 Tem 2011
- 4,371
- 12
Hi guys! In this topic, i'm gonna share something about 'what is load balancer?', 'how does it work?', and 'what are algorithms of it?'.
What is Load Balancer?
Let's say you have a website and in first days you got 300 click but it keeps increase to 1000s as the time went by. And your only server couldn't be enough for you anymore. What would you do? You get a couple extra. Now you got 2-3 server. What if these all servers couldn't response to requests for some reason. This is where Load Balancer steps in. It eases off on server by sharing your incoming requests or traffics to each server equally. It can even stop sending requests to exact that servers if that server has error so visitors don't get error alert or blank page. Not just websites, applications and databases have same services too. For example:
Another advantages that it provides are making update your applications on server easier, blocking requests going to servers that will be updated, activating that server after updating is done. The best example about Load Balancer is Google. So, how Load Balancer chooses the proper server for request forwarding? Above informations are mostly on Layer 7 - HTTPS.
TCP/IP Load Balancer (Layer 4)
It forwards incoming requests to servers. Let's say we have one client and two server and when client wants to connect, it's been forwarded to server1.
When TCP dataflow started, dataflow keeps being forwarded to same server. If there is anything happens to that server (failure, error, etc.) client's connection is cut. Because there is no such a thing like extracting data from servers like HTTPS. on TCP, It is you who provide the data in TCP or the information received from the connected server cannot be transferred from the other server in case of failure.
HTTPS Load Balancer (Layer 7)
I mentioned this briefly on the beginning of this topic. I'm just gonna show how does it share requests to servers. Unlike TCP/IP servers, it's not gonna happen on one connection. It shares every request of client to servers equally. For example:
As you can see, Requests -even from the same client- are shared to your servers equally through Load Balancer.
Algorithms:
Least Recently Used
It forwards incoming requests to the server with the least load while managing the network traffic. I meant last users when i say least load. If they are forwarded to server1 when they enter your site and stay on your website for a long time, incoming requests will be directed to the servers with the least load. The difference from "Weighted Least Recently Used" is that the capacity and weight of each server you specified is known and forwards according to the number of requests on the servers.
As you can see, server2 has more space than server1.
Round Robin
It forwards requests coming to your servers from top to bottom resp. It forwards first request to server a and second request to server b. Depending on your server count, this process repeats to A-Z, then it starts redirecting requests from the very beginning. Thus a cycle is occured. Another option is "Weighted Round Robin". The only difference between them is that it sends more requests to servers that are larger than other servers.
IP Hash
When a user enters to website, his/her infos are saved. And whenever he/she re-enter, are forwarded to same server.
Random
It forwards requests randomly, duh..
Types of Load Balancer
Hardware Load Balancer
The first things that comes to mind about Load Balancer devices are Tp-Link and F5.
F5 Devices:
VIPRION 4800 Chassis
VIPRION 4450 Blade
Tp-Link Devices:
TL-ER5120
TL-R480T+
TL-R470T+
or Load Balancer Sizing Guide and Calculator: kemp
Software Load Balancer
They work with the traffic forwarding configuratins you choose. You can download a program you want and install it on your server. And use it after making the necessary adjustments. They are usually open source so it's another plus.
Seesaw
LoadMaster by KEMP
HAProxy
ZEVENET
Neutrino
Balance
Pen
Nginx
Traefik
gobetween
Cloud Load Balancer
Google Cloud Load Balancing
Amazon Web Services Elastic Load Balancer
Azure Load Balancer
DigitalOcean Load Balancer
NodeBalancers
Original: https://www.turkhackteam.org/web-server-guvenligi/1893964-load-balancer-nedir-hacker.html
What is Load Balancer?
Let's say you have a website and in first days you got 300 click but it keeps increase to 1000s as the time went by. And your only server couldn't be enough for you anymore. What would you do? You get a couple extra. Now you got 2-3 server. What if these all servers couldn't response to requests for some reason. This is where Load Balancer steps in. It eases off on server by sharing your incoming requests or traffics to each server equally. It can even stop sending requests to exact that servers if that server has error so visitors don't get error alert or blank page. Not just websites, applications and databases have same services too. For example:
Another advantages that it provides are making update your applications on server easier, blocking requests going to servers that will be updated, activating that server after updating is done. The best example about Load Balancer is Google. So, how Load Balancer chooses the proper server for request forwarding? Above informations are mostly on Layer 7 - HTTPS.
TCP/IP Load Balancer (Layer 4)
It forwards incoming requests to servers. Let's say we have one client and two server and when client wants to connect, it's been forwarded to server1.
When TCP dataflow started, dataflow keeps being forwarded to same server. If there is anything happens to that server (failure, error, etc.) client's connection is cut. Because there is no such a thing like extracting data from servers like HTTPS. on TCP, It is you who provide the data in TCP or the information received from the connected server cannot be transferred from the other server in case of failure.
HTTPS Load Balancer (Layer 7)
I mentioned this briefly on the beginning of this topic. I'm just gonna show how does it share requests to servers. Unlike TCP/IP servers, it's not gonna happen on one connection. It shares every request of client to servers equally. For example:
As you can see, Requests -even from the same client- are shared to your servers equally through Load Balancer.
Algorithms:
Least Recently Used
It forwards incoming requests to the server with the least load while managing the network traffic. I meant last users when i say least load. If they are forwarded to server1 when they enter your site and stay on your website for a long time, incoming requests will be directed to the servers with the least load. The difference from "Weighted Least Recently Used" is that the capacity and weight of each server you specified is known and forwards according to the number of requests on the servers.
As you can see, server2 has more space than server1.
Round Robin
It forwards requests coming to your servers from top to bottom resp. It forwards first request to server a and second request to server b. Depending on your server count, this process repeats to A-Z, then it starts redirecting requests from the very beginning. Thus a cycle is occured. Another option is "Weighted Round Robin". The only difference between them is that it sends more requests to servers that are larger than other servers.
IP Hash
When a user enters to website, his/her infos are saved. And whenever he/she re-enter, are forwarded to same server.
Random
It forwards requests randomly, duh..
Types of Load Balancer
Hardware Load Balancer
The first things that comes to mind about Load Balancer devices are Tp-Link and F5.
F5 Devices:
VIPRION 4800 Chassis
VIPRION 4450 Blade
Tp-Link Devices:
TL-ER5120
TL-R480T+
TL-R470T+
or Load Balancer Sizing Guide and Calculator: kemp
Software Load Balancer
They work with the traffic forwarding configuratins you choose. You can download a program you want and install it on your server. And use it after making the necessary adjustments. They are usually open source so it's another plus.
Seesaw
LoadMaster by KEMP
HAProxy
ZEVENET
Neutrino
Balance
Pen
Nginx
Traefik
gobetween
Cloud Load Balancer
Google Cloud Load Balancing
Amazon Web Services Elastic Load Balancer
Azure Load Balancer
DigitalOcean Load Balancer
NodeBalancers
Original: https://www.turkhackteam.org/web-server-guvenligi/1893964-load-balancer-nedir-hacker.html
Translate: R4V3N