Riak Cluster Using Docker Compose

December 15, 2015 · Devops

Riak is some hot stuff lately with the increasing need for clusterzitation in the world of NoSQL data stores .

Riak is a solution to big data problem, it was based on Amazon Dynamo design, to respond to request at a very large scale,

Basho introduced Riak as fault tolerant, simple, scalable, high availability friendly .

it’s fairly easy to create/add nodes with riak-admin to a riak cluster, but if this is combined with docker-compose capabilities it will give you the possibility to have an easily deployable/scalable cluster of riak nodes.

I created a docker-compose yaml to specify all the components of the cluster, basically a seed and a set of nodes

I used  Hectcastro Riak docker image, because :  that’s the beauty of containers, they are reusable !

$git clone https://github.com/mbenachour/riak-cluster-compose.git
$cd riak-cluster-compose

 

$docker-compose up -d

Screen Shot 2015-12-15 at 5.00.52 PM

Screen Shot 2015-12-15 at 5.02.33 PM

$curl -i -d '{"name":"Bruce"}' -H "Content-Type: application/json" \
localhost:32812/riak/artists/Bruce

Screen Shot 2015-12-15 at 5.30.05 PM

Scale time ! : 

Screen Shot 2015-12-15 at 5.32.32 PM

Screen Shot 2015-12-15 at 5.36.08 PM

works !

if you are more interested to scale on multiple hosts, you can combine this with docker swarm.

 

Originally published on mohamedbenachour.net on December 15, 2015. View the original post.