GitHub - authzed/spicedb-operator: Kuber...
# spicedb
e
Are you able to run multiple spicedb's against the same postgres? I understand there is cachine and other things going on. But for an HA setup, is it ok to run 2 spicedbs on the same postgres and treat them as indepedent? I am seeing https://github.com/authzed/spicedb-operator and plan to pick it apart. Curious is there an any high level docs on this
k
For HA it is generally recommended to use CockroachDB or Spanner. If you treat each SpiceDB as an independent instance you could realistically use a single postgres with a individual DB for each spicedb instance.
y
@emyrk are you talking about HA between two spicedb clusters or HA between two postgres instances?
i don't know that there's much to be gained by having two independent spicedb clusters set up in an HA configuration
e
@kb_authzed We are already using a Postgres instance, it would be a lot more deployment config to require deploying another database. (Customers deploy our applpication themselves on prem) @yetitwo mainly asking if it is possible because our application can be deployed horizontally. Ideally we'd deploy spicedb embedded into our golang app. We're on a small enough scale I don't think we need to run Spicedb as another service atm. If we are to embed spicedb though, I need to determine if it is possible to run a spicedb for each application instance, sharing the same database for the graph
y
why would it be ideal to embed spicedb? it's designed to be run as a separate service - most of its scaling comes from being able to horizontally dispatch subproblems from authorization problems to peer nodes
otherwise you're going to have a very low cache hit rate, higher latency, and higher datastore load
i'll defer to the spicedb devs on whether you can run multiple instances of spicedb talking to the same datastore
also you wouldn't necessarily need authz data to be segregated per-tenant, especially if you're using globally unique identifiers
e
Sorry, stepped away from discord for a bit. Scaling isn't really a huge issue, my datastore has objects in the size of thousands. Emebedding spicedb just makes deployment easier, as our product is hosted by the customer on their own compute. I like the graph nature of the permissions for flexibility. We do not run a SaaS product, so tenants are segregated in their own instances anyway.
2 Views