8000 GitHub - eloqdata/eloqsql: A MySQL-compatible, high performance, elastic, distributed SQL database.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A MySQL-compatible, high performance, elastic, distributed SQL database.

License

Unknown, GPL-2.0 licenses found

Licenses found

Unknown
LICENSE
GPL-2.0
COPYING
Notifications You must be signed in to change notification settings

eloqdata/eloqsql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

EloqSQL

A MySQL-compatible, high performance, elastic, distributed SQL database.

GitHub Stars

Overview

EloqSQL is a distributed SQL database designed to combine MySQL compatibility with the scalability and performance of modern distributed systems. Built on top of Data Substrate, it replaces traditional storage engines like InnoDB with a flexible, distributed and high-performance eloq engine: Transaction Service. It has distributed buffer pool and support Cassandra, ScyllaDB and DynamoDB as the underlying data store.

EloqSQL delivers full ACID transactions, elastic scaling, and efficient resource utilization, making it ideal for demanding workloads.

EloqSQL is forked from MariaDB, and inherit the parser, optimizer and executor from MariaDB to provide a MySQL compatibility. For the difference between MySQL and MariaDB, please refer to MySQL vs MariaDB.

Explore EloqSQL website for more details.

πŸ‘‰ Use Cases: Scalable web applications, e-commerce platforms, real-time data processing β€” anywhere you need MySQL compatibility but demand distributed performance and elasticity.


Key Features

βš™οΈ MySQL Compatibility

Seamlessly integrates with MySQL clients and tools, allowing you to leverage existing SQL workflows while benefiting from a distributed backend.

🌐 Distributed Architecture

Supports multiple writers and distributed transactions, enabling high concurrency and fault tolerance across a cluster.

πŸ”„ Elastic Scalability

Independently scales CPU, memory, log, and storage resources. Scales out effortlessly without requiring data sharding, adapting to your workload dynamically.

πŸ—ƒοΈ Flexible Storage Options

Stores data in high-performance key-value engines like Cassandra, ScyllaDB, and DynamoDB, offering better disk compression ratios than InnoDB. Save up to 80% on disk storage costs compared to MySQL.

Supports object storage as tiered storage to reduce costs for cold data.

πŸ”₯ High-Performance Hot Data

Leverages the scalable Transaction Service to keep hot data in memory, ensuring low-latency access. Scales the buffer pool dynamically as hot data growsβ€”without moving data on disk.

πŸ”’ Full ACID Transactions

Provides robust transaction support with Read Committed and Repeatable Read isolation levels, ensuring data consistency and reliability.


Architecture Highlights

  • Hot Data Management: Hot data resides in the in-memory Transaction Service, which scales independently to handle growing datasets efficiently.
  • Storage Tiering: Combines key-value stores for active data with cost-effective object storage, optimizing both performance and cost.
  • No Sharding Required: Unlike traditional distributed databases, EloqSQL scales out naturally without the complexity of sharding.

Run with EloqCtl

EloqCtl is the cluster management tool for EloqSQL.

To deploy an EloqKV cluster in production, download EloqCtl and follow the deployment guide.


Run with Tarball

Download the EloqKV tarball from the EloqData website.

Follow the instruction guide to set up and run EloqSQL on your local machine.


Build from Source

Follow these steps to build and run EloqSQL from source.

1. Install Dependencies

We recommend using our Docker image with pre-installed dependencies for a quick build and run of EloqKV.

docker pull eloqdata/eloq-build-ubuntu2404:latest

Or, you can manually run the following script to install dependencies on your local machine (Ubuntu 24.04 example).

bash scripts/install_dependency_ubuntu2404.sh

2. Initialize Submodules

Fetch the Transaction Service and its dependencies:

git submodule update --init --recursive

3. Build EloqSQL

