Table of Contents
[Protocol Layer] http redirection protocol implements load balancing" >[Protocol Layer] http redirection protocol implements load balancing
[Protocol layer] dns domain name resolution load balancing" >[Protocol layer] dns domain name resolution load balancing
Home Backend Development PHP Tutorial Sharing of Several Load Balancing Technologies

Sharing of Several Load Balancing Technologies

Mar 22, 2018 am 10:43 AM
share technology

Load balancing technology has great advantages in improving the performance of medium and large websites. Recently, I am studying "Architecture of Large Website Technology", which has some introduction to load balancing technology. This article mainly shares several types of loads with you. Balance technology, I hope it can help everyone.

[Protocol Layer] http redirection protocol implements load balancing

Principle: Calculate a real HTTP request based on the user's The web server address is written into the http redirect response and returned to the browser, and the browser accesses it again.

Pictured:

Advantages: Relatively simple

Disadvantages: The browser needs zero requests to the server to complete an access, and the performance is poor.

The http redirect server’s own processing capabilities may become a bottleneck.

Using http302 response redirection may cause search engines to judge it as SEO cheating and reduce search rankings.


[Protocol layer] dns domain name resolution load balancing

Principle: Configure IP records corresponding to multiple domain names on the DNS server. For example, a domain name www.baidu.com corresponds to a set of web server IP addresses. During domain name resolution, a domain name request is allocated to an appropriate real server through the algorithm of the DNS server.

Pictured:

## Advantages: The load balancing work is handed over to DNS, which saves the trouble of website management and maintenance of load balancing servers. Many DNS also support domain name resolution based on geographical location. , resolve the domain name to a server address closest to the user's geographical location, speed up access, and improve performance.

Disadvantages: The current DNS resolution is multi-level resolution. Each level of DNS may cache record A. When the server goes offline, the DNS record A corresponding to the server may be cached. Still exists, causing access failure for users assigned to the server.

The control of DNS load balancing is in the hands of the domain name service provider, and the website may not be able to make too many improvements and management.

It is not possible to distribute the load according to the server's processing capabilities. DNS load balancing uses a simple polling algorithm, which cannot distinguish the differences between servers and cannot reflect the current running status of the server, so its load balancing effect is not very good.

May cause additional network problems. In order to enable this DNS server to interact with other DNS servers in a timely manner, ensure that DNS data is updated in a timely manner, and addresses can be randomly assigned, the DNS refresh time is generally set to a small value. However, if it is too small, the DNS traffic will increase significantly and cause additional network traffic. question.

[Protocol layer] Reverse proxy load balancing

Principle: Reverse proxy On the web server side, the reverse proxy server provides load balancing functions and manages a group of web servers at the same time. It forwards requested browser access to different web servers for processing according to the load balancing algorithm, and the processing results are returned to the reverse server through the reverse server. browser.


As shown in the picture:

For example: The address of the browser access request is the address of the reverse proxy server 114.100.80.10. The reverse proxy server receives the request and passes the load After the balancing algorithm, a real physical address 10.0.03 is obtained, and the request result is sent to the real serverless server. After processing by the real server, it is returned to the requesting user through the reverse proxy server.

Advantages: Simple deployment, at the http protocol level.

Disadvantages: After using a reverse proxy server, the web server address cannot be directly exposed, so the web server does not need to use an external IP address, and the reverse proxy service is needed as a communication bridge. Configure dual network cards and two sets of external and internal IP addresses.

##[Network Layer]IP Load Balancing

Principle: Load balancing is performed at the network layer by modifying the target address.

Pictured:

The user access request reaches the load balancing server. The load balancing server obtains network data packets in the operating system kernel process. According to The algorithm obtains a real server address, and then modifies the target address requested by the user to the real server address. After the data is processed, it is returned to the load balancing server. After receiving the response, the load balancing server modifies its own address to the original user access address. Let’s talk about data return. Similar to reverse server load balancing.

Advantages: It is faster than reverse server load balancing in responding to requests.

Disadvantages: Slow speed when requesting large data (large videos or files).

[Link layer] Data link layer load balancing

Principle: The data link layer modifies the Mac address for load balancing.

Pictured:

The IP of the load balancing server is consistent with the virtual IP of the web service group it manages;

The IP address of the access address is not modified during the load balancing data distribution process. Modify the Mac address;

Through these two points, normal access can be achieved without modifying the original address and destination address of the data packet.

Advantages: No load balancing server is required for address translation.

                                                                                                                                                                            Data does not need to go through the load balancing server.

Disadvantages: The network card bandwidth of the load balancing server is relatively high.

At present, continuous load balancing is a very common method. A typical product is LVS (Linux Virtual Server).

Related recommendations:

Several ways for Nginx to achieve load balancing

The above is the detailed content of Sharing of Several Load Balancing Technologies. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to share Quark Netdisk to Baidu Netdisk? How to share Quark Netdisk to Baidu Netdisk? Mar 14, 2024 pm 04:40 PM

Quark Netdisk and Baidu Netdisk are very convenient storage tools. Many users are asking whether these two softwares are interoperable? How to share Quark Netdisk to Baidu Netdisk? Let this site introduce to users in detail how to save Quark network disk files to Baidu network disk. How to save files from Quark Network Disk to Baidu Network Disk Method 1. If you want to know how to transfer files from Quark Network Disk to Baidu Network Disk, first download the files that need to be saved on Quark Network Disk, and then open the Baidu Network Disk client. , select the folder where the compressed file is to be saved, and double-click to open the folder. 2. After opening the folder, click "Upload" in the upper left corner of the window. 3. Find the compressed file that needs to be uploaded on your computer and click to select it.

