Cluster sizing for Cloudera Streaming Analytics

Choose a workload size for the Cloudera Streaming Analytics compute cluster from the number of SQL jobs that run at the same time and the parallelism of each job. You apply the size when you set the node groups of the cluster.

Workload sizes

Cloudera Streaming Analytics has one hardware tier, default, which sets only the minimum values of the node groups. To plan the cluster, pick the workload size by the work that you expect:

Table 1. Workload sizes of Cloudera Streaming Analytics
Size Concurrent SQL jobs Parallelism per job Task slots in total Task slots per TaskManager
S 5 6 30 1
M 10 12 120 4
L 20 24 480 4
XL 40 48 1,920 4

A size is not a hardware tier that you select when you deploy. You apply it when you set the instance flavor, the node count, and the storage of the node groups. Pick the smallest size that fits your workload. The total number of task slots is the number of jobs multiplied by the parallelism of each job. If your workload is larger than a size in either value, choose the next size.

Size S uses the default job resources of Cloudera SQL Stream Builder (SSB). Sizes M, L, and XL assume TaskManagers with 4 task slots, 2 vCPU, and 6 GB of memory each. You set the resource requests and limits on the global settings page and in the job settings.

The sizes assume that every job runs in application mode, with its own JobManager. Production jobs use application mode. Session clusters are for testing, so the sizes do not include them. A session cluster can run any number of jobs, so you cannot calculate its resources beforehand. A session cluster also takes resources away from the jobs that a size defines.

Resources for each size

The deployment requests cover Cloudera Streaming Analytics itself: the SSB services, the Flink Kubernetes Operator, and the SSB metadata database. They are the same for every size. The workload requests cover the Flink jobs that run on it. A request is the guaranteed minimum that the workload needs, and a limit is the maximum that it can use before it is throttled. Neither includes the Kubernetes control plane.

The deployment needs the same resources for every size:

Table 2. Deployment resources (all sizes)
Request Limit Disk (ReadWriteOnce) Object storage (if you bind a bucket)
10.75 vCPU, 12.75 GB 11.5 vCPU, 17 GB 30 GB 10 GB for S and M, 30 GB for L, 50 GB for XL

The storage per worker node is the Storage Per Node (GB) value of the Cloudera Streaming Analytics Nodes. The value covers Cloudera Streaming Analytics only, not the overhead of the platform.

The workload resources depend on the size:

Table 3. Workload resources for each size
Size Workload request Workload limit Total request, with the deployment Object storage for the workload (if you bind a bucket) Storage per worker node
S 20 vCPU, 70 GB 53 vCPU, 140 GB 30.75 vCPU, 82.75 GB 30 GB 100 GB
M 70 vCPU, 200 GB 135 vCPU, 400 GB 80.75 vCPU, 212.75 GB 120 GB 150 GB
L 260 vCPU, 760 GB 510 vCPU, 1,520 GB 270.75 vCPU, 772.75 GB 480 GB 150 GB
XL 1,000 vCPU, 2,960 GB 1,980 vCPU, 5,920 GB 1,010.75 vCPU, 2,972.75 GB 1,920 GB 150 GB

No size needs shared (ReadWriteMany) disks, GPUs, or extra disks. The object storage is the bucket that you bind to the default purpose, where SSB keeps checkpoints, savepoints, and uploaded files. For more information, see Preparing storage for Cloudera Streaming Analytics.

Node groups

The cluster has three node groups. The Control Plane Nodes node group runs the Kubernetes control plane, and Cloudera Streaming Analytics runs nothing on it. The Cloudera Streaming Analytics Nodes node group runs Cloudera SQL Stream Builder, the Flink Kubernetes Operator, the SSB metadata database, and your Flink jobs. The Bastion Node is the gateway for SSH access to the cluster network. The second column of the table names the section of the deployment page where you set the values.

