当需要在数据库中执行AI、机器学习或大规模数据分析任务时,传统方法通常要求将数据迁移至外部计算集群。这一过程不仅增加了系统架构的复杂性,还带来了额外的数据传输成本和延迟。PolarDB PostgreSQL版集成了Ray应用(即PolarDB Ray),使您能够直接在数据库内部利用Python生态和Ray分布式计算框架执行这些复杂任务,从而显著提升数据处理和人工智能推理的效率,并有效降低成本。
功能简介
Ray是一个开源的分布式计算框架,专为大规模AI和Python应用而设计。PolarDB通过内置Ray应用,将这个强大的计算能力与数据库深度融合。这意味着您可以直接在数据库中编写和执行Python代码,利用Pandas、NumPy、Scikit-learn、PyTorch等丰富的AI/ML库来处理存储在数据库中的数据。无论是进行模型训练、数据预处理,还是执行复杂的向量计算,都可以在数据库内一站式完成,无需在数据库和外部计算环境之间来回移动数据。
优势
Serverless架构:提供永不缩容的稳态节点,以支撑常态业务。同时,敏态节点能够根据实时流量自动进行伸缩,兼顾稳定性与成本效益。
高可用:Ray Head节点支持高可用容灾能力,确保集群的稳定运行。
安全可靠:
通过安全容器提供运行时隔离,保障代码执行环境的安全。
支持多租户隔离,防止租户间信息泄露。
Ray Dashboard和Ray Job提交均支持用户名/密码及JWT鉴权,防止未授权访问。
一体化元数据管理:与PolarDB集群处于同一专有网络VPC下,基于PolarDB Ray处理的元数据可直接存储在PolarDB集群中,无需额外网络配置即可实现数据交互。
统一资源池:提供统一的CPU资源池,并支持GPU Worker,为不同类型的计算任务提供灵活的资源支持。
存储服务:支持挂载PolarDB文件系统(Polar File System,简称PolarFS)2.0高性能版存储,可通过文件接口直接读写数据。
开源定制:PolarDB Ray作为开源Ray的下游,与开源Ray生态实现无缝兼容。同时,为开发者提供定制化的优化与增强服务。
适用范围
您的集群形态需为:集中式PolarDB PostgreSQL版集群,暂不支持PolarDB PostgreSQL分布式版集群。
费用说明
组件费用:Ray应用分别收取其Head节点和每个Worker节点的费用,费用根据您选择的组件规格(CPU和内存)和购买时长计算。
单个组件价格信息
中国内地
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g2.medium
2核4 GB
250
0.52
polar.app.g4.medium
2核8 GB
270
0.56
polar.app.g8.medium
2核16 GB
330
0.6875
polar.app.g2.large
4核8 GB
475
0.99
polar.app.g4.large
4核16 GB
630
1.31
polar.app.g8.large
4核32 GB660
1.375
polar.app.g2.xlarge
8核16 GB
1,000
2.08
polar.app.g4.xlarge
8核32 GB
1,240
2.58
polar.app.g8.xlarge
8核64 GB1,320
2.75
polar.app.g2.2xlarge
16核32 GB
2,000
4.17
polar.app.g4.2xlarge
16核64 GB
2,400
5.00
polar.app.g8.2xlarge
16核128 GB2,640
5.5
polar.app.g2.4xlarge
32核64 GB
4,000
8.32
polar.app.g4.4xlarge
32核128 GB
4,320
8.96
polar.app.g8.4xlarge
32核256 GB5,280
11
polar.app.g4.6xlarge
48核192 GB
6,000
12.48
polar.app.g8.6xlarge
48核384 GB
6,480
13.44
polar.app.g2.8xlarge
64核128 GB
8,000
16.64
polar.app.g4.8xlarge
64核256 GB
8,640
17.92
polar.app.g8.8xlarge
64核512 GB
14,080
29.32
polar.app.g8.12xlarge
88核710 GB
19,360
40.31
polar.app.g8.15xlarge
120核920 GB
26,400
54.98
polar.app.g8.23xlarge
180核1800 GB
39,600
82.46
中国(香港)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g2.medium
2核4 GB
400
0.832
polar.app.g4.medium
2核8 GB
432
0.896
polar.app.g8.medium
2核16 GB528
1.100
polar.app.g2.large
4核8 GB
760
1.584
polar.app.g4.large
4核16 GB
1,008
2.096
polar.app.g8.large
4核32 GB1,056
2.200
polar.app.g2.xlarge
8核16 GB
1,600
3.330
polar.app.g4.xlarge
8核32 GB
1,984
4.130
polar.app.g8.xlarge
8核64 GB2,112
4.400
polar.app.g2.2xlarge
16核32 GB
3,200
6.670
polar.app.g4.2xlarge
16核64 GB
3,840
8.000
polar.app.g8.2xlarge
16核128 GB4,224
8.800
polar.app.g2.4xlarge
32核64 GB
6,400
13.31
polar.app.g4.4xlarge
32核128 GB
6,912
14.34
polar.app.g8.4xlarge
32核256 GB8,448
17.600
polar.app.g4.6xlarge
48核192 GB
9,600
19.97
polar.app.g8.6xlarge
48核384 GB
10,368
21.50
polar.app.g2.8xlarge
64核128 GB
12,800
26.62
polar.app.g4.8xlarge
64核256 GB
13,824
28.67
polar.app.g8.8xlarge
64核512 GB
22,528
46.91
polar.app.g8.12xlarge
88核710 GB
30,976
64.50
polar.app.g8.15xlarge
120核920 GB
42,240
87.97
polar.app.g8.23xlarge
180核1800 GB
63,360
131.94
日本(东京)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g2.medium
2核4 GB
400
0.832
polar.app.g4.medium
2核8 GB
432
0.896
polar.app.g8.medium
2核16 GB528
1.100
polar.app.g2.large
4核8 GB
760
1.584
polar.app.g4.large
4核16 GB
1,008
2.096
polar.app.g8.large
4核32 GB1,056
2.200
polar.app.g2.xlarge
8核16 GB
1,600
3.330
polar.app.g4.xlarge
8核32 GB
1,984
4.130
polar.app.g8.xlarge
8核64 GB2,112
4.400
polar.app.g2.2xlarge
16核32 GB
3,200
6.670
polar.app.g4.2xlarge
16核64 GB
3,840
8.000
polar.app.g8.2xlarge
16核128 GB4,224
8.800
polar.app.g2.4xlarge
32核64 GB
6,400
13.31
polar.app.g4.4xlarge
32核128 GB
6,912
14.34
polar.app.g8.4xlarge
32核256 GB8,448
17.600
polar.app.g4.6xlarge
48核192 GB
9,600
19.97
polar.app.g8.6xlarge
48核384 GB
10,368
21.50
polar.app.g2.8xlarge
64核128 GB
12,800
26.62
polar.app.g4.8xlarge
64核256 GB
13,824
28.67
polar.app.g8.8xlarge
64核512 GB
22,528
46.91
polar.app.g8.12xlarge
88核710 GB
30,976
64.50
polar.app.g8.15xlarge
120核920 GB
42,240
87.97
polar.app.g8.23xlarge
180核1800 GB
63,360
131.94
韩国
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g2.medium
2核4 GB
400
0.832
polar.app.g4.medium
2核8 GB
432
0.896
polar.app.g8.medium
2核16 GB528
1.100
polar.app.g2.large
4核8 GB
760
1.584
polar.app.g4.large
4核16 GB
1,008
2.096
polar.app.g8.large
4核32 GB1,056
2.200
polar.app.g2.xlarge
8核16 GB
1,600
3.330
polar.app.g4.xlarge
8核32 GB
1,984
4.130
polar.app.g8.xlarge
8核64 GB2,112
4.400
polar.app.g2.2xlarge
16核32 GB
3,200
6.670
polar.app.g4.2xlarge
16核64 GB
3,840
8.000
polar.app.g8.2xlarge
16核128 GB4,224
8.800
polar.app.g2.4xlarge
32核64 GB
6,400
13.31
polar.app.g4.4xlarge
32核128 GB
6,912
14.34
polar.app.g8.4xlarge
32核256 GB8,448
17.600
polar.app.g4.6xlarge
48核192 GB
9,600
19.97
polar.app.g8.6xlarge
48核384 GB
10,368
21.50
polar.app.g2.8xlarge
64核128 GB
12,800
26.62
polar.app.g4.8xlarge
64核256 GB
13,824
28.67
polar.app.g8.8xlarge
64核512 GB
22,528
46.91
polar.app.g8.12xlarge
88核710 GB
30,976
64.50
polar.app.g8.15xlarge
120核920 GB
42,240
87.97
polar.app.g8.23xlarge
180核1800 GB
63,360
131.94
新加坡
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g2.medium
2核4 GB
400
0.832
polar.app.g4.medium
2核8 GB
432
0.896
polar.app.g8.medium
2核16 GB528
1.100
polar.app.g2.large
4核8 GB
760
1.584
polar.app.g4.large
4核16 GB
1,008
2.096
polar.app.g8.large
4核32 GB1,056
2.200
polar.app.g2.xlarge
8核16 GB
1,600
3.330
polar.app.g4.xlarge
8核32 GB
1,984
4.130
polar.app.g8.xlarge
8核64 GB2,112
4.400
polar.app.g2.2xlarge
16核32 GB
3,200
6.670
polar.app.g4.2xlarge
16核64 GB
3,840
8.000
polar.app.g8.2xlarge
16核128 GB4,224
8.800
polar.app.g2.4xlarge
32核64 GB
6,400
13.31
polar.app.g4.4xlarge
32核128 GB
6,912
14.34
polar.app.g8.4xlarge
32核256 GB8,448
17.600
polar.app.g4.6xlarge
48核192 GB
9,600
19.97
polar.app.g8.6xlarge
48核384 GB
10,368
21.50
polar.app.g2.8xlarge
64核128 GB
12,800
26.62
polar.app.g4.8xlarge
64核256 GB
13,824
28.67
polar.app.g8.8xlarge
64核512 GB
22,528
46.91
polar.app.g8.12xlarge
88核710 GB
30,976
64.50
polar.app.g8.15xlarge
120核920 GB
42,240
87.97
polar.app.g8.23xlarge
180核1800 GB
63,360
131.94
马来西亚(吉隆坡)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g2.medium
2核4 GB
400
0.832
polar.app.g4.medium
2核8 GB
432
0.896
polar.app.g8.medium
2核16 GB528
1.100
polar.app.g2.large
4核8 GB
760
1.584
polar.app.g4.large
4核16 GB
1,008
2.096
polar.app.g8.large
4核32 GB1,056
2.200
polar.app.g2.xlarge
8核16 GB
1,600
3.330
polar.app.g4.xlarge
8核32 GB
1,984
4.130
polar.app.g8.xlarge
8核64 GB2,112
4.400
polar.app.g2.2xlarge
16核32 GB
3,200
6.670
polar.app.g4.2xlarge
16核64 GB
3,840
8.000
polar.app.g8.2xlarge
16核128 GB4,224
8.800
polar.app.g2.4xlarge
32核64 GB
6,400
13.31
polar.app.g4.4xlarge
32核128 GB
6,912
14.34
polar.app.g8.4xlarge
32核256 GB8,448
17.600
polar.app.g4.6xlarge
48核192 GB
9,600
19.97
polar.app.g8.6xlarge
48核384 GB
10,368
21.50
polar.app.g2.8xlarge
64核128 GB
12,800
26.62
polar.app.g4.8xlarge
64核256 GB
13,824
28.67
polar.app.g8.8xlarge
64核512 GB
22,528
46.91
polar.app.g8.12xlarge
88核710 GB
30,976
64.50
polar.app.g8.15xlarge
120核920 GB
42,240
87.97
polar.app.g8.23xlarge
180核1800 GB
63,360
131.94
印度尼西亚(雅加达)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g2.medium
2核4 GB
350
0.728
polar.app.g4.medium
2核8 GB
378
0.784
polar.app.g8.medium
2核16 GB462
0.9625
polar.app.g2.large
4核8 GB
665
1.386
polar.app.g4.large
4核16 GB
882
1.834
polar.app.g8.large
4核32 GB924
1.925
polar.app.g2.xlarge
8核16 GB
1,400
2.910
polar.app.g4.xlarge
8核32 GB
1,736
3.610
polar.app.g8.xlarge
8核64 GB1,848
3.850
polar.app.g2.2xlarge
16核32 GB
2,800
5.840
polar.app.g4.2xlarge
16核64 GB
3,360
7.000
polar.app.g8.2xlarge
16核128 GB3,696
7.700
polar.app.g2.4xlarge
32核64 GB
5,600
11.65
polar.app.g4.4xlarge
32核128 GB
6,048
12.54
polar.app.g8.4xlarge
32核256 GB7,392
15.400
polar.app.g4.6xlarge
48核192 GB
8,400
17.47
polar.app.g8.6xlarge
48核384 GB
9,072
18.82
polar.app.g2.8xlarge
64核128 GB
11,200
23.30
polar.app.g4.8xlarge
64核256 GB
12,096
25.09
polar.app.g8.8xlarge
64核512 GB
19,712
41.05
polar.app.g8.12xlarge
88核710 GB
27,104
56.43
polar.app.g8.15xlarge
120核920 GB
36,960
76.97
polar.app.g8.23xlarge
180核1800 GB
55,440
115.44
菲律宾
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g2.medium
2核4 GB
350
0.728
polar.app.g4.medium
2核8 GB
378
0.784
polar.app.g8.medium
2核16 GB462
0.9625
polar.app.g2.large
4核8 GB
665
1.386
polar.app.g4.large
4核16 GB
882
1.834
polar.app.g8.large
4核32 GB924
1.925
polar.app.g2.xlarge
8核16 GB
1,400
2.910
polar.app.g4.xlarge
8核32 GB
1,736
3.610
polar.app.g8.xlarge
8核64 GB1,848
3.850
polar.app.g2.2xlarge
16核32 GB
2,800
5.840
polar.app.g4.2xlarge
16核64 GB
3,360
7.000
polar.app.g8.2xlarge
16核128 GB3,696
7.700
polar.app.g2.4xlarge
32核64 GB
5,600
11.65
polar.app.g4.4xlarge
32核128 GB
6,048
12.54
polar.app.g8.4xlarge
32核256 GB7,392
15.400
polar.app.g4.6xlarge
48核192 GB
8,400
17.47
polar.app.g8.6xlarge
48核384 GB
9,072
18.82
polar.app.g2.8xlarge
64核128 GB
11,200
23.30
polar.app.g4.8xlarge
64核256 GB
12,096
25.09
polar.app.g8.8xlarge
64核512 GB
19,712
41.05
polar.app.g8.12xlarge
88核710 GB
27,104
56.43
polar.app.g8.15xlarge
120核920 GB
36,960
76.97
polar.app.g8.23xlarge
180核1800 GB
55,440
115.44
泰国(曼谷)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g2.medium
2核4 GB
350
0.728
polar.app.g4.medium
2核8 GB
378
0.784
polar.app.g8.medium
2核16 GB462
0.9625
polar.app.g2.large
4核8 GB
665
1.386
polar.app.g4.large
4核16 GB
882
1.834
polar.app.g8.large
4核32 GB924
1.925
polar.app.g2.xlarge
8核16 GB
1,400
2.910
polar.app.g4.xlarge
8核32 GB
1,736
3.610
polar.app.g8.xlarge
8核64 GB1,848
3.850
polar.app.g2.2xlarge
16核32 GB
2,800
5.840
polar.app.g4.2xlarge
16核64 GB
3,360
7.000
polar.app.g8.2xlarge
16核128 GB3,696
7.700
polar.app.g2.4xlarge
32核64 GB
5,600
11.65
polar.app.g4.4xlarge
32核128 GB
6,048
12.54
polar.app.g8.4xlarge
32核256 GB7,392
15.400
polar.app.g4.6xlarge
48核192 GB
8,400
17.47
polar.app.g8.6xlarge
48核384 GB
9,072
18.82
polar.app.g2.8xlarge
64核128 GB
11,200
23.30
polar.app.g4.8xlarge
64核256 GB
12,096
25.09
polar.app.g8.8xlarge
64核512 GB
19,712
41.05
polar.app.g8.12xlarge
88核710 GB
27,104
56.43
polar.app.g8.15xlarge
120核920 GB
36,960
76.97
polar.app.g8.23xlarge
180核1800 GB
55,440
115.44
德国(法兰克福)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g2.medium
2核4 GB
350
0.728
polar.app.g4.medium
2核8 GB
378
0.784
polar.app.g8.medium
2核16 GB462
0.9625
polar.app.g2.large
4核8 GB
665
1.386
polar.app.g4.large
4核16 GB
882
1.834
polar.app.g8.large
4核32 GB924
1.925
polar.app.g2.xlarge
8核16 GB
1,400
2.910
polar.app.g4.xlarge
8核32 GB
1,736
3.610
polar.app.g8.xlarge
8核64 GB1,848
3.850
polar.app.g2.2xlarge
16核32 GB
2,800
5.840
polar.app.g4.2xlarge
16核64 GB
3,360
7.000
polar.app.g8.2xlarge
16核128 GB3,696
7.700
polar.app.g2.4xlarge
32核64 GB
5,600
11.65
polar.app.g4.4xlarge
32核128 GB
6,048
12.54
polar.app.g8.4xlarge
32核256 GB7,392
15.400
polar.app.g4.6xlarge
48核192 GB
8,400
17.47
polar.app.g8.6xlarge
48核384 GB
9,072
18.82
polar.app.g2.8xlarge
64核128 GB
11,200
23.30
polar.app.g4.8xlarge
64核256 GB
12,096
25.09
polar.app.g8.8xlarge
64核512 GB
19,712
41.05
polar.app.g8.12xlarge
88核710 GB
27,104
56.43
polar.app.g8.15xlarge
120核920 GB
36,960
76.97
polar.app.g8.23xlarge
180核1800 GB
55,440
115.44
英国(伦敦)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g2.medium
2核4 GB
350
0.728
polar.app.g4.medium
2核8 GB
378
0.784
polar.app.g8.medium
2核16 GB462
0.9625
polar.app.g2.large
4核8 GB
665
1.386
polar.app.g4.large
4核16 GB
882
1.834
polar.app.g8.large
4核32 GB924
1.925
polar.app.g2.xlarge
8核16 GB
1,400
2.910
polar.app.g4.xlarge
8核32 GB
1,736
3.610
polar.app.g8.xlarge
8核64 GB1,848
3.850
polar.app.g2.2xlarge
16核32 GB
2,800
5.840
polar.app.g4.2xlarge
16核64 GB
3,360
7.000
polar.app.g8.2xlarge
16核128 GB3,696
7.700
polar.app.g2.4xlarge
32核64 GB
5,600
11.65
polar.app.g4.4xlarge
32核128 GB
6,048
12.54
polar.app.g8.4xlarge
32核256 GB7,392
15.400
polar.app.g4.6xlarge
48核192 GB
8,400
17.47
polar.app.g8.6xlarge
48核384 GB
9,072
18.82
polar.app.g2.8xlarge
64核128 GB
11,200
23.30
polar.app.g4.8xlarge
64核256 GB
12,096
25.09
polar.app.g8.8xlarge
64核512 GB
19,712
41.05
polar.app.g8.12xlarge
88核710 GB
27,104
56.43
polar.app.g8.15xlarge
120核920 GB
36,960
76.97
polar.app.g8.23xlarge
180核1800 GB
55,440
115.44
美国(硅谷)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
13.2
0.024
polar.app.g2.small
1核2 GB
21.6
0.048
polar.app.g2.medium
2核4 GB
300
0.624
polar.app.g4.medium
2核8 GB
324
0.672
polar.app.g8.medium
2核16 GB396
0.825
polar.app.g2.large
4核8 GB
570
1.188
polar.app.g4.large
4核16 GB
756
1.572
polar.app.g8.large
4核32 GB792
1.650
polar.app.g2.xlarge
8核16 GB
1,200
2.50
polar.app.g4.xlarge
8核32 GB
1,488
3.10
polar.app.g8.xlarge
8核64 GB1,584
3.300
polar.app.g2.2xlarge
16核32 GB
2,400
5.00
polar.app.g4.2xlarge
16核64 GB
2,880
6.00
polar.app.g8.2xlarge
16核128 GB3,168
6.600
polar.app.g2.4xlarge
32核64 GB
4,800
9.98
polar.app.g4.4xlarge
32核128 GB
5,184
10.75
polar.app.g8.4xlarge
32核256 GB6,336
13.200
polar.app.g4.6xlarge
48核192 GB
7,200
14.98
polar.app.g8.6xlarge
48核384 GB
7,776
16.13
polar.app.g2.8xlarge
64核128 GB
9,600
19.97
polar.app.g4.8xlarge
64核256 GB
10,368
21.50
polar.app.g8.8xlarge
64核512 GB
16,896
35.18
polar.app.g8.12xlarge
88核710 GB
23,232
48.37
polar.app.g8.15xlarge
120核920 GB
31,680
65.98
polar.app.g8.23xlarge
180核1800 GB
47,520
98.95
美国(弗吉尼亚)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
13.2
0.024
polar.app.g2.small
1核2 GB
21.6
0.048
polar.app.g2.medium
2核4 GB
300
0.624
polar.app.g4.medium
2核8 GB
324
0.672
polar.app.g8.medium
2核16 GB396
0.825
polar.app.g2.large
4核8 GB
570
1.188
polar.app.g4.large
4核16 GB
756
1.572
polar.app.g8.large
4核32 GB792
1.650
polar.app.g2.xlarge
8核16 GB
1,200
2.50
polar.app.g4.xlarge
8核32 GB
1,488
3.10
polar.app.g8.xlarge
8核64 GB1,584
3.300
polar.app.g2.2xlarge
16核32 GB
2,400
5.00
polar.app.g4.2xlarge
16核64 GB
2,880
6.00
polar.app.g8.2xlarge
16核128 GB3,168
6.600
polar.app.g2.4xlarge
32核64 GB
4,800
9.98
polar.app.g4.4xlarge
32核128 GB
5,184
10.75
polar.app.g8.4xlarge
32核256 GB6,336
13.200
polar.app.g4.6xlarge
48核192 GB
7,200
14.98
polar.app.g8.6xlarge
48核384 GB
7,776
16.13
polar.app.g2.8xlarge
64核128 GB
9,600
19.97
polar.app.g4.8xlarge
64核256 GB
10,368
21.50
polar.app.g8.8xlarge
64核512 GB
16,896
35.18
polar.app.g8.12xlarge
88核710 GB
23,232
48.37
polar.app.g8.15xlarge
120核920 GB
31,680
65.98
polar.app.g8.23xlarge
180核1800 GB
47,520
98.95
存储费用:Ray应用所产生的数据和文件不额外计费,但Ray Job向PolarDB PostgreSQL版集群或PolarFS存储写入的数据将收取相应的存储空间费用。
流量与带宽:不收取费用。
开始使用
创建Ray应用:使用已有集群或新购集群快速创建Ray应用(即PolarDB Ray)。
Ray应用配置:设置Ray应用安全配置、获取连接地址与应用参数以及(可选)开通公网访问能力。
提交作业到Ray应用:如何通过多种方式(包括JupyterLab、Python SDK、CLI等)将一个Ray作业提交到您的Ray应用并执行。