Orca is a persistent database fully compatible with the Redis protocol developed based on PolarDB for MySQL. After enabling the Orca feature, PolarDB for MySQL clusters can not only meet MySQL scenario requirements but also provide NoSQL (Redis protocol) capabilities.
Technical principles
Traditional Key-Value databases are typically designed to be highly scalable, such as open-source products such as Pika and Kvrocks. However, in actual deployment, issues related to node coordination and operations management complexity may still arise. To address these pain points, PolarDB for MySQL introduced the Orca feature, which allows you to use a single PolarDB for MySQL cluster as a persistent Key-Value (Redis protocol) database. The MySQL data and Key-Value (Redis protocol) data are isolated from each other.
Based on the PolarDB for MySQL architecture, Orca introduces Redis protocol parsing and request processing frameworks. All requests related to Orca (Redis protocol) will connect to a separate port. The following figure shows the technical architecture of PolarDB for MySQL Orca:
Core advantages
Low cost
No need to repeatedly purchase compute node resources. High-performance distributed storage meets large capacity requirements.
Ease of use
Based on the PolarDB for MySQL architecture, physical replication enables read/write splitting functionality. It also supports horizontal and vertical elastic scaling with Serverless capabilities and compute hot standby, which can effectively reduce operations overhead.
Compatible with new PolarDB for MySQL product forms such as Global Database Network (GDN).
Data persistence and strong consistency
Implemented based on the PolarDB for MySQL storage engine InnoDB, using distributed storage PolarStore to ensure data is not lost.
Based on PolarDB for MySQL's SCC technology, achieving read strong consistency between RW/RO nodes.
High performance
Based on the high-performance InnoDB engine, leveraging the Blink-tree high-performance index structure and logical prefetch features to achieve significant performance improvements in high-concurrency write and read scenarios.
Scenarios
Orca is positioned as a Redis protocol compatibility implementation based on PolarDB for MySQL, serving as a complement to Redis application scenarios. You can view Orca as a persistent Key-Value database that effectively addresses cost and data capacity limitation issues through the large storage capacity provided by distributed storage PolarStore (up to 500 TB), while maintaining Redis's ease of use.
Game server core database: Game deployment architecture is relatively simple, with the main program deployed on ECS and all business data stored in Orca. As a persistent database, Orca features default dual-AZ disaster recovery, providing fast backup, point-in-time recovery, high-performance write capabilities, and read-only node expansion to meet game write capacity expansion requirements.
Game leaderboards: In game applications, real-time leaderboard updates and quick player status access are crucial. Orca can be used to store player scores and ranking information. By using the sorted set data structure of Redis, Orca can easily implement the ranking function.
Advertising recommendation business: In many internet advertising business scenarios, ad systems need to store large amounts of data and handle high-concurrency requests. Orca features stable low latency and low storage costs, effectively meeting the delivery requirements of advertising businesses.
Prerequisites
The database engine of the PolarDB for MySQL cluster must be MySQL 8.0.2, and the minor engine version must be 8.0.2.2.24 or later.
Billing
The Orca feature can be used free of charge without additional compute node fees. Only storage fees for the Orca data portion are charged. For more information, see Compute node billing rules and Storage space billing rules.
Notes
The Orca feature does not support password-free access. You need to create an Orca account.
After enabling the Orca feature, Orca will reuse the CPU and memory resources of the entire PolarDB for MySQL cluster. Therefore, Orca workloads will increase the load on the entire cluster. The actual CPU and memory overhead will depend on your business.
After enabling the Orca feature, the PolarDB for MySQL cluster will automatically create a default Orca database named
__orca_in_polardb_m_
. You cannot perform operations on the database or create a database that has the same name.
Compatibility
Orca is compatible with specific commands of Redis 7.0 and earlier versions and supports RESP2 and RESP3 protocols. Currently, only single DB operations are supported, and cross-DB commands (such as MOVE) are temporarily not supported. For more information, see Compatibility.
Usage instructions
Enable Orca:
Enable Orca on the cluster purchase page.
Enable Orca in the
section on the cluster details page.
Create an Orca account: Create an Orca account in Create an Orca account.
on the cluster details page. For more information, seeManage Orca endpoints and ports: View Orca addresses and ports in the Manage Orca endpoints.
section on the cluster details page. For more information, seeConnect to Orca (Redis protocol): You can use Redis clients or applications to connect to and use Orca.
NoteYou can use Database Management (DMS) to manage Orca data.
View Orca metrics: In the View Orca metrics.
section of the cluster details page, you can view Orca Metrics information based on your business requirements. For more information, see(Optional) Migrate data: You can use Data Transmission Service (DTS) to migrate Orca data.