Giter Club home page Giter Club logo

mod_redis_plus's Introduction

mod_redis_plus

FreeSWITCH connect to redis with cluster and sentinel model

Dependency

Before installing, you need to install hiredis and redis-plus-plus

redis-plus-plus must compile by c++11

when you done it, you need run this to check it:

pkg-config --list-all | grep redis++
pkg-config --list-all | grep hiredis

Install

  • Copy the following content to your configure.ac
    PKG_CHECK_MODULES([HIREDIS], [hiredis >= 0.10.0],[
    AM_CONDITIONAL([HAVE_HIREDIS],[true])],[
    AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_HIREDIS],[false])])
    
    PKG_CHECK_MODULES([REDIS_PLUS], [redis++ >= 1.3.10],[
    AM_CONDITIONAL([HAVE_REDIS_PLUS],[true])],[
    AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_REDIS_PLUS],[false])])
    
    src/mod/applications/mod_redis_plus/Makefile
    
  • Modify modules.conf in freeswitch source, add applications/mod_redis_plus
  • Clone source mod_redis_plus to src/mod/application/
    git clone https://github.com/nikohpng/mod_redis_plus ./src/mod/application/
    
  • Run autoreconf -fiv to rebuild m4 file
    • Maybe, you need run yum install -y libtool or apt-get install libtool
  • Run rebootstrap.sh or bootstrap.sh to rebuild Makefile.in
  • If everything is ok, you can do ./configure && make && make install
  • Add mod_redis_plus to freeswitch/conf/autoload/modules.conf.xml
  • Add autoload_conf/redis_plus.conf.xml to freeswitch/conf/autoload_configs

Configuration

  • profiles - save multiple profiles
    • profile - it contain all configuration of a connection
    • connection - a connection name
    • hostname - a connection ip address, localhost by default.
      • if it is sentinel, need like this 192.168.1.24:28001,192.168.1.25:28002
    • password - this connnection password
    • port - connect to redis port, 6379 by default
    • redis-type - how connect to redis server, [0: single 1: cluster 2: sentinel]
    • master-name - when sentinel type, you need fill it
    • sentinel-timeout-ms - sentinel connection and socket timeout, 200 by default
    • timeout-ms - redis connection and socket timeout, 100 by default
    • ignore-connect-fail - ignore connection fail in profile
    • max_pipelined_requests - pipline request, 20 by default

mod_redis_plus's People

Contributors

nikohpng avatar

Stargazers

Zhu Pengyue avatar

Watchers

 avatar

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.