Concept Review: Hybrid Load Balancing, Global Server Load Balancing, DNS Load Balancing, Cloud Load Balancing

Original author: NGINX

Original link: Concept review: hybrid load balancing, global server load balancing, DNS load balancing, cloud load balancing

Reprint source: NGINX open source community


The only official Chinese community of NGINX, all at nginx.org.cn 

The load balancer sits in front of the servers and is responsible for routing client requests to all servers that can satisfy those requests, while maximizing speed and capacity utilization and ensuring that no server is overloaded and suffers from performance degradation.

Read this article to learn the differences and connections between several different types of load balancing: Hybrid Load Balancing, Global Server Load Balancing, DNS Load Balancing, and Cloud Load Balancing.

What is hybrid load balancing?

Hybrid load balancing refers to distributing client requests to a group of server applications running in various environments (local, private cloud and public cloud). Hybrid load balancing maximizes the reliability, speed and cost-effectiveness of content delivery anywhere to provide the best user experience.

Today, many enterprises are migrating applications from on-premises servers to the public cloud to gain a range of benefits, such as reduced costs and easy scaling based on demand. But the entire migration typically cannot be completed overnight, and cloud environments are not suitable for all applications, so enterprises often must manage a mix of on-premises and cloud applications.

For example, a business might use an Outlook email server installed and managed locally by its in-house IT team, but store customer information in a cloud-based CRM such as Salesforce.com and have its e-commerce storage hosted on Amazon Cloud (AWS). With a hybrid load balancing solution, users access applications through a single entry point, with the load balancer identifying and distributing traffic to different locations.

Enterprises investing in private clouds face further complications as they need to load balance across three resource locations. Like public cloud, private cloud is a virtual data center hosted offsite by a cloud provider. A private cloud differs from a public cloud in that it guarantees dedicated storage and computing power that is not shared with other customers of the cloud vendor.

With a hybrid load balancing solution, enterprises can seamlessly distribute traffic between on-premises servers, private clouds, and public clouds so that each request is served by the most appropriate resource. Load balancing decisions can be based on the following factors:

  • Location  - Public cloud resources are almost always distributed geographically, as are multinational companies' on-premises and private cloud resources. Connecting users to the nearest server reduces network latency and helps deliver localized content (for example, text written in the language of the country where the server is located).

  • Request type  —A hybrid load balancing solution can forward requests for different types of content (videos, images, or application data such as pricing and inventory information) to the servers hosting such content. Using a dedicated server (which can be optimized for the content being served) eliminates the need to replicate the same content in every location.

  • Business value  —Requests from strategically important customers or potentially revenue-generating customers can be directed to dedicated servers for the fastest, most reliable delivery, while lower-value requests can be directed to lower-cost resources.

  • Security  —Enterprises can maintain maximum control over sensitive data by hosting it in a private cloud or on-premises, while saving costs by storing unrestricted data in the public cloud.

  • Cost  —Hybrid load balancing between dedicated and cloud resources allows enterprises to provide the best experience to users in the most cost-effective manner.

Hardware and software load balancing

Traditional load balancing solutions rely on proprietary hardware within the data center and can be quite costly to purchase, maintain and upgrade. Software-based load balancers offer the performance and reliability of hardware-based solutions at a lower cost because they run on commodity hardware.

Most enterprises follow best practices and deploy load balancers in the same environment as the resources they are load balancing: on-premises for applications running in the data center and in the cloud for cloud-hosted applications. Cloud infrastructure vendors typically do not allow the use of customer or proprietary hardware in their environments, so enterprises that deploy hardware load balancers on-premises must still use software load balancers to leverage cloud resources.

This requires IT staff to understand and maintain two different load balancing solutions. Software-based load balancing solutions such as NGINX and NGINX Plus can be deployed both on-premises and in the cloud, helping to reduce operational complexity and cost and shorten the time required to develop and deploy applications.

What is global server load balancing?

Global Server Load Balancing  (GSLB) is the intelligent distribution of traffic among server resources in multiple geographical locations. These servers can be located either on-premises in a company's own data center or hosted in a private or public cloud.

Disaster recovery is the main reason why many enterprises deploy server resources in multiple locations. In the most common configuration, data is served from an active location, with backup replicated at one or more passive locations—passive sites that serve data only if the active site fails. In this case, the role of the Global Server Load Balancer is to detect the failure of the active site and automatically forward requests to the backup site.

One of the main reasons for choosing active-passive mode is that there is no need to synchronize data in real time across sites; data changes from the active site can be distributed to the passive site using simpler batch processing methods and more economical out-of-band connections. If you need to maintain multiple active sites that provide the same content (some of the advantages of GSLB listed below will only appear if you maintain them effectively), then synchronizing the sites in real time becomes very important.

The advantages of global server load balancing include:

  • Reliability and Availability  - GSLB can be used to improve website reliability and availability in the event of a server or network outage. For example, if a power outage occurs in the Northeastern United States after a snowstorm, a load balancer can redirect traffic from server resources hosted in those regions to server resources hosted in other parts of the country.

  • Performance  - Delivering content from servers closer to the requesting user minimizes network latency and the chance of network issues. For example, directing requests from users in Australia to a server in Sydney instead of a server in New York can reduce the one-way distance a packet travels by approximately 10,000 miles (16,000 kilometers).

  • Meet regulatory and security requirements  —For many highly regulated industries such as defense, telecommunications, and healthcare, global server load balancing enables network architects to serve a global user base in a manner that complies with government regulations. For example, a global server load balancer can be configured to forward requests to a Canadian data center only if they come from users in Canada and not from users in other countries.

  • Deliver localized content  — Using information about the user's geographic location, the global server load balancer can forward requests to servers hosting specific content that is relevant to the user's country and written in the native language.

