Create Ray Application

更新时间:
复制 MD 格式

You can quickly create a Ray application (PolarDB Ray) using an existing cluster or a newly purchased cluster. This enables you to execute complex tasks directly inside the database by leveraging the Python ecosystem and the Ray distributed computing framework, significantly improving the efficiency of data processing and artificial intelligence inference while effectively reducing costs.

Scope

Your cluster must be a centralized PolarDB for PostgreSQL cluster. PolarDB for PostgreSQL (Distributed Edition) clusters are not supported.

(Optional) Create a PolarDB for PostgreSQL cluster

If your cluster does not meet the requirements in Scope, or if business reasons prevent changes to your existing cluster, create another cluster in the PolarDB console to experience Ray applications.

CreateRay Application

  1. Log on to the PolarDB console. On the cluster details page, click AI Capabilities > AI Applications in the navigation pane on the left, then click Create AI Application.image

  2. On the application purchase page, select the appropriate configuration as needed:

    Configuration Item

    Description

    Billing Method

    • Subscription: This is a subscription mode. When creating an application, select resources with defined specifications and pay the application fees upfront. Longer subscription durations offer greater discounts. This mode suits scenarios with stable long-term business needs.

    • Pay-as-you-go: This is a pay-as-you-go mode. When creating an application, select resources with defined specifications. You do not need to pay the application fees upfront. This mode bills based on your actual usage duration. It suits scenarios with flexible business needs.

    Engine

    Fixed as PolarDB.

    Region

    Select the application's geographical location.

    Note
    • After purchasing the application, you cannot change the region.

    • The application must be in the same region as the PolarDB for PostgreSQL cluster. Therefore, select the same region as your PolarDB for PostgreSQL cluster.

    • Create the application and the connected ECS in the same region. Otherwise, they cannot communicate via the private network. They can only communicate via the public network, which prevents optimal performance.

    Architecture

    Select AI Application.

    Ecosystem

    Select PostgreSQL.

    Source PolarDB Cluster

    Select the PolarDB cluster where you want to create the application.

    Version

    Default is the PolarDB cluster database engine version you selected.

    AI Application

    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.

    Note
    • The minimum and maximum number of Head components can only be 1.

    • The minimum number of CPU Worker components can be 0. This minimum number is the count of stable Ray Worker nodes. The difference between the maximum and minimum numbers determines the maximum number of Worker nodes for the Ray application in a Serverless form.

    • GPU Worker components are currently in invitational preview. To request a trial, submit a ticket to us to enable this feature.

    AI Application Name

    Enter a custom application name.

    Note

    Cannot start with http:// or https://. Length must be 2 to 256 characters.

    Storage Type

    Fixed as AI cache.

    AI Cache Instance ID/Name

    Select the AI Cache instance created in your PolarDB for PostgreSQL cluster.

    Note
    • AI Cache is currently in invitational preview. To request a trial, submit a ticket to us to enable this feature.

    • Only supports High-performance Edition AI Cache instances.

    Network Type

    Fixed as VPC.

    VPC Network

    Automatically populated as the source PolarDB cluster's VPC. No manual entry is required.

    Zone and vSwitch

    Configure the vSwitch for the VPC network. Select the same vSwitch as the primary zone of your PolarDB for PostgreSQL cluster for optimal network performance.

    If existing vSwitches do not meet your requirements, you can create a vSwitch.

    Security Group

    Configure the application's security group.

    Minor Version

    Select the version number of the Ray application you want to create. Default is the latest version.

    Quantity

    Select the number of applications to purchase.

    Note

    Only supports configuration when Billing Method is Subscription.

    Duration

    Select the application's purchase duration.

    Note

    Only supports configuration when Billing Method is Subscription.

    Auto-renewal

    Configure whether to enable auto-renewal. To prevent service interruption from forgotten renewals, enable auto-renewal.

    Note

    Only supports configuration when Billing Method is Subscription.

  3. After a successful purchase, return to the cluster's AI Applications page to view the newly created application.

    Note

    The system needs 3 to 5 minutes to create the application. Wait patiently.