Redis Support for HostingLimits

Navigation:  Limits > Integration Components > HostingLimits module for Apache >

Redis Support for HostingLimits

Previous pageReturn to chapter overviewNext page

Redis support provides a way to query Redis database for LVE id, based on domain in the HTTP request. Given a database like:

 

xyz.com 10001
bla.com  10002
....

 

The module will retrieve corresponding LVE id from the database.

 

To enable Redis support, compile from source: http://repo.cloudlinux.com/cloudlinux/sources/mod_hostinglimits.tar.gz

 

The compilation requires hiredis library.

 

$ wget http://repo.cloudlinux.com/cloudlinux/sources/da/mod_hostinglimits.tar.gz
$ yum install cmake
$ tar -zxvf mod_hostinglimits*.tar.gz
$ cd mod_hostinglimits*
$ cmake -DREDIS:BOOL=TRUE .
$ make
$ make install

 

To enable Redis mode, specify:

 

LVEParseMode REDIS

 

 

LVERedisSocket

Description:

Socket to use to connect to Redis database

Syntax:

LVERedisSocket path

Default:

/tmp/redis.sock

Context:

server config

Used to specify location of Redis socket.

Example:  

LVERedisSocket /var/run/redis.sock

 

LVERedisAddr

Description:

IP/port used to connect to Redis database instead of socket

Syntax:

LVERedisAddr IP PORT

Default:

none

Context:

server config

Used to specify IP & port to connect to Redis instead of using Socket

Example:  

LVERedisAddr 127.0.0.1 6993

 

 

LVERedisTimeout

Description:

Number of seconds to wait before attempting to re-connect to redis

Syntax:

LERetryAfter SECONDS

Default:

60 seconds

Context:

server config

Number of seconds to wait before attempting to reconnect to Redis after last unsuccessful attempt to connect

Example:

LVERedisTimeout 120