noria icon indicating copy to clipboard operation
noria copied to clipboard

Run without ZooKeeper

Open AnharMiah opened this issue 5 years ago • 6 comments

would it be possible to run without ZooKeeper for much simpler/basic deployments so its inline with other databases e.g. MySql/PosgreSql?

AnharMiah avatar Apr 18 '19 09:04 AnharMiah

This is actually already supported by using a LocalAuthority. We'd probably want to make it even more convenient to launch a server using those settings though!

jonhoo avatar Apr 18 '19 14:04 jonhoo

thanks @jonhoo is there any documentation on how to use this LocalAuthority ?

Ideally, I would love to just do:

$ ./noria --config=/path/to/config

:)

AnharMiah avatar Apr 18 '19 14:04 AnharMiah

So, one thing worth pointing out here is that, at the moment, ZooKeeper is the way that clients (including the MySQL shim) discover the server as well. Even if you could run just the Noria server like you show above, then you wouldn't actually have a way of interacting with it. This is probably something we should fix, though it's somewhat more involved than I had initially thought. @ms705 something worth thinking about.

jonhoo avatar Apr 24 '19 14:04 jonhoo

I think it would be great to have a config file-based authority implementation!

ms705 avatar Aug 07 '19 15:08 ms705

I have taken a stab at implementing a static client/server config option in the mysql proxy. https://github.com/mit-pdos/noria-mysql/pull/10

I was able to do this without editing Noria code, but having some helper constructs would be nice, as you can tell from the code in the PR.. the gist of the idea is here: https://github.com/mit-pdos/noria-mysql/pull/10/files#diff-639fbc4ef05b315af92b4d836c31b023R136

Basically we statically construct a LocalAuthority and pre-populate the CONTROLLER value with the value of the new server_addr argument.

I am not even sure if this is the correct approach.. if it is, we can build on it.

rrichardson avatar Oct 23 '19 22:10 rrichardson

I'm a bit out of my depth here, but is there any chance that using a native Rust service discovery library such as https://docs.rs/tower/0.4.6/tower/discover/index.html could be a more robust solution to removing the Zookeeper dependency?

rayrrr avatar Jun 11 '22 21:06 rayrrr