Table 4. Node groups of Cloudera Streaming Analytics
Node group Section in the Anywhere Cloud Console Nodes (default / minimum) Minimum per node Recommended per node Disk per node (default / minimum)
Control Plane Nodes Control Plane Node 1 / 1 4 vCPU, 8 GiB 8 vCPU, 16 GiB 30 GiB / 30 GiB
Cloudera Streaming Analytics Nodes Worker Capacity 3 / 3 8 vCPU, 16 GiB 8 vCPU, 32 GiB 30 GiB / 30 GiB; more for larger sizes
Bastion Node Security Gateway 1 / 1 2 vCPU, 4 GiB 4 vCPU, 4 GiB 30 GiB / 30 GiB

One control plane node is enough for development and testing. Use three for a highly available control plane.

The SSB services, the SSB metadata database, and every Flink job share the Cloudera Streaming Analytics Nodes. The deployment requests are the same for every size, and each running job adds its JobManager and TaskManagers. Size the node group for the total requests of your size, and leave room for the platform pods that run on each node.

The Anywhere Cloud Console shows only the minimum values of each node group, and it offers only the instance flavors that meet them. The recommended values come from the blueprint, and the Anywhere Cloud Console does not show them. These values are estimates. Use them as a starting point, and adjust them after you measure your own workload.

The cluster needs a default storage class that provides ReadWriteOnce disks.

For the sizing of Anywhere Cloud itself, see Sizing references in the Anywhere Cloud documentation.

Applying a size when you deploy

When you deploy on a new compute cluster, set the node groups for your size as follows:

  1. In the Performance Tier section, select default, the only tier. It sets the minimum values of the node groups and limits the instance flavors that you can select for them.
  2. In the Worker Capacity section, for the Cloudera Streaming Analytics Nodes, select an Instance Flavor and a Node Count whose total CPU and memory are larger than the total requests of your size, including the deployment. Leave room for the platform pods that run on each node. The minimum is three nodes of 8 vCPU and 16 GiB.
  3. In the Storage Per Node (GB) field of the same node group, enter the storage per worker node of your size.
  4. Set the Control Plane Node and the Security Gateway as the node group table shows. They do not depend on the size.
  5. Bind a bucket for the object storage of your size. For more information, see Preparing storage for Cloudera Streaming Analytics.

When you deploy on an existing compute cluster, the cluster must have free CPU, memory, and storage for the total requests of your size.

Estimating capacity for jobs

The Cloudera Streaming Analytics Nodes run the SSB services, the SSB metadata database, and every Flink job that you start. Each running job adds its own pods:

  • A JobManager pod that requests 1 vCPU and 2 GB of memory by default, with limits of 1.5 vCPU and 4 GB. In application mode, each job has its own JobManager. In session mode, the jobs of a user share the JobManager of the session cluster of that user.
  • One or more TaskManager pods that each request 0.5 vCPU and 2 GB of memory by default, with limits of 1.5 vCPU and 4 GB. Each TaskManager has one task slot by default.

Plan the memory with headroom, because memory use can grow to twice the requested amount. You can change the resources of a job in its settings.

The number of TaskManagers depends on the parallelism of the job: Flink starts as many TaskManagers as the job needs task slots. Higher parallelism and large-scale stateful processing need more TaskManagers, and so more CPU and memory on the Cloudera Streaming Analytics Nodes.

To estimate the capacity that you need, follow these steps:

  1. List the jobs that you expect to run at the same time.
  2. For each job, add the CPU and memory of its JobManager and of all its TaskManagers.
  3. Add the totals for all jobs.
  4. Compare the result with the capacity that remains on the Cloudera Streaming Analytics Nodes after you account for the deployment requests.

For example, three jobs in application mode that each run one JobManager and two TaskManagers with the default settings request 6 vCPU and 18 GB of memory in total, and can use up to 13.5 vCPU and 36 GB.

If the result is higher than the capacity of three nodes, add nodes, choose a larger instance flavor, or both.

Storage

Cloudera Streaming Analytics requests the following persistent volumes from the default storage class of the cluster:

Table 5. Default persistent volumes
Volume Size
SSB metadata database: each of the three PostgreSQL instances 10 GiB

Together, these volumes are the ReadWriteOnce disk of the deployment resources. They use the disk of the Cloudera Streaming Analytics Nodes only when the default storage class of the cluster is node-local.

Checkpoints, savepoints, and uploaded files do not use these volumes. They go to the bucket that you bind to the default purpose.