How to share NetEase Cloud Music to WeChat Moments_Tutorial on sharing NetEase Cloud Music to WeChat Moments How to share NetEase Cloud Music to WeChat Moments_Tutorial on sharing NetEase Cloud Music to WeChat Moments Mar 25, 2024 am 11:41 AM

1. First, we enter NetEase Cloud Music, and then click on the software homepage interface to enter the song playback interface. 2. Then in the song playback interface, find the sharing function button in the upper right corner, as shown in the red box in the figure below, click to select the sharing channel; in the sharing channel, click the "Share to" option at the bottom, and then select the first "WeChat Moments" allows you to share content to WeChat Moments.

The Stable Diffusion 3 paper is finally released, and the architectural details are revealed. Will it help to reproduce Sora? The Stable Diffusion 3 paper is finally released, and the architectural details are revealed. Will it help to reproduce Sora? Mar 06, 2024 pm 05:34 PM

StableDiffusion3’s paper is finally here! This model was released two weeks ago and uses the same DiT (DiffusionTransformer) architecture as Sora. It caused quite a stir once it was released. Compared with the previous version, the quality of the images generated by StableDiffusion3 has been significantly improved. It now supports multi-theme prompts, and the text writing effect has also been improved, and garbled characters no longer appear. StabilityAI pointed out that StableDiffusion3 is a series of models with parameter sizes ranging from 800M to 8B. This parameter range means that the model can be run directly on many portable devices, significantly reducing the use of AI

This article is enough for you to read about autonomous driving and trajectory prediction! This article is enough for you to read about autonomous driving and trajectory prediction! Feb 28, 2024 pm 07:20 PM

Trajectory prediction plays an important role in autonomous driving. Autonomous driving trajectory prediction refers to predicting the future driving trajectory of the vehicle by analyzing various data during the vehicle's driving process. As the core module of autonomous driving, the quality of trajectory prediction is crucial to downstream planning control. The trajectory prediction task has a rich technology stack and requires familiarity with autonomous driving dynamic/static perception, high-precision maps, lane lines, neural network architecture (CNN&GNN&Transformer) skills, etc. It is very difficult to get started! Many fans hope to get started with trajectory prediction as soon as possible and avoid pitfalls. Today I will take stock of some common problems and introductory learning methods for trajectory prediction! Introductory related knowledge 1. Are the preview papers in order? A: Look at the survey first, p

DualBEV: significantly surpassing BEVFormer and BEVDet4D, open the book! DualBEV: significantly surpassing BEVFormer and BEVDet4D, open the book! Mar 21, 2024 pm 05:21 PM

This paper explores the problem of accurately detecting objects from different viewing angles (such as perspective and bird's-eye view) in autonomous driving, especially how to effectively transform features from perspective (PV) to bird's-eye view (BEV) space. Transformation is implemented via the Visual Transformation (VT) module. Existing methods are broadly divided into two strategies: 2D to 3D and 3D to 2D conversion. 2D-to-3D methods improve dense 2D features by predicting depth probabilities, but the inherent uncertainty of depth predictions, especially in distant regions, may introduce inaccuracies. While 3D to 2D methods usually use 3D queries to sample 2D features and learn the attention weights of the correspondence between 3D and 2D features through a Transformer, which increases the computational and deployment time.

How to share files with friends on Baidu Netdisk How to share files with friends on Baidu Netdisk Mar 25, 2024 pm 06:52 PM

Recently, Baidu Netdisk Android client has ushered in a new version 8.0.0. This version not only brings many changes, but also adds many practical functions. Among them, the most eye-catching is the enhancement of the folder sharing function. Now, users can easily invite friends to join and share important files in work and life, achieving more convenient collaboration and sharing. So how do you share the files you need to share with your friends? Below, the editor of this site will give you a detailed introduction. I hope it can help you! 1) Open Baidu Cloud APP, first click to select the relevant folder on the homepage, and then click the [...] icon in the upper right corner of the interface; (as shown below) 2) Then click [+] in the "Shared Members" column 】, and finally check all

Mango tv member account sharing 2023 Mango tv member account sharing 2023 Feb 07, 2024 pm 02:27 PM

Mango TV has various types of movies, TV series, variety shows and other resources, and users can freely choose to watch them. Mango TV members can not only watch all VIP dramas, but also set the highest definition picture quality to help users watch dramas happily. Below, the editor will bring you some free Mango TV membership accounts for users to use, hurry up and take a look Take a look. Mango TV latest member account free sharing 2023: Note: These are the latest member accounts collected, you can log in directly and use them, do not change the password at will. Account number: 13842025699 Password: qds373 Account number: 15804882888 Password: evr6982 Account number: 13330925667 Password: jgqae Account number: 1703

Solve the problem that Discuz WeChat sharing cannot be displayed Solve the problem that Discuz WeChat sharing cannot be displayed Mar 09, 2024 pm 03:39 PM

Title: To solve the problem that Discuz WeChat shares cannot be displayed, specific code examples are needed. With the development of the mobile Internet, WeChat has become an indispensable part of people's daily lives. In website development, in order to improve user experience and expand website exposure, many websites will integrate WeChat sharing functions, allowing users to easily share website content to Moments or WeChat groups. However, sometimes when using open source forum systems such as Discuz, you will encounter the problem that WeChat shares cannot be displayed, which brings certain difficulties to the user experience.

See all articles