DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Data Engineering
  3. Databases
  4. Next-Level MySQL Performance: Tarantool as a Replica

Next-Level MySQL Performance: Tarantool as a Replica

Learn how Tarantool can help you reap all the benefits of refactoring your MySQL stack by adding an in-memory NoSQL solution.

Evan Bates user avatar by
Evan Bates
·
Sep. 18, 17 · Opinion
Like (7)
Save
Tweet
Share
6.67K Views

Join the DZone community and get the full member experience.

Join For Free

Image title


Refactoring your MySQL stack by adding an in-memory NoSQL solution can improve throughput, allow scalability, and result in substantial hardware savings.

Tarantool is particularly suited as a MySQL addition, as it offers all of the speed of the basic cache databases while maintaining many features of a traditional Relational Database Management System (RDBMS).

For example, Tarantool has fully ACID transactions — including rollbacks — as well as secondary indexes and Lua-scripted stored procedures. Unlike Memcached or Redis, which can only be queried by key/value pairs, Tarantool’s data objects accommodate the use of relational-style queries, which can be written in Lua or SQL (or the two mixed together).

To illustrate Tarantool’s ability to accelerate a relational stack by replicating it, consider the raw speed differential between Tarantool and a relational counterpart. Tarantool can execute one million queries per second on a single core, whereas this feat would require anywhere from 20 to 722 cores on a relational database.

Offloading work to Tarantool’s low-overhead and lock-free architecture allows existing relational implementations to become considerably leaner — at least this is what Mamba, a large internet company, experienced: they eliminated seven servers by adding Tarantool to their MySQL stack.

Tarantool’s replication of an existing MySQL installation can take two approaches:

  1. It can be added to a more traditional type installation, perhaps where an original single node was replicated and sharded.
  2. It can be used to modernize and transition to a microservices architecture. In this installation, multiple small processes each have their own functions and data sources. Microservices are a natural fit for Tarantool because it can be run as multiple instances. The maximum known instance number of Tarantool processes is around 500.

Connection to MySQL is based on libslave and it works by reading MySQL’s binary logs. A simple configuration file specifies which databases and tables should be replicated. Whole tables need not be used, as Tarantool allows the replication of subsets of tables — i.e. fields. Data can also be put into one “space,” eliminating the need for joins between tables. With regards to monitoring, there is a separate space in Tarantool that shows a running status of the replication, which is similar toSHOW SLAVE STATUS in MySQL.

Because Tarantool features a fully scriptable Lua application server in addition to a database management system, it can serve as the “glue” between MySQL and the whole ecosystem of Lua functionality, including LuaRocks modules. Unlike the Lua implementation in Redis, Tarantool’s application server has full access to network and external services. Using the application server, it is possible, for example, to automatically remove old data from the database(s), to send an HTTP request, or to save data to the database(s). Data can even be directly served out of the database(s) via a REST API.

When added to a MySQL stack, Tarantool’s data-processing capabilities allow the stack to be downsized considerably as well as reorganized — potentially into a microservices architecture. Tarantool also greatly expands the functionality of MySQL, to the degree that a sizable amount of backend code in an application can be eliminated. To learn more, please contact us directly.

Tarantool MySQL Relational database

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • 5 Steps for Getting Started in Deep Learning
  • Important Takeaways for PostgreSQL Indexes
  • What “The Rings of Power” Taught Me About a Career in Tech
  • Key Elements of Site Reliability Engineering (SRE)

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: