↓ Skip to main content
Three Fixes That Got a Shared Streaming Lab Ready for 40 Parallel Users
  1. Posts/

Three Fixes That Got a Shared Streaming Lab Ready for 40 Parallel Users

Table of Contents

Three Fixes That Got a Shared Streaming Lab Ready for 40 Parallel Users
#

A hands-on streaming lab is comfortable to test with one user. You click through the steps, everything is green, and the lab looks ready. Then 40 people run the same step in the same minute. Every shared component now sees 40 times the writes, the connections and the disk traffic, and the first weak spot decides how the day goes.

In November I prepared a shared Apache Flink SQL lab for hands-on workshops and meetups. Before the first event, a robot played every seat at once. The first full run passed 601 of 920 checks: 33 of 40 seats stopped at the same step. After three fixes in the shared services around Flink, the next full run passed 966 of 966 checks on 42 seats.

In this article, we will look at how the robot works, then go through the three fixes step by step with the real configuration, and end with a checklist for anyone who runs a multi-user lab.

๐ŸŽฏ What We Will Cover
#

  • The lab: one Kubernetes cluster, one shared Ververica Platform, one namespace per seat
  • The robot: every seat, every step, at the same time, as the real seat user
  • Fix 1: move Grafana from SQLite to Postgres
  • Fix 2: size the Iceberg REST catalog pools and make its liveness probe patient
  • Fix 3: raise EBS gp3 IOPS online with a VolumeAttributesClass
  • Results before and after, and a checklist for your own lab

Prerequisites:

  • A Kubernetes cluster with the AWS EBS CSI driver. The lab ran Amazon EKS 1.36, where VolumeAttributesClass is available as storage.k8s.io/v1.
  • kubectl and helm
  • Grafana Helm chart 10.5.15 (Grafana 12.3.1) and a Postgres server
  • Lakekeeper 0.14.2 as the Iceberg REST catalog (Helm chart 0.13.0)
  • gp3 EBS volumes for the shared disks

๐Ÿš€ The Lab: One Platform, Many Seats
#

The lab runs a 24-step scenario in 5 parts (about 2.5 hours): Kafka into Apache Fluss, Postgres CDC, enrichment in Flink SQL, tiering from Fluss into an Iceberg lakehouse, queries in Trino and a Grafana dashboard at the end.

Diagram: 40 seat namespaces on top use three shared services, each with its fix: dashboards (SQLite to Postgres), the Iceberg catalog (pools 30/30, probe 3 minutes) and the object store disk (3,000 to 12,000 IOPS), all on one shared Ververica Platform, tested by a robot that runs all seats and all steps.

The architecture:

  • One Amazon EKS cluster: 3 platform nodes (m6a.2xlarge) for the shared services and 12 seat nodes (r6a.4xlarge) for the seats.
  • One shared Ververica Platform 3.1.1 with OIDC login. Each attendee logs in as their own user and works in their own platform namespace.
  • One Kubernetes namespace per seat with its own Kafka (Redpanda), Apache Fluss 0.9.1 and the seat’s Flink jobs.
  • Shared services: an Iceberg REST catalog (Lakekeeper), a MinIO object store, Postgres, Trino and Grafana with one organization per seat.

On the event day, the bring-up from 0 seat nodes takes about 15 minutes. Everything a seat does touches a shared service at some point, and that is where the load test looks.

๐Ÿค– The Robot: Every Seat, Every Step, at Once
#

The robot runs Steps 1 to 24 for many seats in parallel. Each seat runs in its own thread and logs in as the real seat user:

  • Ververica Platform: OIDC login, then the platform REST API for Flink SQL statements, deployments and SQL previews
  • Trino: through the seat’s own SQL editor login
  • Grafana: the seat’s login, a dashboard import and a query on every panel
  • Postgres: a check with the seat’s own database login

