Parse-server: Live query - multi server

Created on 2 Aug 2017  路  1Comment  路  Source: parse-community/parse-server

Hi Guys,
I have an issue with live queries and multi servers.
My parse server is running on parallel on different server (heroku dynos)

app[web.2] : Create new client: 1
app[web.1] : beforeSave triggered for Message
app[web.2] : beforeSave triggered for Message

So the user will receive the second trigger because he is connected on web.2 and not the first one.
I wonder if there is a way to fix that ?
Thanks

Environment Setup

  • Server

    • parse-server version : 2.4.2

    • Localhost or remote server Heroku

Most helpful comment

I solved it using Redis : http://docs.parseplatform.org/parse-server/guide/#scalability

parseServerOptions.liveQuery = {
  classNames: [''],
  redisURL: redisURL
}
ParseServer.createLiveQueryServer(httpServer ,{
  appId: appId,
  masterKey: masterKey,
  serverURL: serverURL,
  redisURL: redisURL
});

>All comments

I solved it using Redis : http://docs.parseplatform.org/parse-server/guide/#scalability

parseServerOptions.liveQuery = {
  classNames: [''],
  redisURL: redisURL
}
ParseServer.createLiveQueryServer(httpServer ,{
  appId: appId,
  masterKey: masterKey,
  serverURL: serverURL,
  redisURL: redisURL
});
Was this page helpful?
0 / 5 - 0 ratings