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

NATS Jetstream and session replication might be of interest #200

Open
gedw99 opened this issue Mar 14, 2024 · 3 comments
Open

NATS Jetstream and session replication might be of interest #200

gedw99 opened this issue Mar 14, 2024 · 3 comments

Comments

@gedw99
Copy link

gedw99 commented Mar 14, 2024

When you have servers that are geophysically all over the world and using BGP / Anycast, NATS allows the users session to be replicated to all the Servers.

Its very easy because you can use the NATS KV Store to do this.

https://docs.nats.io/nats-concepts/jetstream/key-value-store/kv_walkthrough

@locnguyen
Copy link

I'm using NATS in a new project for pub/sub messaging. I saw that it also supports key/value storage which would allow me to remove my Redis dependency that I'm using for key/value as well as scs sessions. I wonder if anyone else is interested in a NATS custom session store :)

@gedw99
Copy link
Author

gedw99 commented Mar 24, 2024

There are already GitHub projects that replace Redis with Nats. Just can’t remember the project right now.

I did find this though:

https://www.reddit.com/r/golang/comments/1b2dfm6/jetstream_kv_a_fascinating_gobased_alternative_to/

Also for Nats kv using fiber. https://docs.gofiber.io/storage/nats_v1.x.x/nats/

I tend to stick with golang std router to keep upgrades easy.

Hopefully something here helps.

@tommyo
Copy link

tommyo commented May 15, 2024

This would be trivial to implement. I'll submit a pull request after my next rainy-day hack session.

@tommyo tommyo mentioned this issue May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants