Skip to content
delamonpansie edited this page Nov 19, 2010 · 46 revisions

Tarantool

Eng Rus

Tarantool is a single-threaded low-overhead non-relational data store, developed with a goal of efficient memory and CPU utilization. Even though the server program is single-threaded, tens of thousands of clients are supported by means of cooperative multi-tasking and asynchronous I/O.

Functionally, the system can be split in two logical groups: the I/O and multitasking framework (referred to as "core" later) and modules. The core is built around libev event loop and is responsible for accepting incoming connections, dispatching requests to the modules, replication, hot standby and nearly instant fail-over. Currently, modules are installed into the system at compilation time. The modules implement the business logic of a specific application, e.g. a key/value hash, a RB-tree, a bitmap index, and communicate with the core by means of the core API.

The tool is being primarily developed for social applications at Mail.Ru, but is opensource and available for use and enhancement to the community. The performance based on extremely low cost of service, and proven reliability of the system significantly increase stability of the services that use Tarantool. The first version of the server, implementing only basic features of a family of storage algorithms, went online in 2008. Since then, Tarantool server has been reworked and perfected for purposes of high-performance specialized data store. The code is written in C and uses gcc C extensions.

Silverbox

Tarantool:silverbox is a key-based memory-based data store. Storage of data in memory allows the use of simpler algorithms, decrease of the number of processor instructions, and, most importantly, avoidance of the slowest component in any server system, the hard disk. Database performance of saved information in memory is noticeably higher than that of equivalent systems, which utilize the disk.

##Basics

  • Tarantool’s custom allocators avoid external fragmentation of base memory and degradation of performance when working with large numbers of small objects;
  • The system is optimized for work with large volumes of data;
  • Tarantool uses snapshot files, which contain the state of the database at the time of copy to disk;
  • Transaction logging in binary log files preserves all changes to database state, allowing automatic restoration of information after system reboot;
  • The system provides high availability, automatic switchover to an available replica in case of crash of any part of the system;
  • The system is fully compatible with the memcached protocol;
  • Local replicas allow system update without interruption to client services;
  • The system provides data replication over the network;
  • Tarantool supplies a simply binary protocol for replication, supporting the creation of additional logic.
  • The system currently builds only under gcc;
  • Tarantool has currently been tested only under Linux;
  • When very frequent and rapid changes are made in a large quantity of data, the saving of the snapshot requires a large amount of memory.
Clone this wiki locally