Skip to content

Commit a8013ae

Browse files
committed
Add mirroring_sync_batch_size to example config
1 parent 946ce16 commit a8013ae

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/rabbitmq.config.example

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,22 @@
299299
%% See https://www.rabbitmq.com/ha.html#queue-master-location for further details
300300
%% {queue_master_locator, <<"client-local">>},
301301

302+
%% Since RabbitMQ 3.6.0, masters perform synchronisation in batches.
303+
%% Batch can be configured via the ha-sync-batch-size queue argument.
304+
%% Earlier versions will will synchronise 1 message at a time by default.
305+
%% By synchronising messages in batches, the synchronisation process can be sped up considerably.
306+
%% To choose the right value for ha-sync-batch-size you need to consider:
307+
%% * average message size
308+
%% * network throughput between RabbitMQ nodes
309+
%% * net_ticktime value
310+
%% For example, if you set ha-sync-batch-size to 50000 messages,
311+
%% and each message in the queue is 1KB,
312+
%% then each synchronisation message between nodes will be ~49MB.
313+
%% You need to make sure that your network between queue mirrors can accomodate this kind of traffic.
314+
%% If the network takes longer than net_ticktime to send one batch of messages,
315+
%% then nodes in the cluster could think they are in the presence of a network partition.
316+
%% {mirroring_sync_batch_size, 4096},
317+
302318
%% To announce custom properties to clients on connection:
303319
%%
304320
%% {server_properties, []},

0 commit comments

Comments
 (0)