Skip to main content

Tutorial

This tutorial will guide you through the installation and configuration of WeSQL. In this series of tutorials, we will use containers to run WeSQL, as containers make the packaging and distribution of WeSQL very simple. Additionally, the containers include scripts to automate certain operations.

If you're a hardcore enthusiast, you can try compiling WeSQL from source and running it using the compiled binaries. For that, refer to the section The Hardest Way.

We will go through a series of examples (from the simplest to those closest to a production environment) to demonstrate how to use WeSQL. The first four examples run on a single computer with Docker installed (desktop, laptop, or EC2), while the fifth and sixth examples run on multiple servers in AWS. Of course, you can skip the earlier examples and start directly with the fifth or sixth example, but starting from the beginning will help you better understand how WeSQL works.

The first example installs two containers on your local machine using Docker: WeSQL-Server and Minio. You will then connect to WeSQL-Server using a MySQL client to execute some SQL queries. This is the simplest setup, but it lacks the features of WeScale.

The second example installs three containers on your local machine using Docker: WeScale, WeSQL-Server, and Minio. You will connect to WeScale using a MySQL client and run SQL queries. Compared to the first example, this one adds WeScale, allowing you to explore its features.

The third example increases the number of WeSQL-Server containers from 1 to 3. In addition to one Data Node, two Logger nodes are added, making this setup closer to a production environment.

The fourth example replaces Minio with S3. Your MySQL data on your local desktop or laptop will be persisted to S3! Isn't that amazing?

The fifth example runs WeSQL on AWS EC2, requiring three EC2 instances. Compared to the previous examples, this setup introduces disaster recovery capabilities.

The sixth example runs WeSQL on AWS EKS. You will need an EKS cluster with at least three nodes. In this example, we will showcase WeSQL’s serverless capabilities. Currently, WeSQL’s serverless functionality relies on Kubernetes. For more information, refer to the Serverless technical documentation.