Configure and compile with optimized settings:

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${HOME}/install \
      -DCMAKE_BUILD_TYPE=RelWithDebInfo \
      -DWITH_READLINE=1 \
      -DPLUGIN_HANDLERSOCKET=NO \
      -DPLUGIN_ROCKSDB=NO \
      -DPLUGIN_ARIA=NO \
      -DPLUGIN_ARCHIVE=NO \
      -DPLUGIN_CVS=NO \
      -DPLUGIN_FEDERATEDX=NO \
      -DPLUGIN_TOKUDB=NO \
      -DPLUGIN_MROONGA=NO \
      -DPLUGIN_OQGRAPH=NO \
      -DPLUGIN_CONNECT=NO \
      -DPLUGIN_SPIDER=NO \
      -DPLUGIN_SPHINX=NO \
      -DPLUGIN_HEAP=NO \
      -DPLUGIN_MYISAMMRG=NO \
      -DPLUGIN_SEQUENCE=NO \
      -DINSTALL_MYSQLTESTDIR= \
      -DMYSQL_MAINTAINER_MODE=OFF \
      -DWITH_SSL=system \
      -DUSE_ONE_CASS_SHARD_ENABLED=off \
      -DCOROUTINE_ENABLED=ON \
      -DBRPC_WITH_GLOG=ON \
      -DMARIA_WITH_GLOG=ON \
      -DWITH_ASAN=OFF \
      -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG -DDBUG_OFF -fno-omit-frame-pointer -fno-strict-aliasing" \
      -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG -DDBUG_OFF -fno-omit-frame-pointer -fno-strict-aliasing -felide-constructors -Wno-error" \
      -DWITH_KV_STORAGE=CASSANDRA \
      -DFORK_HM_PROCESS=OFF \
      -DWITH_LOG_SERVICE=ON \
      ../
cmake --build . --config RelWithDebInfo -j
cmake --install . --config RelWithDebInfo

4. Set Up Cassandra Cluster

Download and start a local Cassandra instance:

wget https://archive.apache.org/dist/cassandra/4.1.8/apache-cassandra-4.1.8-bin.tar.gz
tar -zxvf apache-cassandra-4.1.8-bin.tar.gz
./apache-cassandra-4.1.8/bin/cassandra -f
# Wait for Cassandra to start, then verify with:
./apache-cassandra-4.1.8/bin/cqlsh localhost -u cassandra -p cassandra

5. Configure EloqSQL

Edit my-config.cnf with the following example settings:

[mariadb]
plugin_maturity=experimental
max_connections=500
skip-log-bin
thread_stack=16M
port=3316
socket=/tmp/mysqld3316.sock
plugin_load_add=ha_eloq
eloq
eloq_kv_storage=cass
eloq_cass_hosts=127.0.0.1
eloq_cass_user=cassandra
eloq_cass_password=cassandra
eloq_local_ip=127.0.0.1:8000
eloq_ip_list=127.0.0.1:8000

6. Bootstrap EloqSQL Node

Initialize the database:

export INSTALL_DIR=${HOME}/install
export DATA_DIR=${HOME}/eloqdata
${INSTALL_DIR}/scripts/mysql_install_db --defaults-file=${HOME}/my-config.cnf \
                                       --basedir=${INSTALL_DIR} \
                                       --datadir=${DATA_DIR} \
                                       --plugin-dir=${INSTALL_DIR}/lib/plugin

7. Start EloqSQL Node

Launch the server:

cd install
${INSTALL_DIR}/bin/mysqld --defaults-file=${HOME}/my-config.cnf --datadir=${DATA_DIR}

8. Connect to EloqSQL

Use a MySQL client to log in:

sudo ${INSTALL_DIR}/bin/mysql -u root -S /tmp/mysqld3316.sock

Deploy with EloqCtl

To deploy EloqSQL cluster, Please refer to EloqCtl.


Star This Repo ⭐ to Support Our Journey β€” Every Star Helps Us Reach More Developers!

About

A MySQL-compatible, high performance, elastic, distributed SQL database.

Resources

License

Unknown, GPL-2.0 licenses found

Licenses found

Unknown
LICENSE
GPL-2.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0