ECS + Cluster Dispatch
# spicedb
s
Hi all, does anyone know if there’s a way to run a cluster of spicedb instances using something like ECS? I can start one instance fine; but how does the clustering stuff work behind the scenes?
v
Hi 👋 SpiceDB does cluster Dispatch by leveraging the Kube API Server to discover other SpiceDB instances, essentially reading the list of endpoints for a given Service, if I recall correctly. There is also support for discovery via XDS. Unfortunately I'm not aware (i.e. we haven't spent time on it) of a way to do dispatching our of the box on ECS. You could use whatever API they expose for service discovery, but it won't be plug and play.
s
They do have “cloud map” which updates dns automatically when new tasks are spun up in a specific cluster.
From my read of the docs; would it be sufficient to pass that zone to spicedb?
j
Yes but it may cause some failures while the DNS is updating
so it’s something to be aware of
s
As in; permission lookup failures?
j
Dispatch, but yes
It should be minimal but it can happen if the DNS takes some time to update
e
hi! just wondering, did you get this to work?
v
we are not aware of folks doing cluster dispatch on ECS - AWS has a special API for this, and it would at the very least modify SpiceDB to support it.
s
@edulop haven't had time to implement yet. Will let you know if I do.
e
thank you!
v
Hey guys, I looked briefly into how to support ECS. Would using AWS CloudMap for service discovery be a viable option for y'all?
s
@vroldanbet yeah; we use cloud map - that would be a great option.
v
Actually it's not much better than the DNS resolver, you'd still get failures as nodes come and go