Because every Flink action in the lab is a call to the platform REST API, a robot can play the whole room. This is the core of the smaller steady-state probe, trimmed for reading. It logs in as a seat, runs SQL through the platform and reads the state of every deployment:

def probe(row):
    ns = row["seat"]
    v = VVP(BASE, timeout=60)
    v.login(row["user"], row["password"])                  # OIDC login as the seat user
    st, j, t = v.call("POST", "/sql/v1beta1/namespaces/%s/sqlscripts:execute" % ns,
                      {"statement": "SHOW TABLES IN fluss.orders",
                       "defaultCatalog": "system", "defaultDatabase": "default"},
                      timeout=120)
    st, j, t = v.call("GET", "/api/v1/namespaces/%s/deployments" % ns, timeout=60)
    states = {}
    for it in ((j or {}).get("items") or []) if st == 200 else []:
        s = (it.get("status") or {}).get("state", "?")
        states[s] = states.get(s, 0) + 1

For every seat and step, the robot writes PASS or FAIL with evidence. This is one seat from the final run (three steps shown, timestamps removed):

{"seat": "seat-005", "res": {
  "12": {"status": "PASS", "evidence": "SHOW CREATE TABLE has 'table.datalake.enabled' = 'true'"},
  "19": {"status": "PASS", "evidence": "revenue-analytics-sink RUNNING after 130s; revenue_5m rows|categories|orders=20|10|1933 (after 0s)"},
  "20": {"status": "PASS", "evidence": "login seat005 org=49 orgs=['seat-005'] datasources=['lakehouse_dwh']; imported=True; panels with rows 6/6"}
}}

The final run took about 20 minutes for 42 seats and all steps. People need about 2.5 hours for the same steps, so the robot puts the shared services under denser load than a real room.

Key Points:

  • The goal of the robot is not speed. It finds the first thing that fails when everybody acts together.
  • Use each seat’s own login. A shared admin token hides the permission and session problems that real attendees hit.
  • Repeat the full run after every change. Each fix below moved the failure to a different layer.

๐Ÿ“‹ Fix 1: Move Grafana from SQLite to Postgres
#

The symptom
#

Grafana ran on its default SQLite database. When 42 seats imported the lab dashboard at the same moment, SQLite answered “database is locked”, and 2 to 3 dashboards ended up without permissions. They were invisible to their seat, although the import API had answered 200. I reproduced it twice, so it was not bad luck. SQLite is a single-file database with limited write concurrency, and a burst of imports that also write permission rows is the kind of load that shows it.

Step 1: Create a role and a database on Postgres
#

The lab already had a Postgres server, so Grafana got its own role and database there. The script is idempotent, so it can run on every install:

DO $$ BEGIN
  IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = 'grafana') THEN CREATE ROLE grafana LOGIN; END IF;
END $$;
ALTER ROLE grafana PASSWORD '<grafana-db-password>';
SELECT 'CREATE DATABASE grafana OWNER grafana'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'grafana')\gexec

Put the same password into a Kubernetes Secret:

kubectl -n grafana create secret generic grafana-db --from-literal=password='<grafana-db-password>'

Step 2: Point Grafana at Postgres in the Helm values
#

The database section of grafana.ini selects Postgres. The password comes from the Secret as an environment variable, never from the values file:

envValueFrom:
  GF_DATABASE_PASSWORD:
    secretKeyRef: { name: grafana-db, key: password }

grafana.ini:
  database:
    type: postgres
    host: <postgres-service>.<namespace>.svc.cluster.local:5432
    name: grafana
    user: grafana
    ssl_mode: disable

Step 3: Roll it out
#

helm upgrade --install grafana grafana/grafana --version 10.5.15 --namespace grafana \
  --values values-grafana.yaml --wait --timeout 10m

After the switch, the same parallel import left 0 dashboards without permissions.

Tip:

Every grafana.ini key also works as an environment variable in the form GF_<SECTION>_<KEY>, for example GF_DATABASE_TYPE=postgres. That is how GF_DATABASE_PASSWORD above reaches the database settings.

