In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Preface
FTS (Fault Tolerance Serve) is the fault detection service in GreenPlum and the core function to ensure the high availability of GP. The health detection and HA of GreenPlum's Segment is realized by GP Master. There is a special process on GP Master-FTS process, which can quickly detect whether Primary or Mirror is down or not, and make Primary/Mirror failover in time.
I. FTS architecture
The health detection and HA of GreenPlum's Segment is realized by GP Master. There is a special process on GP Master-FTS process, which can quickly detect whether Primary or Mirror is down or not, and make Primary/Mirror failover in time. If FTS dies, Master will re-fork a FTS process.
Second, the principle of FTS implementation.
The FTS process on GP Master sends heartbeat packets to Primary or Mirror every 60s (time can be configured). Primary and Mirror return their current state after receiving heartbeat packets. FTS process heartbeat packets send status and Segment return status update meta-information and fail over. Because there can be a lot of Segment, to speed up detection, FTS is multithreaded, with a default of 16 threads.
III. Segment detection and failover
GP Master will first detect the Primary status. If the Primary is not reachable, it will detect the Mirror status. There are a total of 4 Primary/Mirror states:
Primary is alive, Mirror is alive. Return directly after GP Master probe Primary is successful, and proceed to the next Segment detection.
Primary is alive, Mirror is dead. After GP Master successfully detects Primary, it learns from the status returned by Primary that Mirror is dead (after Mirror is dead, Primary will detect and change itself into ChangeTracking mode). At this time, update Master meta information and proceed to the next Segment detection.
Primary is dead. Mirror is alive. After GP Master fails to detect Primary, it detects Mirror and finds that Mirror is alive. At this time, update the meta-information on Master and make Mirror take over Primary (failover) for the next Segment detection.
Primary is dead, Mirror is dead. After GP Master failed to detect Primary, the probe Mirror,Mirror also failed until the maximum value was retried, the detection of this Segment was finished, the Master meta information was not updated, and the next Segment detection was carried out.
4. Parameter configuration 4.1and gp_fts_probe_threadcount
The number of threads used for fault detection, the default is 16.
4.2 、 gp_fts_probe_interval
The interval between the two tests is 60s by default. If the time for a test is 10s, then the remaining 50s will sleep;. If it exceeds 60s, it will go directly to the next test.
4.3 、 gp_fts_probe_timeout
Detect Segment timeout. Default is 20.
4.4 、 gp_fts_probe_retries
The number of failed retries to detect Segment. If it exceeds this number, the current node will be considered dead. The default value is 5.
4.5 、 gp_segment_connect_timeout
Prmary and Mirror file synchronization allows the maximum timeout for connecting to Mirror. If this timeout is reached, Primary will think that Mirror is dead. The default value is 180s.
V. Summary
Through the study of GreenPlum FTS mechanism, we can understand some of the principles of high availability of MPP architecture. At the same time, according to their own business, reasonable configuration of FTS parameters to ensure high availability of GP.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.