Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space TMAG and version 6.11
Sv translation
languageru
Предупреждение
titleВажно!
Для использования Consul необходима реализация full-mesh топологии сети (соединение "каждый с каждым") всех агентов внутри кластера, а также серверов при объединении их в WAN.
Предупреждение
titleВажно!

В случае распределенной установки ТМ не должно быть запрета использования TCP и UDP между разными сегментами сети (в том числе нодами) в брендмауэре Windows.


Кластеризация

Агент собирает данные об узле и сервисе и отсылает их серверу. Компоненты системы в поиске сервисов обращаются с запросом к агенту, запущенному на локальной машине, который пересылает его доступному серверу. Если сеpвер не в состоянии ответить на запрос, он может направить его в другой дата-центр (филиал) и вернуть полученный ответ.

Серверы обpазуют кластер и самостоятельно назначают сервера-Лидера, отвечающего за координацию элементов в кластере. Первый/единствeнный сервер обычно запускается в bootstrap-режиме (назначаeтся лидером вручную). При старте агента для присоединения к кластеру  достаточно указать один сервер этого кластера. При его конфигурировании в опции retry_join рекомендуется указывать все серверы кластера. Кворум для провeдения операций и обеспечения согласованности требуется в каждом дата-центре. При нaличии нескольких дата-центров в каждом создается отдельный кластер. Дата-центры не изолированы друг от друга в рамках задачи обнаружения сервисов. Агент в одном дата-центре может получить информацию из другого дата-центра.

Сеть Consul может использовать один сервер, но рекомендуется, чтобы избежать потери данных, использoвать от трех до семи серверов в дата-центре.

 

Примечание
titleПример:

Кластер из трех узлов (серверов)

сохраняeт

сохраняет свою работоспособность при выходе из строя одного сервера.

Примеры использования интерфейса командной строки:

КомандаОписание
consul members
вывод списка членов кластера
consul catalog services -node <имя_ноды>
вывод списка сервисов кластера на конкретной машине
consul operator raft list-peers -stale=true
вывод списка всех серверов даже с случае развала кластера

Присоединение к кластеру

Регистрация дополнительных нод на кластере возможна любым из способов:

  • Ввести команду: consul join <ip-адрес>. При этом нужно убедиться, что у всех серверов и клиентов Consul совпадают параметры  datacenter и encrypt в конфигурационном файле consul.json (см. Конфигурационный файл consul.json и unit-файл iwtm-consul.service)
  • Указать список всех серверов, к которым надо присоединиться в параметре retry_join в конфигурационном файле consul.json
Sv translation
languageen
Предупреждение
titleImportant!

To use the Consul service, the full-mesh network topology ("each-to-each" connection) should be implemented for all the agents within the cluster and for servers, when combining them into WAN.

Предупреждение
titleImportant!

In case of distributed TM installation, using TCP and UDP between different network segments (including nodes) must be allowed in Windows firewall.

Clustering

The client collects the node- and service-related data and sends it to the server. System components searching for services send the request to the agent started on a local workstation, which resends the request to an available server. If the server is unable to respond to the request, it can send the request to a different data center (a branch) and retrieve the response.

Servers compose a cluster and define independently the leading server, responsible for elements coordination within the cluster. The first/the only one server is usually started in bootstrap mode (assigning the leader manually). When starting the agent, to connect to cluster it is enough specifying one server of this cluster. While configuring it in retry_join option, it is recommended  recommended specifying all the servers of the cluster. A quorum to held hold the operations and to provide the consistency is required in each data center. If there are few data centers, a separate cluster to be created in each of them. Data centers are not isolated from each other due to services service detection task. An agent within one data center can get an information from a separate data center. 

The Consul network can use one server, but to avoid data loss it is recommended using from three to seven servers within the data center.

 

Информация
titleExample:

A cluster consisting of three nodes (servers) continues operating when one server is out of operation.

Below are the examples of using the interface command line:

CommandDescription
consul members
displays the list of cluster members
consul catalog services -node <node_name>
displays the list of cluster servers on a specific computer
consul operator raft list-peers -stale=true
displays the list of all the servers regardless of the cluster

Connecting to cluster

You may register extra nodes on the cluster using one of the following ways:

  • Enter the command: consul join <ip-адрес>. Please make sure, all the servers and Consul clients have the same parameters datacenter and encrypt within the consul.json configuration file (see consul.json configuration file)
  • Specify the list of servers, to be joined within the parameter retry_join  of  consul.json configuration file.