How to use hearbeat and postgre

2022-08-16
  • Detail

How to use the hearbeat and PostgreSQL database to realize the hot standby of IPPBX dual computers example

enterprise communication solution is the core component of enterprise communication. If its stability is not fully guaranteed, employee communication and customer communication will bring many problems. Generally speaking, relatively small or medium-sized IPPBX or UC do not need complex backup processing mechanism, but only backup system files. However, relatively large systems or systems with more than users need a relatively stable hot standby mechanism in order to reduce operational risks. Today, we share a typical case of hot standby processing of IPPBX by using heartbeat mechanism and database

legend comes from Internet resources

with the process of all IP communication, voice, video, conference and integrated communication based on IP have been widely used in modern enterprises. As the core part of the communication system, IPPBX deployed by enterprises, how to ensure high reliability and security is particularly important, and has also become a standard to test the ability of the system

uc8000 series IPPBX launched by Dingxin Tongda is an enhanced soft switch system based on the latest technology. It adopts the architecture of soft switch + hardware server, which can provide a highly reliable solution for dual computer hot standby. Through hardware redundancy and the technical scheme realized by highly available dual computer hot standby software, it can automatically detect the running state of the server. When the host fails, it can immediately switch to the standby computer to take over the business, and the customer has no perception, switching at the second level, To ensure the uninterrupted operation of business system and provide stable and reliable communication guarantee for enterprises

description of dual computer hot standby architecture

in order to solve the problem that the communication system can still work normally under the influence of uncontrollable factors and highly ensure the uninterrupted communication of users, it is necessary to adopt dual computer hot standby mode to ensure the high reliability of the system. Dual machine hot standby is a combination of hearbeat, PostgreSQL master-slave configuration and daemon

heartbeat is responsible for heartbeat detection between master and slave servers. When it is detected that the master server does not send heartbeat packets within the specified time, it is judged that the master server has failed, and heartbeat will immediately set the slave server as the master server to take over the business, so as to ensure that the user communication system will not be affected by the failure. At the same time, the dual computer hot standby configuration of the database, when users write data to the database, will be written into the database of the master and slave servers at the same time. When the master database fails and breaks down, how can we solve the bottleneck of market utilization of new materials? Chang Guowu proposed to immediately switch the use of the slave database server to ensure the loss of user data

uc8000 system's intelligent daemon will monitor whether the business system status is running normally in real time. If it detects that the daemon stops working, the daemon will try to restart it, so as to ensure that both the master and slave server systems are running normally. In addition to heartbeat heartbeat detection, the IPPBX server equivalent to a single machine also performs master-slave synchronization and failover of PostgreSQL databases. Ensure that the data configuration of the master-slave soft switch node is consistent, and when the server fails and goes down, the standby server will be automatically switched, and the PostgreSQL database role will also be automatically switched to the master

deployment method 1: IPPBX system and database are deployed on the same server

the number of enterprise users is small, the call business data is small, and the requirements for the safe storage of user dialog lists, recordings and other data information are not particularly high. You can deploy IPPBX and database on the same server to realize the dual machine hot standby deployment scheme, deploy heartbeat detection on two uc8000 servers respectively, and use eth1 interface for heartbeat detection, The eth0 interface is used to run the call service. The eth0 interface of the slave server is down by default. When the main server is detected to be down, the standby server will automatically enable the eth0 interface of the machine, so as to transfer all the services of the main server to the standby server. All data of the active and standby servers will be synchronized in real time. When the active and standby servers are switched, the consistency of data will be guaranteed to ensure the stable operation of the user's communication system

group topology:

deployment mode 2: IPPBX and database are deployed separately, and dual database backup

if users have high requirements for data security storage, and data is particularly important to customers, a highly reliable solution of IPPBX soft switch and independent deployment of databases can be adopted. IPPBX realizes dual computer hot standby, and dual databases are deployed to realize data disaster recovery backup, which can ensure the safety of customer data, Deploy heartbeat detection on two uc8000 servers respectively, and use eth1 interface for heartbeat detection. Eth breaking load is also called breaking strength. 0 port is connected externally for running call service. Eth0 port of the slave server is down by default. When the main server is detected to be down, the standby server will automatically enable the eth0 interface of the machine, so as to transfer all services of the main server to the standby server. In addition to highlighting the key soft switch business of financial stability, there is also the master-slave synchronization and master-slave switching script of PostgreSQL. Uc8000 will send CDR bill, recording and other data to the master-slave database server at the same time, so as to realize the synchronization of business data and disaster recovery backup, and escort the stable operation of users' communication system

group topology:

reference:

users can't enjoy warranty service due to man-made damage

Copyright © 2011 JIN SHI