@@ -283,54 +283,102 @@ To run multiple nodes, make copies of the `riak` directory.
283
283
Presuming that you copied `./rel/riak` into `./rel/riak1`, `./rel/riak2`,
284
284
`./rel/riak3`, and so on, you need to make two changes:
285
285
286
- 1. Set your handoff port and your Protocol Buffers or HTTP port
287
- (depending on which interface you are using) to different values on each
288
- node. For example:
286
+ 1. Change the ports used by each Riak node to be unique on your host.
287
+ Specifically, you need to set to different values on each node:
288
+ - the handoff port (in either `riak.conf`)
289
+ - the Cluster Manager port (in `advanced.conf`)
290
+ - either your Protocol Buffers listener port or your HTTP listener port or both (depending on which interface you are using) (in `riak.conf`)
291
+
292
+ For example, on node 1 one could use these ports:
289
293
290
294
```riakconf
291
- # For Protocol Buffers:
295
+ # For Protocol Buffers change from:
296
+ # listener.protobuf.internal = 127.0.0.1:8097
297
+ # To something like this:
292
298
listener.protobuf.internal = 127.0.0.1:8187
293
299
294
- # For HTTP:
300
+ # For HTTP change from:
301
+ # listener.http.internal = 127.0.0.1:8098
302
+ # To something like this:
295
303
listener.http.internal = 127.0.0.1:8198
296
304
297
- # For either interface:
305
+ # For either interface set the handoff from:
306
+ # handoff.port = 8099
307
+ # To something like this:
298
308
handoff.port = 8199
299
309
```
300
310
301
- ```appconfig
302
- %% In the pb section of riak_core:
303
- {"127.0.0.1", 8187 }
311
+ ```advancedconf
312
+ {riak_core,
313
+ [
314
+ {cluster_mgr, {"127.0.0.1", 9180 } },
315
+ %% more riak_core configs
316
+ ]}
317
+ ```
318
+
319
+ And therefore on node 2, use slightly different ports:
304
320
305
- %% In the http section of riak_core:
306
- {"127.0.0.1", 8198}
321
+ ```riakconf
322
+ # For Protocol Buffers change from:
323
+ # listener.protobuf.internal = 127.0.0.1:8097
324
+ # To something like this:
325
+ listener.protobuf.internal = 127.0.0.1:8287
326
+
327
+ # For HTTP change from:
328
+ # listener.http.internal = 127.0.0.1:8098
329
+ # To something like this:
330
+ listener.http.internal = 127.0.0.1:8298
331
+
332
+ # For either interface set the handoff from:
333
+ # handoff.port = 8099
334
+ # To something like this:
335
+ handoff.port = 8299
307
336
```
308
337
309
- 2. Change the name of each node to a unique name. Now, start the nodes,
310
- changing path names and nodes as appropriate:
338
+ ```advancedconf
339
+ {riak_core,
340
+ [
341
+ {cluster_mgr, {"127.0.0.1", 9280 } },
342
+ %% more riak_core configs
343
+ ]}
344
+ ```
311
345
312
- ```bash
313
- ./rel/riak1/bin/riak start
314
- ./rel/riak2/bin/riak start
315
- ./rel/riak3/bin/riak start
346
+ Continue for all nodes on the host.
316
347
317
- # etc
318
- ```
348
+ 3. Change the name of each node to a unique name.
349
+
350
+ ```riakconf
351
+ # Change from this:
352
+
353
+ # To something like this:
354
+
355
+ ```
319
356
320
- Next, join the nodes into a cluster :
357
+ 4. Now, start the nodes, changing path names and nodes as appropriate :
321
358
322
- ```bash
323
- ./rel/riak2/bin/riak admin cluster join [email protected]
324
- ./rel/riak3/bin/riak admin cluster join [email protected]
325
- ./rel/riak2/bin/riak admin cluster plan
326
- ./rel/riak2/bin/riak admin cluster commit
327
- ```
359
+ ```bash
360
+ ./rel/riak1/bin/riak start
361
+ ./rel/riak2/bin/riak start
362
+ ./rel/riak3/bin/riak start
363
+
364
+ # etc
365
+ ```
366
+
367
+ 5. Next, join the nodes into a cluster:
368
+
369
+ ```bash
370
+ ./rel/riak2/bin/riak admin cluster join [email protected]
371
+ ./rel/riak3/bin/riak admin cluster join [email protected]
372
+ ./rel/riak2/bin/riak admin cluster plan
373
+ ./rel/riak2/bin/riak admin cluster commit
374
+ ```
328
375
329
376
## Multiple Clusters on One Host
330
377
331
378
Using the above technique, it is possible to run multiple clusters on
332
379
one computer. If a node hasn’t joined an existing cluster, it will
333
380
behave just as a cluster would. Running multiple clusters on one
334
381
computer is simply a matter of having two or more distinct nodes or
335
- groups of clustered nodes.
382
+ groups of clustered nodes. Please note that each cluster should have a
383
+ different value for `distributed_cookie`.
336
384
0 commit comments