Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster session concurrent write #73

Closed
Selvatico opened this issue Mar 31, 2015 · 4 comments
Closed

Cluster session concurrent write #73

Selvatico opened this issue Mar 31, 2015 · 4 comments

Comments

@Selvatico
Copy link

Hello to all,

So problem is next - we have several workers in cluster. 2 of them receive requests almost at the same time - each of them read session storage (MongoDB in our case). In parallel they are finishing their work and save all values of from session

request.session._store

to cache storage. And one of them override value of another, because both of them doesn't see changes of another and dump all data to storage. I'm wondering if exist some technics to avoid such behavior using yar ? Because from my point of view - we should implement in yar some atomic updates, but it should be implemented in catbox adapters too, which requires too much changes in core of Hapi.

@PavelPolyakov
Copy link

@OmniJeff
Hi, what is your view on the parallel writes?
How this should be done according to the architecture of the application ? Or how could we avoid this?

@OmniJeff
Copy link
Contributor

OmniJeff commented Jun 1, 2015

This would be a problem for catbox, which is what yar uses as its persistence layer. yar has little control over how catbox caches data.

@OmniJeff
Copy link
Contributor

Will not change catbox behavior. Good explanation here: outmoded/catbox-mongodb#13 (comment)

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants