- ACE Best Practices
- Building ACE
- Configuring ACE
- Using Merkle Trees to Improve ACE Performance
- Command Reference
- Performance Considerations
The Active Consistency Engine (ACE) is a tool designed to ensure eventual consistency between nodes in a cluster.
Before building ACE, you need to install Go (version 1.18 or higher).
-
Clone the repository:
git clone https://github.com/pgedge/ace cd ace -
Build the executable:
go build -o ace ./cmd/server/
This will create an executable file named
acein the current directory. You can move this file to a directory in yourPATH(e.g.,/usr/local/bin) to make it accessible from anywhere.
Before invoking any ACE commands, use the following commands to create the configuration files:
./ace cluster init --path pg_service.conf
./ace config init --path ace.yamlSet the default_cluster key in ace.yaml to the cluster name you most frequently target. When this value is present, CLI commands will use it automatically unless you provide an explicit cluster argument.
!!! info
For detailed information about creating and modifying ACE configuration files, visit [here](/docs/configuration.md).
The ace.yaml file defines default values used when executing ACE commands like table-diff or mtree table-diff. You can modify properties that influence ACE performance and execution like timeout values and certificate information.
The pg_service.conf file contains cluster connection details that help ACE locate nodes. After creating the file:
- define a base section named after the cluster (for example
[acctg]) for cluster details - define one section per node, named in the form
[cluster.node](for example,[acctg.n1]).
Then, update the file with the host, port, database, and credentials for each node before running ACE commands.
ACE checks the following locations in order for a pg_service.conf file:
- The
ACE_PGSERVICEFILEenvironment variable. - The
PGSERVICEFILEenvironment variable. - The
pg_service.conffile in the current directory. $HOME/.pg_service.conf./etc/pg_service.conf.
If none of these files contain entries for the requested cluster, ACE attempts to read the <cluster>.json file.