Important: Make changes to your spread configuration with careful consideration. Misspellings or an incorrect configuration can prevent your database from starting up.
When a statement is executed, Vertica communicates with other nodes in the cluster via a data channel using the TCP protocol to transmit data. For example, when a query executes a COPY statement, the rows that are loaded and sent between nodes are controlled by the data channel.
The spread process uses the control channel to coordinate all messages and communication between nodes in the cluster. For example, the node state, query plan execution, and COMMIT statements are all controlled by the control channel. The control channel does not coordinate the flow of data.
The following graphic illustrates this architecture:
Spread is a messaging service that provides high reliability across networks in your database. Spread provides fault tolerance by controlling active processes and reliably delivering messages to all members in a group. Spread also provides cluster coordination by maintaining message order and retransmitting messages when necessary.
Change the Communication Mode (Broadcast or Point to Point)
Spread configuration is stored in the Vertica catalog and printed in the spread.conf file when the node starts up. You can make changes to the spread configuration using SQL statements that overwrite the spread.conf file. Manual changes in spread.conf are not persistent.
You can configure spread to run in one of two ways – either using broadcast or using point to point.
Broadcast is the default configuration for the control channel. In this configuration, nodes broadcast one message that the network switch must distribute to the other nodes.
To set the spread control mode to broadcast, use the following statement:
=> SELECT set_control_mode ('broadcast');
Control mode set to broadcast
UDP Point to Point
In this configuration, the topology is the same as broadcast. However, a node can send a package with a header to each node, and the switch can then reroute that package to the corresponding node. If the switch only has Vertica nodes, this option could present more traffic. However, if the switch has other applications or nodes, using this option reduces the chance that the package is lost. The point to point option is preferred when there are many network hops between nodes or when running clusters in the cloud.
To set the spread control mode to point to point, use the following statement:
=> SELECT set_control_mode ('pt2pt');
Control mode set to pt2pt
Changing Spread Log Configuration
Spread logging is disabled by default. For best results, keep spread logging disabled so that spread focuses on communication messages. In some situations, it might be necessary to enable spread logging to debug a particular issue.
Set spread incidentals using the following statement:
Spread uses the spread.conf file, located in the catalog folder. If you make changes to the spread configuration, you must generate a new spread.conf file, and reload spread for the changes to take effect.
To see the catalog view of the spread configuration, use the following statement:
=> SELECT generate_spread_config ();
To write out the spread.conf on the initiator node, use the following statement:
=> SELECT write_spread_config('');
To reload the spread daemons, use the following statement:
=> SELECT reload_spread (true);
After you have reloaded the spread daemons, you must stop the database and restart it for the new spread configuration to take effect.