<commit_before>---
layout: post
title: "Setting up Redis replication"
excerpt: "The goal of this post is to install Redis on both of them and set up a master-slave replication configuration"
modified: 2013-10-24 20:43:34 +0300
categories: articles
tags: [redis, replication]
image:
  feature: 
  credit: 
  creditlink: 
comments: true
share: true
published: true
---

I created 2 ubuntu server virtual machines. The goal of this post is to install Redis on both of them and set up a master-slave replication configuration. [Redis](http://redis.io/ "Redis homepage") is an open source, BSD licensed, advanced key-value cache and store.

To start, follow these steps:

* Install redis-server on both VMs
* To test if current setup is working, run `redis-cli`
* Then run ´SET keyname "fido"´ this will set a new key and its value
* To retrieve a keu value, run `GET keyname`, and the result should be "fido"  <commit_msg>start paragraph about configuration<commit_after>---
layout: post
title: "Setting up Redis replication"
excerpt: "The goal of this post is to install Redis on both of them and set up a master-slave replication configuration"
modified: 2013-10-24 20:43:34 +0300
categories: articles
tags: [redis, replication]
image:
  feature: 
  credit: 
  creditlink: 
comments: true
share: true
published: false
---

I created 2 ubuntu server virtual machines. The goal of this post is to install Redis on both of them and set up a master-slave replication configuration. [Redis](http://redis.io/ "Redis homepage") is an open source, BSD licensed, advanced key-value cache and store.

To start, follow these steps:

* Install redis-server on both VMs
* To test if current setup is working, run `redis-cli`
* Then run ´SET keyname "fido"´ this will set a new key and its value
* To retrieve a keu value, run `GET keyname`, and the result should be "fido"  

##Configuring Redis

Now that we know Redis is working, let's continue configuring Redis. Configuration file is located at `/etc/redis/redis.conf`. 
{'fraction_non_alphanumeric': 0.07964161274265803, 'fraction_numerical': 0.018914883026381283, 'mean_word_length': 4.2894736842105265, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5104779', 'n_tokens_mistral': 623, 'n_tokens_neox': 579, 'n_words': 294}