Two details that cost a run each
#

The lab maps each seat’s login group to its own Grafana organization (org_mapping). Grafana resolves that mapping once at startup and skips organizations that do not exist yet (“Could not fetch OrgID. Skipping”). New seats then land in the main organization without their datasource. The script that adds seats now restarts Grafana after it creates the organizations:

kubectl -n grafana rollout restart deploy/grafana
kubectl -n grafana rollout status deploy/grafana --timeout=5m

The second detail: when seat logins are removed and created again, the Grafana user keeps the old identity from the login provider, and the new user with the same name cannot log in (“unable to create user: user not found”). The remove script now deletes the Grafana user too. Grafana creates it again at the next login:

# Find the user id, then delete the user (Grafana admin API)
curl -s -u "admin:<admin-password>" "http://<grafana-host>/api/users/lookup?loginOrEmail=seat007"
curl -s -u "admin:<admin-password>" -X DELETE "http://<grafana-host>/api/admin/users/<id>"

๐Ÿ”„ Fix 2: Size the Catalog Pools and Make the Probe Patient
#

The symptom
#

Step 12 enables tiering from Fluss into Iceberg, which creates an Iceberg table in the shared REST catalog:

ALTER TABLE fluss.orders.orders_enriched
SET ('table.datalake.enabled' = 'true', 'table.datalake.freshness' = '30s');

With 40 seats running Step 12 at once and 43 tiering jobs committing, the catalog’s default Postgres pools ran dry (“DatabaseError: Error starting transaction”). Step 12 failed on 33 of 40 seats, and those seats could not continue with the steps that need the Iceberg table.

It got worse: the catalog’s /health endpoint runs SELECT 1 through the same pools. The liveness probe saw a busy catalog as a dead one and restarted the pod 8 times in the middle of table creates, which left half-created Iceberg tables. CPU stayed under 40 millicores the whole time. The limit was connections, not CPU.

Step 1: Know the defaults
#

The Lakekeeper configuration documents the knobs and their defaults:

SettingDefaultLab value
LAKEKEEPER__PG_READ_POOL_CONNECTIONS1030
LAKEKEEPER__PG_WRITE_POOL_CONNECTIONS530
LAKEKEEPER__PG_ACQUIRE_TIMEOUT (seconds)530
LAKEKEEPER__MAX_REQUEST_TIME30s120s
Liveness window25 s3 min

Step 2: Set the pools, the timeouts and the probe in the Helm values
#

catalog:
  replicas: 1
  config:
    LAKEKEEPER__PG_READ_POOL_CONNECTIONS: "30"
    LAKEKEEPER__PG_WRITE_POOL_CONNECTIONS: "30"
    LAKEKEEPER__PG_ACQUIRE_TIMEOUT: "30"
    LAKEKEEPER__MAX_REQUEST_TIME: "120s"   # with a unit: a bare number fails ("expected a string")
  livenessProbe:
    enabled: true
    initialDelaySeconds: 10
    periodSeconds: 10
    timeoutSeconds: 10
    failureThreshold: 18                   # 18 x 10 s = 3 minutes before a restart

Step 3: Roll it out
#

helm repo add lakekeeper https://lakekeeper.github.io/lakekeeper-charts/
helm upgrade --install my-lakekeeper lakekeeper/lakekeeper --version 0.13.0 --namespace lakekeeper \
  --values values-lakekeeper.yaml --wait --timeout 10m

The request time limit came from the next layer down. A table create lists its storage location in the object store inside the transaction. With many Flink job starts at once (each one moves 229 MB of jars through MinIO), that list took 18 s, and 10 seats doing Step 12 together all hit the 30 s default limit. 120 s turns that into a wait instead of an error. The real fix for the slow disk is Fix 3.

Trap:

