Steps to create two Docker Swarm clusters, a Couchbase cluster in each, and setup XDCR between the two Couchbase cluster are below:
-
To start local clusters A,B with XDCR
run_all.sh
-
Test of different Couchbase topologies:
-
[TEST 1] - Single Node App (DEV):
-
JavaREST Api Server (PUT and GET)
-
Couchbase 1
-
Limitations: DEV mode 1 APi 1 DB no DR no HA
-
TestResults:
HEALTHY:
✓ READ status 200 ✓ WRITE status 200
checks................: 100.00% ✓ 474 ✗ 0 data_received.........: 4.2 kB 34 B/s data_sent.............: 2.5 kB 20 B/s http_req_blocked......: avg=23.16µs min=3.4µs med=2.95µs max=3.62ms p(90)=7.56µs p(95)=8.32µs http_req_connecting...: avg=16.54µs min=0s med=0s max=3.53ms p(90)=0s p(95)=0s http_req_duration.....: avg=6.14ms min=3.81ms med=2.61ms max=18.76ms p(90)=9.39ms p(95)=11.27ms http_req_receiving....: avg=224.36µs min=40.01µs med=46.76µs max=2.59ms p(90)=528.07µs p(95)=627.86µs http_req_sending......: avg=40.49µs min=20.7µs med=17.72µs max=278.08µs p(90)=47.36µs p(95)=62.52µs http_req_waiting......: avg=5.88ms min=3.34ms med=2.47ms max=18.55ms p(90)=9.24ms p(95)=11.08ms http_reqs.............: 474 3.949983/s iterations............: 236 1.966658/s vus...................: 2 min=2 max=2 vus_max...............: 2 min=2 max=2 time="2017-12-18T23:43:41Z" level=info msg="Test finished" i=236 t=2m0.000519299s
-
-
[TEST 2] - no DR no HA (5 nodes 1 cluster):
-
JavaREST Api Server (PUT and GET)
-
Couchbase A (Cluster) 1 node
-
Limitations: This model limited to replication factor 3 = Max 4 nodes and it is not tolerating restart of nodes of rebalansing
-
TestResults:
HEALTHY:
✓ READ status 200 ✓ WRITE status 200
checks................: 100.00% ✓ 470 ✗ 0 data_received.........: 4.2 kB 34 B/s data_sent.............: 2.5 kB 20 B/s http_req_blocked......: avg=111.94µs min=2.75µs med=2.85µs max=34.44ms p(90)=8.21µs p(95)=10.13µs http_req_connecting...: avg=38.72µs min=0s med=0s max=8.94ms p(90)=0s p(95)=0s http_req_duration.....: avg=9.98ms min=3.98ms med=3.21ms max=564.09ms p(90)=12.34ms p(95)=14.68ms http_req_receiving....: avg=491.2µs min=40.94µs med=52.71µs max=11.32ms p(90)=802.87µs p(95)=1.41ms http_req_sending......: avg=45.18µs min=19.66µs med=17.96µs max=501.72µs p(90)=56.69µs p(95)=103.11µs http_req_waiting......: avg=9.45ms min=3.55ms med=2.96ms max=559.07ms p(90)=12.02ms p(95)=14.08ms http_reqs.............: 470 3.916658/s iterations............: 234 1.949996/s vus...................: 2 min=2 max=2 vus_max...............: 2 min=2 max=2 time="2017-12-18T23:47:50Z" level=info msg="Test finished" i=234 t=2m0.000267858s
UNDER RESTART:
✗ READ status 200 ↳ 78% — ✓ 91 / ✗ 25 ✗ WRITE status 200 ↳ 54% — ✓ 64 / ✗ 54
checks................: 66.24% ✓ 155 ✗ 79 data_received.........: 32 kB 262 B/s data_sent.............: 19 kB 157 B/s http_req_blocked......: avg=4.91ms min=2.94µs med=4.05µs max=194.58ms p(90)=8.61ms p(95)=18.31ms http_req_connecting...: avg=2.04ms min=0s med=0s max=155.91ms p(90)=2.18ms p(95)=6.28ms http_req_duration.....: avg=473.3ms min=2.86ms med=3.6ms max=6.98s p(90)=2.51s p(95)=2.55s http_req_receiving....: avg=3.89ms min=33.79µs med=78.79µs max=247.54ms p(90)=3.12ms p(95)=11.65ms http_req_sending......: avg=2.22ms min=17.68µs med=25.69µs max=75.64ms p(90)=4.91ms p(95)=9.89ms http_req_waiting......: avg=467.18ms min=2.47ms med=2.83ms max=6.74s p(90)=2.5s p(95)=2.54s http_reqs.............: 234 1.949495/s iterations............: 116 0.966417/s vus...................: 2 min=2 max=2 vus_max...............: 2 min=2 max=2
-
-
[TEST 3] - DR HA [Active - Active] (6 nodes 3 + 3 = 2 clusters):
-
HA Proxy LB LB will balance between 2 applications HA between 2 sites A & B
-
Site A (1)
-
JavaREST Api Server (PUT and GET)
-
Couchbase A (Cluster) 3 nodes
-
Site B (1)
-
JavaREST Api Server (PUT and GET)
-
Couchbase B (Cluster) 3 nodes
-
XDCR () A - B <⇒ B - A
-