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

Supercluster nats setup for multi data center #110

Open
gedw99 opened this issue May 5, 2024 · 0 comments
Open

Supercluster nats setup for multi data center #110

gedw99 opened this issue May 5, 2024 · 0 comments

Comments

@gedw99
Copy link

gedw99 commented May 5, 2024

I need to adjust the nats Jetstream code so it supports gateways and super clusters. This will allow replication between all you data centers globally without by data sync clashes.

https://docs.nats.io/running-a-nats-service/configuration/gateways

then , it’s just a matter of changing the config

https://docs.nats.io/running-a-nats-service/configuration/gateways/gateway

impacts

Users will tend to hit their closest data centre, and so we will not have issues with eventually consistency of mutations hitting Sqlite DB. So all good.

example

Adjust the Pocketbase example to use this, and then test using HTTP calls from many POPS ( points of presence, and then check DB consistency globally.

extra

Logging to NATS would make doing this type of work way way easier, and we have nats embedded anyway. Then from the NATS CLI you can see exactly what is going on.

https://github.com/synadia-io/rethink_connectivity/blob/main/17-microservices-architectures/slog.go has a great example and video showing how easy this is.

Need to add NATS Cli to the setup script too

PB also has a global logging feature too.

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

1 participant