Selection guide

Updated at:

Types

Alibaba Cloud GraphCompute supports three dedicated shard specifications: Compute-optimized, General-purpose, and Storage-optimized.

Shard specifications

GraphCompute categorizes clusters based on the CPU-to-memory (MEM) ratio.

Compute-optimized: Provides ample CPU resources for complex computing logic.

Storage-optimized: Offers large disk space to meet storage-intensive business requirements.

General-purpose: Balances compute and storage capabilities between the Compute-optimized and Storage-optimized types.

Instance type

CPU:MEM

Features

Compute-optimized

1:2

High CPU-to-memory ratio for better online computing performance.

Storage-optimized

1:8

High memory and disk storage ratio for larger storage capacity.

General-purpose

1:4

Balances between compute-optimized and storage-optimized types.

Cluster assessment

GraphCompute uses a distributed cluster architecture composed of three main components: node type (the specification of each shard), number of replicas (each replica can independently handle online traffic, and increasing the number of replicas scales the cluster’s horizontal load capacity), and number of shards (data is sharded and stored across different nodes using internal hashing, which scales the cluster’s data capacity).

Node types

Specification code

Type

Shard specification

Disk size

Single-hop query QPS

Full field update TPS

Partial field update TPS

computer.i2.small

Compute-optimized

CPU: 2-core, Mem: 4 GiB

80 GiB

2000

15000

1500

computer.i2.large

Compute-optimized

CPU: 4-core, Mem: 8 GiB

120 GiB

4000

15000

1500

computer.i2.2xlarge

Compute-optimized

CPU: 8-core, Mem: 16 GiB

240 GiB

8000

15000

1500

storage.i2ne.large

Storage-optimized

CPU: 2-core, Mem: 16 GiB

400 GiB

2500

20000

2500

storage.i2ne.2xlarge

Storage-optimized

CPU: 4-core, Mem: 32 GiB

800 GiB

2000

20000

2500

common.i2.small

General-purpose

CPU: 2-core, Mem: 8 GiB

120 GiB

2500

20000

2500

common.i2.large

General-purpose

CPU: 4-core, Mem: 16 GiB

240 GiB

5000

20000

2500

common.i2.2xlarge

General-purpose

CPU: 8-core, Mem: 32 GiB

500 GiB

10000

20000

2500

Capacity assessment

Assess the online query and data update capabilities of a distributed GraphCompute cluster as follows:

Cluster online query QPS = Online QPS of the selected node specification × Number of replicas

Update TPS assessment: The service instance provides two update methods: full field update or partial field update.

1) If your scenario uses the full field data update method:

Total cluster update capability = Full field update TPS of the selected node specification × Number of shards

2) If your scenario uses the partial field data update method:

Partial field updates use an internal completion mechanism in GraphCompute. This process consumes additional resources by performing extra queries on the cluster, which reduces the online query QPS by 25%.

Cluster partial field data update TPS = Update TPS of the selected node specification × Number of shards × Number of replicas

Note: The preceding assessment data is based on internal testing and is for reference only. To determine the actual load capacity for your specific business, perform your own stress testing.

Examples

Example 1: A social app uses GraphCompute for stranger discovery queries. The app has millions of users and tens of millions of user relationships. The total data storage required is 100 GB. The online traffic QPS is 20,000, the real-time full field update TPS is 40,000, and the query response time (RT) is 10 ms.

Assessment process:

1) The business requires high QPS and low RT. Select the common.i2.large (General-purpose) node type, which meets most business needs.

2) The required storage is 100 GB and the TPS is 40,000, indicating a high volume of data updates. A single common.i2.large (General-purpose) node handles a TPS of 20,000. To improve the cluster's data update performance, shard the data. Set the number of shards to 2.

3) A common.i2.large (General-purpose) node handles a QPS of 5,000. The business requires a QPS of 20,000. The number of replicas is calculated as 20,000 / 5,000. Set the number of replicas to 4.

Example 2: A social app uses GraphCompute for feature queries. The app has tens of millions of user features. The total data storage required is 200 GB. The online traffic QPS is 8,000, the real-time partial field update TPS is 10,000, and the query RT is 20 ms.

Assessment process:

1) The business requires high QPS and low RT. Select the common.i2.large (General-purpose) node type, which meets most business needs.

2) A common.i2.large (General-purpose) node handles a QPS of 5,000. The business requires a QPS of 8,000. The number of replicas is calculated as 8,000 / (5,000 × (1 − 0.25)). Set the number of replicas to 2.

3) The required storage is 200 GB and the TPS is 10,000, indicating a high volume of data updates. A single common.i2.large (General-purpose) node handles a partial field update TPS of 2,500. The cluster partial field data update TPS is calculated as 10,000 = 2,500 × Number of shards × 2 replicas. The calculated number of shards is 2.

Create a cluster

Click Activate GraphCompute Instance. For the specific configuration, see the following figure:

Backup

By default, the iGraph compute engine supports two replicas to ensure service availability during cluster upgrades or data switches. You can also select the number of replicas and perform scale-out operations.

A higher number of replicas provides more searchers for the iGraph cluster to serve online traffic, resulting in higher online performance. However, it also increases the purchase price. Select the number of replicas as needed.

Number of shards

By default, the iGraph compute engine supports multiple shards. It uses hashing to partition massive data indexes and store them on shards with fixed storage.

The formula to calculate the number of shards is as follows:

Number of shards = Storage amount (GB) / Disk size of each shard specification / 2