Configure Stream Isolation on Pinot Tenants

When installing Kloudfuse, you may choose to isolate resources at the level of internal Pinot DB. You can designate specific deployments to service assigned streams: metrics, logs, traces, RUM, and so on. You must then mark the node with a specific label, such as kf_stream=metrics, and so on; see Tag Nodes.

Supported Streams

These are the supported streams:

pinot-metrics

Enable through global.metrics.isolated.

Node affinity: kf_stream=metrics

pinot-logs

Enable through global.logs.isolated.

Node affinity: kf_stream=logs

pinot-traces

Enable through global.traces.isolated.

Node affinity: kf_stream=traces

pinot-events

Enable through `global.events.isolated'.

Node affinity: kf_stream=events

pinot-rum

Enable through global.rum.isolated.

Node affinity: kf_stream=rum

Customize Helm Values

Consider the code in the Kloudfuse custom-values.yaml file, Configure Stream Isolation, and ensure that you implement all the requirements to correctly isolate telemetry streams:

  1. Set global.metrics.isolated to true.

  2. Add a new pinot-metrics section.

  3. Set pinot-metrics.fullnameOverride to pinot-metrics; the pinot-* section matches the fullnameOverride.

    For pinot-logs it must be pinot-logs, for pinot-traces it must be pinot-traces, and so on.

  4. Set up the rest of the file like a default pinot deployment. The only required sections are pinot.broker, pinot.server.realtime, and pinot.server.offline

  5. When enabled, nodes that service metrics must be marked with the label kf_stream=metrics.

  6. Do not specify zookeeper or controller sections; they are specified in the default pinot section.

  7. The pinot-metrics pods have a node affinity to the label kf_stream=metrics. Before deployment, you must tag the nodes you want to dedicate with kf_stream=metrics. Leave the default nodes untagged. The default pinot deployment has a node affinity that requires the absence of the kf_stream label.

  8. Work with Kloudfuse Customer Support to get the correct jvmOpts values for your cluster.

Ensure that the sum of the replicaCount values accross all pinot-tenants sections equals the number of nodes.

Configure Stream Isolation
pinot-metrics: (1)
   fullnameOverride: pinot-metrics (2)
   peerDownload:
     enabled: true

   deepStore: (3)
     enabled: false

   broker: (4)
     jvmOpts: "[CONSULT WITH KLOUDFUSE SUPPORT]" (6)
     replicaCount: 1
     podAntiAffinityPreset: "hard"
     nodeSelector: {}
     affinity: {}
     tolerations: []

   server: (5)
     probes:
       livenessEnabled: false
       readinessEnabled: false
     realtime:
       replicaCount: 1
       jvmOpts: "[CONSULT WITH KLOUDFUSE SUPPORT]" (6)
       persistence:
         size: 100G
         storageClass: "kfuse-ssd"

     offline:
       enabled: true
       replicaCount: 1
       jvmOpts: "[CONSULT WITH KLOUDFUSE SUPPORT]" (6)
       persistence:
         size: 256G
         storageClass: "kfuse-ssd-offline"
     podAntiAffinityPreset: "hard"
     nodeSelector: {}
     affinity: {}
     tolerations: []
1 pinot-metrics: Configuration for Pinot metrics tenant requires global.metrics.isolated to be `true.
2 fullnameOverride: Must match the name of the deployment, here pinot-metrics.
3 When deepStore is enabled, configure additional parameters depending on where you host deepStore: GCP, AWS, or Azure object store.
4 Specify the broker section.
5 Specify the server section.
6 jvmOpts: Consult Kloudfuse Customer Support to get the correct values for your cluster.

Tag Nodes

We do not recommend that you manually tag nodes because if the cloud provider recycles the node, the configuration is lost.

Instead, create separate node group or pool for each stream, and attach the required Kubernetes label to identify the stream. This ensures that any node created in the node group has the correct label.

For example, this is how to configure node groups or node pools in [aws], Azure, and GCP.

  • Azure

  • AWS

  • GCP

Kubernetes labels for node group
  1. Create a node pool.

  2. Under the Optional setting tab, scroll to the Labels section.

  3. Specify a key kf_stream with value metrics.

Kubernetes labels for node group
  1. Create a Node Group.

  2. In Step 1, Configure node group, scroll to the Kubernetes labels section.

  3. Specify a key kf_stream with value metrics.

Kubernetes labels for node pool
  1. Add a Node pool.

  2. In the Metadata section, scroll to the Labels section.

  3. Specify a key kf_stream with value metrics.

List Available Nodes

To get a list of available nodes, issue this command:

kubectl get nodes

To filter the list of available nodes by node group or namespace, issue this command:

kubectl get nodes -l

Verify

During the deployment process, the set-tags job dedicates/assigns the pinot-metrics pods only to service metrics.

  1. After finishing the deployment, port forward the pinot-controller:

    kubectl port-forward pinot-controller-0 9000:9000
    Go to localhost:9000
  2. Click on Tenants.

  3. Find realtime_metrics and verify that:

    • The server count is the same as the realtime replicas you specified in your deployment.

    • The broker count is the same as the broker replicas you specified in your deployment.

  4. Find offline_metrics and verify that:

    • The server count is the same as the offline replicas you specified in your deployment.

    • The broker count is the same as the broker replicas you specified in your deployment.

Scale the Stream-Isolated Cluster

Follow these steps to ensure that your stream-isolated cluster scales to the workload:

  1. Add the desired number of nodes to your existing cluster.

  2. Tag these nodes with the stream you are scaling. See the list of Supported Streams, and how to Tag Nodes.

  3. In your configuration.yaml file, increase replicaCount for all services by the number of additional nodes. See the code listing Configure Stream Isolation.

    Do not increase the replicaCount for pinot and the kafka.zookeeper sections.

  4. In the pinot section, increase the replicaCount of the controller.

  5. In the pinot-STREAM section, increase the replicaCount values of server.offline, server.realtime, and broker.

  6. Proportionally increase the number of topic partitions in Kafka.

  7. Increase the Kafka disk space using the following formula:

    \(diskSpace = numberOfPartitions * replicationFactor * 10GB\)

  8. Upgrade the helm using the new configuration.

  9. Re-assign Kafka partitions to new brokers; see Increase Kafka partition replication factor.

  10. Re-balance Pinot segments:

    1. Run the following command:

      kubectl port-forward  pinot-controller-0 9000:9000
    2. Navigate to the configuration UI in your Web browser:

    3. Select the Rebalance Servers option at the top of the page.

      Rebalance Server
    4. In the Rebalance Server dialog:

      Rebalance Server Options
      • Turn on the Downtime option.

      • Turn on the Best Efforts option.

      • Click Save.

The rebalancing process may take a long time, depending on the volume of data that must be moved.