Default to using Mongo for caching

Stress testing shows that after the recent caching optimization there
seems to be no significant difference in performance when using Mongo
for caching as opposed to Redis. Redis is still supported but is now
optional.

Also removed hiredis dependency since as of node_redis 2.6 the default
parser is faster than hiredis.
This commit is contained in:
Zaid Abdulla committed 2017-06-01 16:34:42 -07:00
1 parent b1ed1f4f2f
commit b38b3cf5ab
5 files changed
+8 -10

No files matched your search

+3 -4
View File
@@ -16,12 +16,11 @@ systems
## Quick Start
Install [Node.js](http://nodejs.org/), [Redis](http://redis.io/), and
[MongoDB](http://www.mongodb.org/). Refer to the corresponding documentation for
installation guides. Supported versions are:
Install [Node.js](http://nodejs.org/) and [MongoDB](http://www.mongodb.org/).
Refer to their corresponding documentation for installation instructions. The
supported versions are:
- Node.js: 6.x and 7.x (7.x recommended)
- Redis: 2.4 through 3.2
- MongoDB: 2.6 through 3.4
Then install GenieACS using NPM:
-2
View File
@@ -1,7 +1,5 @@
{
"MONGODB_CONNECTION_URL" : "mongodb://127.0.0.1/genieacs",
"REDIS_PORT" : "6379",
"REDIS_HOST" : "127.0.0.1",
"CWMP_INTERFACE" : "0.0.0.0",
"CWMP_PORT" : 7547,
"CWMP_SSL" : false,
+1 -1
View File
@@ -24,7 +24,7 @@ options = {
CONFIG_DIR : {type : 'path', default : 'config'},
MONGODB_CONNECTION_URL : {type : 'string', default : 'mongodb://127.0.0.1/genieacs'},
REDIS_PORT : {type : 'int', default : 6379},
REDIS_HOST : {type : 'string', default : '127.0.0.1'},
REDIS_HOST : {type : 'string', default : ''},
REDIS_DB : {type : 'int', default : 0},
CWMP_WORKER_PROCESSES : {type : 'int', default : 0},
+1 -1
View File
@@ -601,7 +601,7 @@ getSession = (httpRequest, callback) ->
currentSessions = new WeakMap()
# When socket closes, store active sessions in redis
# When socket closes, store active sessions in cache
onConnection = (socket) ->
currentSessions.set(socket, {})
socket.on('close', () ->
+3 -2
View File
@@ -19,13 +19,14 @@
"bin": "bin"
},
"dependencies": {
"hiredis": "^0.5.0",
"later": "^1.2.0",
"libxmljs": "^0.18.4",
"mongodb": "^2.2.24",
"redis": "^2.6.5",
"seedrandom": "^2.4.2"
},
"optionalDependencies": {
"redis": "^2.6.5"
},
"devDependencies": {
"coffeescript": "^1.12.4"
},