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

module: cluster topology provider (MVP) #5496

Closed
Totktonada opened this issue Nov 3, 2020 · 2 comments
Closed

module: cluster topology provider (MVP) #5496

Totktonada opened this issue Nov 3, 2020 · 2 comments
Assignees
Labels
in design Requires design document lua
Milestone

Comments

@Totktonada
Copy link
Member

Totktonada commented Nov 3, 2020

Implement a service to store a cluster topology. Details TBD.

Proposal - #5793
Depends on #5681

Proposed API (early draft):

add_instance()

Description: add a new instance with specified properties to a cluster.

Supported fields:

  • uri: (string)
  • replicaset uuid: (optional string)
  • zone: (optional string)

set_instance_property()

Instance modifications.

Supported fields:

  • uri: (optional string) Assign URI.
  • uuid: (string) Assign replicaset uuid, that instance belongs to.
  • zone: (optional string) Assign availability zone, that instance belongs to.

set_instance_state()

Update instance state.

Supported fields:

  • enabled: (optional boolean) Switch instance to enabled state.
  • disabled: (optional boolean) Switch instance to disabled state.
  • expelled: (optional boolean) Expelling an instance is permanent and can’t be undone.It’s suitable for situations when the hardware is destroyed,snapshots are lost and there is no hope to bring it back to life.

set_replicaset_property()

Replicaset modifications.

Supported fields:

  • uuid: (string) The replicaset UUID.
  • roles: ({string,…}) Roles enabled on the replicaset.
  • status: (string) Replicaset health.
  • master: (ServerInfo) Replicaset leader according to configuration.
  • active_master: (ServerInfo) Active leader.
  • weight: (number) Vshard replicaset weight.Matters only if vshard-storage role is enabled.
  • vshard_group: (string) Name of vshard group the replicaset belongs to.
  • all_rw: (boolean) A flag indicating that all servers in the replicaset should be read-write.
  • alias: (string) Human-readable replicaset name.

get_topology()

Returns a structure with predefined format that contains all objects in topology with every assigned parameters values.

Topology API used in Cartridge:

  1. Source code: https://github.com/tarantool/cartridge/blob/master/cartridge/topology.lua
  2. Get topology https://www.tarantool.io/en/doc/latest/book/cartridge/cartridge_api/modules/cartridge.lua-api.get-topology/
  3. Edit topology https://www.tarantool.io/en/doc/latest/book/cartridge/cartridge_api/modules/cartridge.lua-api.edit-topology/
  4. API topology https://www.tarantool.io/en/doc/latest/book/cartridge/cartridge_api/modules/cartridge.lua-api.topology/
  5. Topology https://www.tarantool.io/en/doc/latest/book/cartridge/cartridge_api/modules/cartridge.topology/
  6. [Tarantool-patches] [RFC] qsync: provide box.info interface for monitoring
@Totktonada Totktonada added the lua label Nov 3, 2020
@Totktonada Totktonada changed the title module: cluster topology client module: cluster topology provider (MVP) Jan 10, 2021
@Totktonada Totktonada added 21sp and removed 8sp labels Jan 10, 2021
@ligurio ligurio added the in design Requires design document label Feb 5, 2021
@kyukhin kyukhin added this to the 2.8.1 milestone Feb 12, 2021
@ligurio
Copy link
Member

ligurio commented Apr 6, 2021

@ligurio
Copy link
Member

ligurio commented Apr 8, 2021

Repository with source code has been moved to Tarantool organization -
https://github.com/tarantool/topology as well as documentation - https://tarantool.github.io/topology/

Right now it is implemented minimal topology version that allows to create a topology in configuration storage using configuration provider and bootstrap vshard with that topology. More features will follow later.

@ligurio ligurio closed this as completed Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in design Requires design document lua
Projects
None yet
Development

No branches or pull requests

3 participants