This example is taken directly from the vshard repository example. A go service was written on top. Includes only 2 endpoints (see swagger): count, record sales information. Only a few changes have been made:
- slightly modified Makefile
- by default, the example was created for fault tolerance according to Raft (only for replicaset 1, since there are 3 instances)
- the number of buckets is set to 10k
- minor fixes to critical errors (for example, the “transaction” attempt was replaced by box.atomic)
- added 1 more instance to replicaset 1 so that raft could select a new master
- Start the cluster
$ cd tarantool
$ make start
- Launch the service
$ cd go-service # from the customer directory
$ make start