mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
mvp2 for redis-cluster
This commit is contained in:
parent
afaf045d15
commit
e3618acf20
4 changed files with 27 additions and 11 deletions
|
@ -19,7 +19,7 @@ SessionSockets = require('session.socket.io')
|
||||||
CookieParser = require("cookie-parser")
|
CookieParser = require("cookie-parser")
|
||||||
|
|
||||||
|
|
||||||
|
sessionRedisClient.set "hello-a", "hello-there"
|
||||||
|
|
||||||
DrainManager = require("./app/js/DrainManager")
|
DrainManager = require("./app/js/DrainManager")
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
module.exports =
|
settings =
|
||||||
redis:
|
redis:
|
||||||
realtime:
|
realtime:
|
||||||
host: process.env['REAL_TIME_REDIS_HOST'] or process.env['REDIS_HOST'] or "localhost"
|
host: process.env['REAL_TIME_REDIS_HOST'] or process.env['REDIS_HOST'] or "localhost"
|
||||||
|
@ -15,10 +15,9 @@ module.exports =
|
||||||
key_schema:
|
key_schema:
|
||||||
pendingUpdates: ({doc_id}) -> "PendingUpdates:#{doc_id}"
|
pendingUpdates: ({doc_id}) -> "PendingUpdates:#{doc_id}"
|
||||||
|
|
||||||
websessions:
|
websessions: {}
|
||||||
host: process.env['WEB_REDIS_HOST'] or process.env['REDIS_HOST'] or "localhost"
|
|
||||||
port: process.env['WEB_REDIS_PORT'] or process.env['REDIS_PORT'] or "6379"
|
|
||||||
password: process.env["WEB_REDIS_PASSWORD"] or process.env["REDIS_PASSWORD"] or ""
|
|
||||||
|
|
||||||
internal:
|
internal:
|
||||||
realTime:
|
realTime:
|
||||||
|
@ -43,3 +42,20 @@ module.exports =
|
||||||
max_doc_length: 2 * 1024 * 1024 # 2mb
|
max_doc_length: 2 * 1024 * 1024 # 2mb
|
||||||
|
|
||||||
forceDrainMsDelay: process.env['FORCE_DRAIN_MS_DELAY'] or false
|
forceDrainMsDelay: process.env['FORCE_DRAIN_MS_DELAY'] or false
|
||||||
|
|
||||||
|
if process.env['REDIS_CLUSTER_ENABLED'] == "true"
|
||||||
|
settings.redis.websessions.cluster = [
|
||||||
|
{ host: process.env["SL_LIN_STAG_REDIS_3_SERVICE_HOST"], port: "6379" }
|
||||||
|
]
|
||||||
|
settings.redis.websessions.natMap = {
|
||||||
|
'192.168.201.24:6379': { host: process.env["SL_LIN_STAG_REDIS_0_SERVICE_HOST"], port: "6379" }
|
||||||
|
'192.168.195.231:6379': { host: process.env["SL_LIN_STAG_REDIS_1_SERVICE_HOST"], port: "6379" }
|
||||||
|
'192.168.223.53:6379': { host: process.env["SL_LIN_STAG_REDIS_2_SERVICE_HOST"], port: "6379" }
|
||||||
|
'192.168.221.84:6379': { host: process.env["SL_LIN_STAG_REDIS_3_SERVICE_HOST"], port: "6379" }
|
||||||
|
'192.168.219.81:6379': { host: process.env["SL_LIN_STAG_REDIS_4_SERVICE_HOST"], port: "6379" }
|
||||||
|
'192.168.180.104:6379': { host: process.env["SL_LIN_STAG_REDIS_5_SERVICE_HOST"], port: "6379" }
|
||||||
|
'192.168.220.59:6379': { host: process.env["SL_LIN_STAG_REDIS_6_SERVICE_HOST"], port: "6379" }
|
||||||
|
'192.168.129.122:6379': { host: process.env["SL_LIN_STAG_REDIS_7_SERVICE_HOST"], port: "6379" }
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = settings
|
6
services/real-time/npm-shrinkwrap.json
generated
6
services/real-time/npm-shrinkwrap.json
generated
|
@ -1755,9 +1755,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"redis-sharelatex": {
|
"redis-sharelatex": {
|
||||||
"version": "1.0.4",
|
"version": "511b59f3414d6e3db23a4b61239fd2cf3e07cdb0",
|
||||||
"from": "git+https://github.com/sharelatex/redis-sharelatex.git#v1.0.4",
|
"from": "git+https://github.com/sharelatex/redis-sharelatex.git#511b59f3414d6e3db23a4b61239fd2cf3e07cdb0",
|
||||||
"resolved": "git+https://github.com/sharelatex/redis-sharelatex.git#ca4e906559c1405d132e8edd7db763d64a57be62",
|
"resolved": "git+https://github.com/sharelatex/redis-sharelatex.git#511b59f3414d6e3db23a4b61239fd2cf3e07cdb0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async": {
|
"async": {
|
||||||
"version": "2.6.1",
|
"version": "2.6.1",
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"express-session": "^1.9.1",
|
"express-session": "^1.9.1",
|
||||||
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.5.9",
|
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.5.9",
|
||||||
"metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v2.0.12",
|
"metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v2.0.12",
|
||||||
"redis-sharelatex": "git+https://github.com/sharelatex/redis-sharelatex.git#v1.0.4",
|
"redis-sharelatex": "git+https://github.com/sharelatex/redis-sharelatex.git#511b59f3414d6e3db23a4b61239fd2cf3e07cdb0",
|
||||||
"request": "~2.34.0",
|
"request": "~2.34.0",
|
||||||
"session.socket.io": "^0.1.6",
|
"session.socket.io": "^0.1.6",
|
||||||
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.1.0",
|
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.1.0",
|
||||||
|
|
Loading…
Reference in a new issue