The findface-tarantool-server service provides interaction between the findface-sf-api service and the Tarantool-based biometric database in the following way:


See Tarantool official documentation for details.

  • From findface-sf-api, findface-tarantool-server receives data, such as information of detected in video faces, to write into the biometric database.
  • By request from findface-sf-api, findface-tarantool-server performs database searches and returns search results.

To increase search speed, multiple findface-tarantool-server shards can be created on each Tarantool host. Their running concurrently leads to a remarkable increase in performance (70x-100x).


The findface-tarantool-server configuration is done through the /etc/tarantool/instances.enabled/<shard-*>.lua configuration file. In a cluster environment, configuration has to be done for each shard.

-- Please, read the tarantool documentation at

    -- THIS IS NOT HTTP API PORT, it's for admin operations
    listen = '',

    --Directory to store data
    vinyl_dir = '/opt/ntech/var/lib/tarantool/shard-001',
    work_dir = '/opt/ntech/var/lib/tarantool/shard-001',
    memtx_dir = '/opt/ntech/var/lib/tarantool/shard-001/snapshots',
    wal_dir = '/opt/ntech/var/lib/tarantool/shard-001/xlogs',

    --Maximum mem usage in bytes
    memtx_memory = 200 * 1024 * 1024,

    checkpoint_interval = 3600*4,
    checkpoint_count = 3,

    --uncomment only if you know what you are doing!!! and don't forget box.snapshot()
    -- wal_mode = 'none',

    --if true, tarantool tries to continue if there is an error while reading a snapshot/xlog files:  skips invalid records, reads as much data as possible and re-builds the file
    -- force_recovery = true,

pcall(function() box.schema.user.grant('guest', 'execute,read,write', 'universe') end)


-- host:port to bind, HTTP API
FindFace = require("FindFace")
FindFace.start("", 8101, {

When configuring findface-tarantool-server, refer to the following parameters:

Parameter Description
force_recovery Enables automatic database recovery. In this case, each time an error occurs while reading a snapshot or xlog file, Tarantool will skip invalid records, read as much data as possible, and re-build the file.
license_ntls_server IP address and port of the findface-ntls license server.
memtx_memory Maximum RAM that can be used by a Tarantool shard. Set in bytes, depending on the number of faces the shard handles. Consult our experts by before setting this parameter.
meta_scheme A database structure to store the face recognition results. The structure is created as a set of fields. Describe each field with the following parameters: id: field id; name: field name, must be the same as the name of a relevant face parameter; field_type: data type; default: field default value, if a default value exceeds β€˜1e14 – 1’, use a string data type to specify it, for example, "123123.." instead of 123123...

Default database structure is passed from /etc/findface-security/tnt_schema.lua to the meta_scheme parameter. See Modify Biometric Database Structure for details.