You can quickly create a Ray application (known as PolarDB Ray) using an existing cluster or a newly purchased cluster. This enables you to run complex tasks directly within the database by leveraging the Python ecosystem and the Ray distributed computing framework, significantly improving data processing and AI inference efficiency while effectively reducing costs.
Scope of application
Only What Is Multi-Master Cluster (Limitless) does not support creating a Ray application. All other product editions and series support this feature.
(Optional) Create a PolarDB for MySQL cluster
If you do not have a cluster that meets the requirements in Scope of application, or if business reasons prevent changes to your existing cluster, you can create another cluster in the PolarDB console to experience Ray applications.
Create a Ray application
Log on to the PolarDB console. On the cluster details page, click in the navigation pane on the left, and then click Create AI Application.
On the application purchase page, select the appropriate configuration as needed:
Configuration item
Description
Billing Method
Subscription: A subscription mode. When creating an application, you select resources with fixed specifications and pay the fees upfront. Longer subscription durations offer greater discounts. This mode is suitable for scenarios with stable long-term business needs.
Pay-as-you-go: A pay-as-you-go mode. When creating an application, you select resources with fixed specifications but do not pay upfront. This mode bills based on actual usage duration and is suitable for scenarios with flexible business needs.
Database Engine
Fixed as PolarDB.
Region
Select the geographical location of the application.
NoteAfter purchasing the application, you cannot change the region.
The application must be in the same region as your PolarDB for MySQL cluster. Select the same region as your PolarDB for MySQL cluster.
We recommend creating the application and the ECS instance to connect in the same region. Otherwise, they cannot communicate via the private network and can only communicate via the public network, which prevents optimal performance.
Architecture
Select AI Application.
Ecosystem
Select MySQL.
Source PolarDB Cluster
Select the PolarDB cluster on which you want to create the application.
Version
Fixed as the database engine version of the PolarDB cluster you selected.
AI Application
The AI application type. Select Ray.
Component Set
A Ray application can include one Head component and multiple Worker components. These components form the application's component set.
Head component: The hosted Ray Head node.
CPU Worker component: The hosted Ray Worker node.
NoteThe minimum and maximum number of Head components can only be 1.
The minimum number of CPU Worker components can be set to 0. The minimum number is the count of steady-state Ray Worker nodes. The difference between the maximum and minimum numbers determines the maximum number of Worker nodes for the Ray application in Serverless mode.
GPU Worker components are currently in invitational preview. To request a trial, submit a ticket to enable this feature.
AI Application Name
Enter a custom application name.
NoteThe name cannot start with http:// or https:// and must be 2 to 256 characters in length.
Storage Type
Fixed as AI Cache.
AI Storage Instance ID/Name
Select the AI Storage instance created in your PolarDB for MySQL cluster.
NoteAI Cache is currently in invitational preview. To request a trial, submit a ticket to enable this feature.
Only High-performance Edition AI Cache instances are supported.
Network Type
Fixed as VPC.
VPC
Automatically populated as the VPC of the source PolarDB cluster. No manual entry is required.
Zone and vSwitch
Configure the vSwitch for the VPC network. We recommend selecting the same vSwitch as the primary zone of your PolarDB for MySQL cluster for optimal network performance.
If existing vSwitches do not meet your requirements, you can create a vSwitch.
Security Group
Configure the security group for the application.
Minor Version
Select the version number of the Ray application you want to create. The latest version is selected by default.
Quantity
Select the number of applications to purchase.
NoteThis configuration is available only when Billing Method is Subscription.
Duration
Select the purchase duration of the application.
NoteThis configuration is available only when Billing Method is Subscription.
Auto-renewal
Configure whether to enable auto-renewal. To prevent service interruption due to forgotten renewals, we recommend enabling auto-renewal.
NoteThis configuration is available only when Billing Method is Subscription.
After a successful purchase, return to the cluster's AI Applications page to view the newly created application.
NoteThe system needs 3 to 5 minutes to create the application. Please wait patiently.