What is Load Balancer(LB) & it’s types? How to detect Website using Load Balancing Service?

In this tutorial, I’ll explain you about Load Balancer(LB) & it’s types. Also I’ll demonstrate how to detect website using load balancing service.

What is Load Balancer (LB)?

Load Balancer is a device that acts as a reverse proxy & distributes network or application traffic across a number of servers.

LB are used to increase capacity(concurrent users) and reliability of applications.

LB improve the performance of applications by decreasing the burden on servers associated with managing, maintaining application and network sessions, as well as by performing application specific tasks.

LB ensure reliability & availability by monitoring the health of applications & only send requests to servers & applications which can respond in timely manner.

Types of Load Balancers (LB)?

There are generally two types of Load Balancers(LB) as mentioned below

i. Layer 4 (Network Load Balancer)

ii. Layer 7 (Application Load Balancer)

These both are described below

i. Layer 4 (Network Load Balancer)

Layer 4 LB act upon data found in network and transport layer protocols i.e., IP, TCP, UDP & TLS.

ii. Layer 7 (Application Load Balancer)

Layer 7 LB distributes requests based upon data found in application layer protocols such as HTTP & HTTPS.

Besides this it can further distribute the request based on application specific data such as HTTP Header, Cookies or Data within application message itself, such as value of specific parameter.

Load Balancing (LB) Algorithms?

Requests received by both of these LB are distributed to a particular server based on configured load balancing algorithms. Some of the LB algorithms are listed below

1. Round Robin

2. Weighted Round Robin

3. Least Connections

4. Least Response Time.

5. Sessions based

6. Spillover

Now I’ll demonstrate how to detect website or web application running Load Balancer or Load Balancing service.

How to detect website or web application using Load Balancer or Load Balancing service?

In order to detect Load Balancer on website, you need to have Kali, Parrot or Arch Linux System because it comes with preinstalled LBD Package. In my case I’m using Parrot Linux.

To perform this task follow below mentioned steps.

Here I’ll be demonstrating on my website i.e., https://saraswatirepository.com. You can target any website in order to test.

┌─[iamvsm@SaraswatiRepository]─[~]

└──╼ $lbd saraswatirepository.com

lbd - load balancing detector 0.4 - Checks if a given domain uses load-balancing.

Written by Stefan Behte (http://ge.mine.nu)

Proof-of-concept! Might give false positives.

Checking for DNS-Loadbalancing: FOUND

saraswatirepository.com has address 172.67.181.107

saraswatirepository.com has address 104.24.102.173

saraswatirepository.com has address 104.24.103.173

Checking for HTTP-Loadbalancing [Server]:

cloudflare

NOT FOUND

Checking for HTTP-Loadbalancing [Date]: 05:36:07, 05:36:07, 05:36:08, 05:36:08, 05:36:09, 05:36:09, 05:36:10, 05:36:10, 05:36:11, 05:36:12, 05:36:12, 05:36:13, 05:36:13, 05:36:14, 05:36:14, 05:36:15, 05:36:15, 05:36:16, 05:36:16, 05:36:17, 05:36:17, 05:36:18, 05:36:18, 05:36:19, 05:36:20, 05:36:21, 05:36:21, 05:36:23, 05:36:23, 05:36:24, 05:36:24, 05:36:25, 05:36:25, 05:36:26, 05:36:26, 05:36:27, 05:36:27, 05:36:28, 05:36:28, 05:36:29, 05:36:30, 05:36:30, 05:36:31, 05:36:31, 05:36:32, 05:36:32, 05:36:33, 05:36:33, 05:36:34, 05:36:35, NOT FOUND

Checking for HTTP-Loadbalancing [Diff]: FOUND

< Expires: Tue, 13 Oct 2020 06:36:35 GMT

> Expires: Tue, 13 Oct 2020 06:36:36 GMT

< cf-request-id: 05c20ef1b600000706ea3d7200000001

< Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?lkg-colo=21&lkg-time=1602567396"}],"group":"cf-nel","max_age":604800}

> cf-request-id: 05c20ef4070000d9fcf3184200000001

> Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?lkg-colo=35&lkg-time=1602567396"}],"group":"cf-nel","max_age":604800}

< CF-RAY: 5e16b42f8ca70706-LHR

> CF-RAY: 5e16b4333b9cd9fc-SIN

saraswatirepository.com does Load-balancing. Found via Methods: DNS HTTP[Diff]

As from the above detection report, we have identified that website saraswatirepository.com uses DNS & HTTP Load Balancing.

Because I’m using Cloudflare Load Balancing & WAF Service. I have not used multiple servers to host my website that’s why it is showing no server load balacing found.

This how you can target any website in order to check whether they are using Load Balancing Service or not.

Note: This practice is only for Knowledge & Education Purpose.

Recommendation

It is advisable to use Load Balancer to guarantee uptime of your web application to end users or customers.