Evolving Tarantool instance

130 Views Asked by At

What should we do if we have one tarantool instance (without Cartridge or VShard), then sometimes in the future we need to replicate it to another machine without downtime?

or if it's the easiest way is using cartridge, how to connect to tarantool cartridge from outside the cardridge? for example using golang (what's the username and password?):

taran, err = tarantool.Connect(cfg.Tarantool.Addr, tarantool.Opts{
    User:          cfg.Tarantool.User,
    Pass:          cfg.Tarantool.Pass,
    Reconnect:     10 * time.Second,
    MaxReconnects: 8640,
})      

for example in other database only need to attach a new slave from the master (1 command line call) and wait for it to be sync (100% replicated).

1

There are 1 best solutions below

1
On

Not sure I'll completely answer your question. But let's discuss every point separately.

Replication

You can use replication without vshard or cartridge. vshard is a module for sharding, if you don't need sharding you can use only replication feature. Read about replication in documentation configuration - https://www.tarantool.io/en/doc/latest/book/replication/. Cartridge is just framework that simplifies cluster management and gives you huge amount of useful features.

User password

Also you ask about users/passwords. After you call box.cfg{listen=...} you could create some user, alter some rights for it and change its password. Please, read about user management in Tarantool in our documentation - https://www.tarantool.io/en/doc/latest/book/box/authentication/. After you create some user you can connect to Tarantool instance via connector, console (using tarantoolctl) or another Tarantool (using net.box module) under this user. Talking about cartridge, it uses system user admin with cluster-cookie as a password.