What is DNS load balancing?

DNS load balancing refers to configuring a domain name in the Domain Name System (DNS) so that client requests for the domain name are distributed to a set of server computers. A domain name can correspond to a website, a mail system, a print server or other services accessible through the Internet.

The DNS is the "phone book" of the Internet: it maps domain names such as www.abc.com  (the equivalent of personal or business names in the phone book) to Internet Protocol (IP) addresses such as 172.16.205.3 (the equivalent of phone numbers). Every device that sends or receives data on the Internet has a unique IP address that is used by the Internet's routing software and hardware to identify and locate the device. DNS allows users to access websites by name, which is much easier for most people than remembering the string of numbers in an IP address.

In the simplest deployment, a single computer hosts and serves data for a domain; when a client requests to resolve a domain name, DNS returns the IP address of the single service. Many domains today use multiple server computers because they need to protect against server failures or handle issues such as high traffic. In this case, DNS returns a list of IP addresses for all servers when it receives a name resolution request.

How DNS load balancing works

Most clients use the first IP address received as a domain name resolution result, and DNS load balancing takes advantage of this. In most Linux distributions, DNS defaults to using polling to send a list of IP addresses in a different order each time it responds to a new client. Therefore, different clients direct their requests to different servers, thus efficiently distributing the load among the server groups.

However, this simple DNS load balancing implementation has inherent problems that affect its reliability and efficiency. Best of all, DNS doesn't check for server or network outages or errors, so even if the server crashes or becomes unreachable, it always returns the same set of IP addresses based on the domain name.

There is another problem. Resolved addresses are typically cached by intermediate DNS servers (called "resolvers") and clients to improve performance and reduce DNS traffic on the network. Each resolved address is assigned a validity period (called a "lifetime" or "TTL"). A longer lifetime means that clients may not keep up with changes to the server group, while a shorter lifetime can improve accuracy. performance, but results in increased processing overhead and DNS traffic—the very problem that caching is designed to alleviate.

What is cloud load balancing?

Cloud load balancing refers to distributing client requests to multiple application servers running in a cloud environment. Like other forms of load balancing, cloud load balancing maximizes application performance and reliability; its advantages over traditional load balancing of on-premises resources are (usually) lower cost and the ability to easily scale with demand or shrink application.

Today, more and more businesses, especially small ones, are running a variety of applications in the cloud. A business might use a cloud-based CRM (such as Salesforce.com) to store customer information, use a cloud-based ERP system to track product data, use a web hosting provider (such as Google) to host the website, and use Amazon Elastic Compute Cloud (EC2) to run a small amount of Customized applications.

The recommended practice is to deploy the load balancer server in the same environment as the resources being load balanced. Therefore, when the majority of a company's computing infrastructure is hosted in the cloud, it is necessary to run a load balancer in the cloud.

Hardware and software load balancing

Traditional load balancing solutions rely on proprietary hardware within the data center and require an experienced IT team to install, tune and maintain the system. Only large companies with large IT budgets can benefit from improved performance and reliability. In the era of cloud computing, hardware-based solutions also have a serious drawback, and that is that they do not support cloud load balancing, because cloud infrastructure vendors often do not allow the use of customer hardware or proprietary hardware in their environments.

Fortunately, software-based load balancers offer the performance and reliability benefits of hardware-based solutions at a lower cost. Since they run on commodity hardware, even small companies can afford them. They can run in the cloud like any other software application and are ideal for cloud load balancing.

Advantages of cloud load balancing

The advantages of cloud load balancing are mainly reflected in the scalability and global nature of the cloud itself.

The ease and speed of scaling in the cloud means that enterprises can easily handle traffic peaks (such as Double Eleven traffic) by simply placing a cloud load balancer in front of a set of application instances that can quickly and automatically scale based on demand. , without degrading performance.

The ability to host applications in multiple cloud centers around the world increases reliability. For example, if the Northeastern United States experiences a power outage after being hit by a snowstorm, a cloud load balancer can direct traffic from cloud resources hosted in that region to resources hosted in other parts of the country.


The only official Chinese community of NGINX, all at  nginx.org.cn

More NGINX-related technical information, interactive Q&A, series of courses, and event resources:  Open Source Community Official Website  |  WeChat Official Account

IntelliJ IDEA 2023.3 & JetBrains Family Bucket annual major version update new concept "defensive programming": make yourself a stable job GitHub.com runs more than 1,200 MySQL hosts, how to seamlessly upgrade to 8.0? Stephen Chow's Web3 team will launch an independent App next month. Will Firefox be eliminated? Visual Studio Code 1.85 released, floating window US CISA recommends abandoning C/C++ to eliminate memory security vulnerabilities Yu Chengdong: Huawei will launch disruptive products next year and rewrite industry history TIOBE December: C# is expected to become the programming language of the year A paper written by Lei Jun 30 years ago : "Principle and Design of Computer Virus Determination Expert System"
{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/5246775/blog/10140185