Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Potential issue with session affinity and pods #722

Closed
diversemix opened this issue Apr 7, 2020 · 3 comments
Closed

Potential issue with session affinity and pods #722

diversemix opened this issue Apr 7, 2020 · 3 comments
Labels
Infrastructure General Infrastructure work Tech Debt

Comments

@diversemix
Copy link
Contributor

There is possibly an issue ...

  • When a client who is uploading a file to Pod-A
  • Another pod could be handling the websockets
  • This could result in undesirable behaviour

Answers on a thread https://elifesciences.slack.com/archives/CNBPVEGNA/p1586264249018300

@diversemix diversemix added Tech Debt Infrastructure General Infrastructure work labels Apr 7, 2020
@diversemix
Copy link
Contributor Author

diversemix commented Apr 7, 2020

The implementation in xPub is here: pubsweet-server/src/graphql/pubsub (see https://gitlab.coko.foundation/pubsweet/pubsweet/blob/master/packages/server/src/graphql/pubsub.js#L22)

    await client.connect()
    pubsub = new PostgresPubSub({ client })
    if (ignoreTerminatedError) {
      pubsub.subscribe('error', () => {})
    }

This uses the package graphql-postgres-subscriptions see - https://github.com/GraphQLCollege/graphql-postgres-subscriptions#readme

@norisalsaadie
Copy link
Contributor

Let's verify the issue. It's possible sticky sessions will work

@erkannt
Copy link
Contributor

erkannt commented Jun 23, 2020

Decided to go with sticky connections as part of #998

@erkannt erkannt closed this as completed Jun 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Infrastructure General Infrastructure work Tech Debt
Projects
None yet
Development

No branches or pull requests

3 participants