Orca is a persistent database built on PolarDB for MySQL that is fully compatible with the Redis protocol. When you enable the Orca feature, your PolarDB for MySQL cluster can handle both MySQL and NoSQL (Redis protocol) workloads.
Technical principles
Traditional key-value databases, such as the open source products Pika and Kvrocks, are often designed to be highly scalable. However, complexities such as node coordination and operations management can still arise during deployment. To address these pain points, PolarDB for MySQL introduced the Orca feature. This feature lets you use a PolarDB for MySQL cluster as a persistent key-value (Redis protocol) database. MySQL data is isolated from key-value (Redis protocol) data.
Built on the PolarDB for MySQL architecture, Orca introduces a framework for parsing and processing Redis protocol requests. All requests related to Orca (Redis protocol) connect to a separate port. The following figure shows the technical architecture of Orca in PolarDB for MySQL: 
Core advantages
Low cost
You do not need to purchase duplicate compute node resources. You can use high-performance distributed storage to meet large-capacity demands.
Ease of use
Based on the PolarDB for MySQL architecture, it uses physical replication to enable a one-write, multiple-read model. It also supports horizontal and vertical elastic scaling with Serverless and includes the failover with hot replica feature for compute nodes. This effectively reduces O&M overhead.
Compatible with PolarDB for MySQL, it offers a new product form: the global database network (GDN). Using the GDN + Orca deployment model, you can deploy your workloads across multiple regions. With GDN’s cross-region low-latency synchronization, cross-region read/write splitting, and local reads, you can ensure that applications in all regions have latency of less than 2 seconds when accessing Orca.
Data persistence and strong consistency
It is implemented using the InnoDB storage engine of PolarDB for MySQL and uses the distributed storage PolarStore to ensure data persistence.
It achieves strong read consistency between read-write and read-only nodes based on the SCC technology of PolarDB for MySQL.
High performance
Based on the high-performance InnoDB engine, it uses features such as the Blink-tree high-performance index schema and logical pre-reading to significantly improve performance in high-concurrency read and write scenarios.
Scenarios
Orca is designed to provide Redis protocol compatibility on PolarDB for MySQL to complement Redis application scenarios. You can use Orca as a persistent key-value database. The massive storage capacity of up to 500 TB provided by the PolarStore distributed storage helps address issues related to cost and data capacity limits, while maintaining the ease of use of Redis.
Core database for game servers: Game deployment architectures are often simple. The main program is deployed on an ECS instance, and all business data is stored in Orca. As a persistent database, Orca provides dual-AZ disaster recovery by default. It offers fast backups, point-in-time recovery, high-performance writes, and the ability to scale out read-only nodes to meet the write-scaling needs of games.
Game leaderboards: In game applications, real-time updates to leaderboards and fast access to player status are crucial. Orca can store player scores and ranking information. It uses the sorted set data structure of the Redis protocol to easily implement leaderboard features.
Ad recommendation services: In many Internet advertising scenarios, ad systems need to store large amounts of data and handle high-concurrency requests. Orca's features, such as stable low latency and low storage cost, can effectively meet the requirements of ad services.
Lua script execution engine: In many business applications, a client often needs to combine multiple Redis commands into a single atomic operation to ensure data consistency. Common scenarios include inventory deduction, distributed locks, and rate limiting. Orca is compatible with the EVAL/EVALSHA commands of the Redis protocol. It supports executing Lua scripts on the server-side to encapsulate multiple operations into an atomic transaction. This reduces network round-trip overhead and ensures the atomicity of operations. After you enable the Orca feature, you can execute Lua scripts without needing additional middleware.
Lightweight message queue: In some business scenarios, applications require a reliable message queue for asynchronous task processing, event notifications, or service decoupling. Orca is compatible with the List data structure of the Redis protocol. It supports the producer-consumer model for message queues through commands such as LPUSH and BRPOP. You can purchase a PolarDB for MySQL cluster and enable the Orca feature to meet your lightweight message queue needs. This eliminates the need to deploy and maintain separate message middleware, which effectively reduces architectural complexity and O&M costs. Additionally, the data persistence and high availability of PolarDB for MySQL ensure message data security.
Applicable scope
Your PolarDB for MySQL cluster must meet one of the following version requirements:
MySQL 8.0.1, with a minor engine version of 8.0.1.1.53 or later.
MySQL 8.0.2, with a minor engine version of 8.0.2.2.24 or later.
Billing description
The Orca feature is free to use. No additional fees are charged for compute nodes. You are charged only for the storage of Orca data. For more information, see Compute node billing rules and Storage space billing rules.
Notes
The Orca feature does not support passwordless access. You must create an Orca account.
After you enable the Orca feature, Orca shares the CPU and memory resources of the entire PolarDB for MySQL cluster. Therefore, Orca workloads increase the overall load on the cluster.
After you enable the Orca feature, the PolarDB for MySQL cluster automatically creates an Orca default database named
__orca_in_polardb_m_. You cannot perform any operations on this database or create another database with the same name.
Compatibility description
Orca is compatible with some commands from Redis 7.0 and earlier versions. It also supports the RESP2 and RESP3 protocols. Currently, only single-DB operations are supported. Cross-DB commands, such as MOVE, are not supported. For more information, see Redis protocol compatibility.
Instructions
Enable Orca:
You can enable Orca on the cluster purchase page.
You can enable Orca in the section of the cluster details page.
Create an Orca account: In the section of the cluster details page, you can create an Orca account. For more information, see Create an Orca account.
Manage Orca endpoints and ports: In the section of the cluster details page, you can view the Orca endpoints and ports. For more information, see Manage Orca endpoints.
Connect to Orca (Redis protocol): You can use a Redis client or an application to connect to and use Orca.
NoteYou can use Data Management Service (DMS) to connect to and manage the Orca feature.
View Orca monitoring metrics: In the section of the cluster details page, you can view the Orca Monitoring Metrics as needed. For more information, see View Orca monitoring metrics.
(Optional) Data migration: You can use Data Transmission Service (DTS) to perform Orca data migration (DTS).