Дата:   29.04.2024 г.
Время:
 
 
Профессионалам и любителям
ПРОСТО * ДОСТУПНО * ИНТЕРЕСНО
01796
Подписной
индекс
Опрос
Íóæåí ëè â æóðíàëå êðîññâîðä?
Погода
Архив - Address Carousel: 24/7 Internet Reception - Журнал «Компьютер»
Address Carousel: 24/7 Internet Reception
    Alexandr Zaitsev     Тема: Information Technology     ( Прочитано 178 раз )
 

This article is about keeping your server running smoothly under high loads. From it you will learn:
  • Why DNS balancing?
  • What problems will DNS balancing not help with?
  • When should you not implement DNS balancing?

Words Vs Numbers

   Every computer on the Internet is assigned a unique (non-repeating) number called an IP address (IP – Internet Protocol).
On the one hand, these are our smartphones, laptops, tablets, etc. On the other hand, there are various servers.
 
Servers provide execution of programs, work of applications and bots, hosting of sites. It is a social media and email service. Files, music, movies and other content.
 
Computers understand the language of numbers well, but humans understand words better. Therefore, each website, each resource, in addition to the IP address, also has a «name» and «surname».

Domain Name

   The «surname» is located to the right of the dot. This is a domain. It indicates a specific field of activity (.com – commerce, .inf – information, .biz – business, .org – organization, etc.). Or it belongs to the state (.us – USA, .ua – Ukraine, .ru – Russia, etc.).
 
The owner chooses a «name» for the website. But it should not duplicate existing ones in a specific domain. The full name of the website (name + domain) is its domain name.
 
For example: google.com (looks familiar doesn't it?).

DNS Server

   When we need a specific website, we enter its domain name into the browser's address bar. Then our computer sends a request to the Internet: ‘What is the IP address of this site?’
 
The answer is on the DNS (Domain Name System) server. This one works as an administrator at the reception in the hotel, where each guest corresponds to the number of the apartment he occupies.
 
For example, Mr. Smith occupies apartment number 238 at the hotel. And the website ruhighload.com is assigned the IP address 116.203.186.178. 
 
Physically, the address is entered into the A record on the DNS server.

There Is Safety in Numbers on the Internet

   How many people are breaking into Google, Wikipedia, Amazon, Facebook every minute? And local online stores are also often targeted by crowds. But what about servers serving resource-intensive gaming applications?
 
These websites and applications are not hosted on a single server, but on multiple servers to cope with high load. Each such server has its own IP address. It turns out that there is one domain name, and there are as many IP addresses as there are servers serving this resource. And they are all listed in A.
 
Distributing website visitors evenly across multiple servers using multiple IP addresses is called:

DNS balancing

   To implement it, there is an algorithm – Round Robin (which in slang means ‘carousel’). The user's computer receives from the DNS server, in turn, the IP addresses corresponding to the required domain name and tries to get to the corresponding server of the website.
 
 
 
 
 
Since there are too many who wish, the server is overloaded. So our computer waits for a certain time, and if it is not allowed through with one IP address, then the ‘carousel’ brings up the next one until we can get to this server. 
 
Thanks to caching, as well as the fact that with a certain setting, the IP addresses of servers from the nearest geographic zone are served first, all these attempts are made almost imperceptibly. But the load on each of the servers gets significantly optimized.
 
You can also manage the traffic by increasing the more powerful servers IP addresses number on the carousel.

Store Is No Sore

   Alas, balancing the DNS server is not a protection against a server failure that is constantly running under high loads. At the same time, until the IP addresses of the domain names in the cache of each local DNS server are updated, users will experience slowdowns. Some of them leave the website and then the biggest online sharks will lose their profits.
 
Solution: use failover mechanisms in conjunction with Round Robin. At the same time, an additional element with exactly the same configuration (with the same amount of RAM, processor frequency, etc.) is reserved for each component of the system.

It Is Very Important for the Uninterrupted Server Operation:

1. Do not allow SPOF (Single Point Of Failure) in the system, i.e. a backup element must be provided for each piece of equipment.
 
2. Instead of installing one powerful and expensive server, it is better to take two with lower performance. The probability that they both fail at the same time is extremely small.

Lifetime

   In addition, you need to reduce the TTL (Time to live) value - the lifetime of DNS records when caching requests. It shows how many seconds the DNS server will hide that the IP addresses recorded on it have changed.
 
By default, TTL = 86 400 s (24 hours). Recommended value = 300 s (5 minutes). It is not necessary to specify less, because frequent requests increase the load on the server.

When DNS Balancing Is Not Required

1. There is no need to run Round Robin algorithm on DNS server when there is no high load on the website.
 
2. There is no need to implement DNS balancing for resources that only provide access to static data, that is, those that (unlike dynamic data) are not being changed during client interaction. These are, for example, pictures and other files. And also business card sites, landing pages without feedback, etc.
 
3. Frontend is the interface of the site that you see on the display and with which you interact. On the contrary, the backend is the "engine" of the website, the database management system, etc. Those ones always remain "under the hood" and are not visible to the user.
 
Frontend is also a server. And for smooth operation, it is convenient to make a backup using the ucarp utility. Then, if the primary server (master) fails, it is immediately replaced with a spare. Moreover, it assigns itself its own IP address. Therefore, DNS balancing is not required in this case.

Summarizing

1. To the load balancing among several servers providing the operation of one resource, there is a cheap technological solution – the use of several IP addresses for one domain name in the Round Robin algorithm ("carousel") – DNS balancing.
 
2. For guaranteed server uptime, DNS balancing only is not enough. Duplication of all equipment is highly recommended.
 
3. The ucarp utility for backing up frontend servers, provides the use of one IP address for both the primary and the backup server when it replaces the failed primary server.
 
Work at high loads without interruption!
 

 
 
На главную страницу На предыдущую страницу На начало страницы
 
 
2009 - 2024 © СПД Зайцев А.Б.
Сайт является средством массовой информации.
При перепечатке и цитировании в печатных СМИ ссылка на журнал "Компьютер" обязательна.
При перепечатке и цитировании в Интернете обязательна активная гиперссылка на сайт Comput.com.ua, не закрытая для индексирования.
Украина онлайн Рейтинг@Mail.ru Рейтинг Сайтов YandeG