A liveness probe that checks the database through the same pool as the real work fails exactly when the service is busiest. Kubernetes then restarts a healthy but busy pod, and a slow minute becomes an outage. Make the liveness window longer than the longest busy period you expect, and look at pool metrics and acquire timeouts before you blame the application.

Key Points:

  • Size each pool for the number of concurrent clients, not for the CPU.
  • Keep the sum of all pools of all services below max_connections of the database server.
  • Give waiting clients an acquire timeout that fits the slowest healthy operation.
  • The lab text now also asks the room to run Step 12 row by row, about one minute apart. The robot does the same in waves of 10 seats.

๐Ÿ’พ Fix 3: Raise gp3 IOPS Online with a VolumeAttributesClass
#

The symptom
#

Every Flink job start of every seat reads its jars from the MinIO object store. With 42 seats, the MinIO disk sat at the gp3 base limits of 3,000 IOPS and 125 MB/s. The catalog’s storage list then took 18 s, and Step 12 failed. Every job start also goes through a second shared disk, used by the platform’s SQL service.

The gp3 volume type lets you buy IOPS and throughput separately from size, and the EBS CSI driver can modify a bound volume online when its PVC names a VolumeAttributesClass. No new volume, no data copy, no pod restart.

Step 1: Define the classes
#

One class per speed, plus the base class to go back to after the event:

apiVersion: storage.k8s.io/v1
kind: VolumeAttributesClass
metadata:
  name: labday-gp3-12000-500
driverName: ebs.csi.aws.com
parameters: { type: gp3, iops: "12000", throughput: "500" }
---
apiVersion: storage.k8s.io/v1
kind: VolumeAttributesClass
metadata:
  name: labday-gp3-6000-500
driverName: ebs.csi.aws.com
parameters: { type: gp3, iops: "6000", throughput: "500" }
---
apiVersion: storage.k8s.io/v1
kind: VolumeAttributesClass
metadata:
  name: labday-gp3-base
driverName: ebs.csi.aws.com
parameters: { type: gp3, iops: "3000", throughput: "125" }
kubectl apply -f volume-classes.yaml

Step 2: Patch the PVCs while the lab runs
#

# Object store disk: 12,000 IOPS and 500 MB/s
kubectl -n vvp-system patch pvc minio --type merge \
  -p '{"spec":{"volumeAttributesClassName":"labday-gp3-12000-500"}}'

# SQL service disk: 6,000 IOPS and 500 MB/s
kubectl -n vvp-system patch pvc vvp --type merge \
  -p '{"spec":{"volumeAttributesClassName":"labday-gp3-6000-500"}}'

Step 3: Check that the change landed
#

kubectl -n vvp-system get pvc minio \
  -o jsonpath='{.status.currentVolumeAttributesClassName}{"\n"}{.status.modifyVolumeStatus}{"\n"}'

Step 4: Go back after the event
#

Higher IOPS and throughput cost more, so the fast class is for event days only:

kubectl -n vvp-system patch pvc minio --type merge \
  -p '{"spec":{"volumeAttributesClassName":"labday-gp3-base"}}'

Trap:

  • AWS allows one modification per volume every 6 hours (see the EBS modification requirements). Raise the disks well before the event and plan the way back for after it.
  • The instance limits the disk too. An m6a.2xlarge has about 156 MB/s of baseline EBS bandwidth for all its disks together. A 500 MB/s gp3 volume on a node next to other busy disks cannot use its speed. The lab pins MinIO to a node away from the other busy disks.

For a volume that is created fresh on every install, a StorageClass with the fast settings avoids the patch:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: labday-gp3-fast
provisioner: ebs.csi.aws.com
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
reclaimPolicy: Delete
parameters: { type: gp3, iops: "12000", throughput: "500", encrypted: "true", fsType: ext4 }

๐Ÿ“Š Results: Before and After
#

Both runs used the same robot and the same lab steps, with all seats at once. The first run was on 9 November, before the fixes. The final run was on 10 November, after all three fixes.

