Breaking the Limits of Relational Databases: An Analysis of Cloud-Native Database Middleware (1)


1. Vertical Sharding

2. Horizontal Sharding

  1. In NewSQL with the new architecture, the database storage engine is redesigned to store the data from the same table in a distributed file system.
  2. In the sharding middleware, the impacts of sharding are transparent to users, allowing them to use a horizontally sharded database as a common database.

3. Read/Write Separation

4. Key Processes

Protocol Adaptation

  1. The payload length is of the int❤> type. It indicates the total number of bytes occupied by the subsequent payload. Note that the payload length does not include the length of the sequence ID.
  2. The sequence ID is of the int<1> type. It indicates the serial number of each MySQL packet returned for a request. The maximum sequence ID that occupies one byte is 0xff, that is, 255 in decimal notation. However, this does not imply that a request can only contain up to 255 MySQL packets. If the sequence ID exceeds 255, the sequence ID restarts from zero. For example, hundreds of thousands of records may be returned for a request. In this case, the MySQL packets only need to ensure that their sequence IDs are continuous. If the sequence ID exceeds 255, it is reset and restarts from zero.
  3. The length of the payload is the bytes declared by the payload length. In a MySQL packet, the payload is the actual business data. The content of the payload varies with the packet type.

SQL Parsing

Request Routing

SQL Statement Rewriting

Results Merging

  1. Stream merging is used for simple queries, Order By queries, Group By queries, and Order By and Group By scenarios where the Order By and Group By items are completely consistent. The “next” method is called each time to traverse the stream merging result set without consuming additional memory resources.
  2. Memory merging requires that all data in the result sets must be loaded to the memory for processing. If the result sets contain a large volume of data, lots of memory resources are consumed accordingly.




Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Chat for Jira Service Desk with direct chat-to-issue feature.

About memory locality of a linked list

TypeScript for People in a Hurry

A Guide on How to Install Office 365 ProPlus on a Remote Desktop Services Server

.NET Interactive lowers the barrier

5 4 5 Day 4

SharePoint Online: Complete Overview

Meanwhile @Crystalnix #8

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:

More from Medium

Stream avro data from kafka over ssl to Apache pinot

How to use Schema Registry Plugin with HTTPS enabled

How we migrated from RDS MySql to RDS Aurora and stopped suffering from lags

Redis Pipeline