Giter VIP home page Giter VIP logo

active-active-redis's Introduction

active-active-redis

Download Git and downlaod Dynomite Code, Build Dynomite

sudo yum install git -y
sudo git clone https://github.com/Netflix/dynomite.git
cd dynomite
sudo yum install -y autoconf automake
sudo yum install -y libtool
sudo yum install -y openssl-devel
sudo autoreconf -fvi
sudo ./configure --enable-debug=log
sudo make

Testing the Installation

src/dynomite -h

Install Redis cluster on Amazon Linux OS

sudo yum -y upgrade
sudo yum install -y gcc*
sudo yum install -y tcl
sudo wget http://download.redis.io/releases/redis-5.0.3.tar.gz
sudo tar xzf redis-5.0.3.tar.gz
cd redis-5.0.3
cd deps ; sudo make hiredis jemalloc linenoise lua ; cd ..
sudo make
sudo make test
sudo make install
cd utils ; sudo chmod +x install_server.sh ; sudo ./install_server.sh

It will ask you for the Redis Executable - it should be: /usr/local/bin/redis-server Them you can check for redis service

sudo service redis_6379 status

Config Dyno for Single Redis

sudo touch redis_single.yml
sudo vi redis_single.yml

ADD this content

dyn_o_mite:
  dyn_listen: 127.0.0.1:8101
  data_store: 0
  listen: 0.0.0.0:8102
  dyn_seed_provider: simple_provider 
  servers:
  - 127.0.0.1:6379:1
  tokens: 437425602

Run Dyno

sudo src/dynomite -c redis_single.yml
#!/bin/bash
# Set core affinity for redis and dynomite processes
#

# Requires setting the EC2 Instance type as ENV variable.
# If Dynomite is used outside of AWS environment,
# the core affinity script can be configured accordingly.
echo "$EC2_INSTANCE_TYPE"

if [ "$EC2_INSTANCE_TYPE" == "r5d.large" ]; then
   dynomite_pid=`pgrep -f $DYN_DIR/bin/dynomite`
   echo "dynomite pid: $dynomite_pid"
   taskset -pac 2 $dynomite_pid

   redis_pid=`ps -ef | grep 6379 | grep redis | awk -F' '  '{print $2}'`
   echo "redis pid: $redis_pid"
   taskset -pac 1 $redis_pid

else

   dynomite_pid=`pgrep -f $DYN_DIR/bin/dynomite`
   echo "dynomite pid: $dynomite_pid"
   taskset -pac 2,5,6 $dynomite_pid

   redis_pid=`ps -ef | grep 6379 | grep redis | awk -F' '  '{print $2}'`
   echo "redis pid: $redis_pid"
   taskset -pac 3,7 $redis_pid

fi
```bash

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.