CheckBeforeAfter
Full lab run, checks passed601 of 920 (40 seats) โŒ966 of 966 (42 seats) โœ…
Step 12, table create in the Iceberg catalogfailed on 33 of 40 seats โŒpassed on 42 of 42 seats โœ…
Dashboards without permissions after a parallel import of 422 to 3 (reproduced twice) โŒ0 โœ…
Grafana databaseSQLitePostgres
Catalog pools (read, write, acquire timeout)10, 5, 5 s30, 30, 30 s
Catalog liveness window25 s (8 restarts during Step 12)3 min
Object store disk3,000 IOPS, 125 MB/s12,000 IOPS, 500 MB/s

Line chart: share of seats that passed each lab step. Before the fixes, 40 seats pass Steps 1 to 11, then only 7 of 40 pass Step 12 and most later steps. After the fixes, 42 of 42 seats pass every step.

Before the fixes, every seat passed Steps 1 to 11, and the failures started exactly at Step 12. That pattern pointed straight at the catalog.

โœ… A Checklist for Your Multi-User Lab
#

Production Best Practices:

  1. Rehearse with a robot that plays every seat at once, with each seat’s own login, before every event.
  2. Find embedded databases in shared tools (SQLite is the usual one) and move them to a database server.
  3. List every connection pool of every shared service. Size it for the number of seats, and keep the total below max_connections.
  4. Read the health checks. If a probe goes through the same pool as the work, give it a window longer than the busiest minute.
  5. Check request time limits of shared APIs against the slowest healthy call under load.
  6. Measure disk IOPS and throughput of shared volumes, and the EBS bandwidth of the node that hosts them.
  7. Raise disk speed online with a VolumeAttributesClass, and plan the way back (one change per 6 hours).
  8. Stagger the heaviest step. Row by row, one minute apart, costs the room a few minutes and saves the step.
  9. Clean up identities when seats are removed, in every tool that caches users.
  10. Repeat the full run after every change, and keep the results per seat and step.

๐ŸŽฏ Summary
#

We load tested a shared Flink SQL lab with a robot that played every seat at once, and fixed the three shared services that broke first:

  • โœ… Grafana on Postgres: 0 dashboards without permissions after a parallel import of 42
  • โœ… Iceberg REST catalog: pools 30/30 with a 30 s acquire timeout, a 120 s request limit and a 3-minute liveness window
  • โœ… gp3 disks: 12,000 IOPS and 500 MB/s, changed online with a VolumeAttributesClass, and back to base after the event
  • โœ… Result: from 601 of 920 checks on 40 seats to 966 of 966 checks on 42 seats

The three fixes were all in the shared services around Flink: a dashboard database, a catalog pool and a disk. A parallel rehearsal is the only way I found to see them before the attendees do.

๐Ÿค How Ververica Can Help
#

Ververica: Delivery Assurance for mission-critical real-time data. Built by the original creators of Apache Flinkยฎ.

  • Hands-on labs: Ververica runs X-Stream Labs, hands-on workshops where you build a streaming application from ingestion to output on a live Ververica Platform environment, with Ververica engineers in the room.
  • One platform for many teams: in this lab, one shared Ververica Platform served every seat with its own namespace and its own OIDC login, and the platform REST API let a robot rehearse the full room. The platform runs self-managed, in your own cloud (BYOC) or as a managed service.
  • Flink at scale: Ververica Professional Services offers architecture design reviews, health checks and performance tuning by the engineers who built Flink.
  • Training: the Ververica Academy teaches stream processing with Flink for your whole team.

If you plan a multi-user Flink lab or a workshop for your team, reach out to me on LinkedIn or through Ververica.

๐Ÿ“š Related Articles#


All numbers in this article come from robot runs on 9 and 10 November 2026 on Ververica Platform 3.1.1, Amazon EKS 1.36, Grafana 12.3.1 and Lakekeeper 0.14.2. Update 2026-12-06: rewritten with the real configuration, step by step commands and the full before and after results.

Related