nats-io / nats-server

High-Performance server for NATS.io, the cloud and edge native messaging system.
https://nats.io
Apache License 2.0
15.91k stars 1.41k forks source link

create a default ObjectStore at startup? #4876

Closed yangjinheng closed 10 months ago

yangjinheng commented 11 months ago

Proposed change

nats-server add startup parameters

-store --default_store "foo"

Use case

My program calls CreateObjectStore every time it starts, but when the election fails, my program also fails because of CreateObjectStore.

I deployed a jetstream cluster with 2 nodes

Contribution

No response

neilalexander commented 10 months ago

A 2 node cluster will only be able to operate any replicated asset if both NATS Server nodes are running. If one of those nodes fails or goes down, the system can no longer reach a >50% quorum and therefore those replicated assets will stop working.

If you want to be able to tolerate a node failure, you need a 3 node cluster at least.

yangjinheng commented 10 months ago

thanks. this is great.