Research library / Run story

217M Records. 366K ops/sec. Full mTLS + OPA. Zero Compromise.

Enterprise security benchmark · mTLS (TLSv1.3) · OPA/RBAC per-batch · fail.open=false · Kafka sink

Records Written
217,197,335
Avg Throughput
366K ops/s
Peak Throughput
462K ops/s
Throughput Drift
-0.8%
Data Loss
Zero

Hardware: Intel i9-8950HK · 6C/12T · 32GB RAM · JVM: 6GB heap · G1GC · 3 GC threads · Security: TLSv1.3 mTLS + OPA fail.open=false

Why this profile exists

Security That Doesn't Cost You Your Architecture.

The standard objection to enterprise-grade security in high-throughput pipelines is throughput. Mutual TLS adds handshake overhead. OPA policy evaluation adds a decision latency on every batch. In most frameworks, these costs are paid as a hard multiplier against raw throughput — enabling security means accepting a proportional reduction in performance.

This profile answers that objection directly. It runs StreamKernel's full enterprise security stack — TLSv1.3 mutual authentication on every Kafka connection, OPA policy evaluation on every batch, fail.open=false meaning a policy failure stops the pipeline rather than bypassing the check — and measures the cost against the at-least-once baseline.

The security configuration

mTLS: TLSv1.3 · PKCS12 keystore and truststore · SSL protocol on Kafka port 9093 OPA: OPA_SIDECAR plugin · policy=streamkernel/authz/allow · principal=service-account-1 resource=arena-bench-test · action=write · fail.open=false · cache.ttl.ms=30000 fail.open=false is the critical setting. It means if OPA is unavailable or returns an error, the pipeline stops — it does not permit the write. This is the only configuration acceptable in a regulated environment. Most pipelines never test this path under load.

Act 1 of 3 · Executive dashboard · Throughput & latency

189K ops/sec Snapshot. 366K Average. The Kafka Sink Health Story.

The executive summary shows a 189K ops/sec 30-second rate snapshot. The throughput chart tells the full run story: a ramp from zero to ~350K at 19:44, a sustained plateau between 300K and 420K from 19:45 through 19:52, and a clean terminal drop at run completion. The cumulative totals line climbs linearly to 217M with no flat sections — the pipeline never stalled.

The throughput drift of -0.8% is the flattest result in the entire benchmark suite. Comparing the three thirds: 371K → 356K → 369K. The pipeline entered its steady state almost immediately and held it with negligible variance. This is the profile least affected by JIT warmup — the NOOP transform has essentially zero compilation overhead.

The latency panel shows P50, P95, P99, and P99.9 all reading 0.001ms — identical at every percentile. The MAX chart shows isolated spikes at 19:43 (just under 60ms) and 19:49 (just under 100ms), both corresponding to G1GC mixed collection pauses. Between GC events, MAX latency is consistently sub-millisecond.

The Kafka Sink Health section confirms the mTLS path is active: the Send Rate panel shows records flowing through the SSL-authenticated producer, and the Write Latency panel shows Avg Request Latency settling to near-zero after the initial connection handshake. The Buffer Used spike at 19:45 corresponds to the initial burst as 12 parallel workers saturate the Kafka producer buffer simultaneously.

Grafana executive dashboard for the run, with throughput, integrity, latency percentile, load, and Kafka sink health panels.
Image 1 — Executive: 189K ops/s snapshot (30s rate). Throughput chart: 300K–420K sustained plateau. P50/P95/P99/P99.9: all 0.001ms. INFLIGHT 12K. Kafka Sink: TLSv1.3 mTLS active, write latency near-zero after handshake.

Act 2 of 3 · Pipeline integrity & JVM

100% Integrity. 6GB Heap. 1.32GiB at Snapshot. 333μs GC.

The pipeline integrity gauges show 100% integrity, 0% drop rate, 0% DLQ rate — identical to every other StreamKernel run. The JVM section is the most operationally significant result in this profile: the heap snapshot at run end shows 1.32GiB used against a 6GiB maximum. This is the leanest memory footprint in the benchmark suite, and it runs under the most demanding security configuration.

The heap over time chart shows cycling between approximately 1GiB and 3.5GiB — G1 is collecting aggressively and efficiently. With only 3 GC threads (compared to 5 in the MongoDB profiles), G1 is doing more work per thread, but the GC pause average of 14.0ms is the lowest in the entire benchmark suite. The max pause of 94.2ms occurred once — a single mixed collection clearing old-generation regions. Zero Full GC events across the entire run.

The NOOP transform profile is the reason for this GC efficiency: without the STRING_TO_WIREEVENT UUID allocation per record, without BSON Document construction per batch, without float[] vector boxing, the heap sees almost no per-record allocation beyond the raw byte payload. The mTLS handshake objects and OPA HTTP client allocate once at startup and are retained — they do not contribute to per-batch GC pressure.

28 live threads — one more than the MongoDB profiles, reflecting the OPA HTTP client thread pool. Stable from startup. 42 GCLocker events correspond to native code interactions in the SSL implementation — all transient, none producing observable latency spikes.

Grafana pipeline integrity and JVM dashboard for the run, with integrity gauges, heap over time, garbage collection, and thread count panels.
Image 2 — Integrity: 100%. Drop: 0%. DLQ: 0%. Heap: 1.32GiB at snapshot, max 6GiB. GC: 0.0476 ops/s, 333μs (Grafana 30s rate). GC log: 142 pauses, 14.0ms avg, 94.2ms max. Zero Full GC. 28 threads.

Act 3 of 3 · Demo scripts · Before & after

Clean Kafka State. 217,197,335 Records Confirmed. Even Partition Distribution.

The demo_before_kafka.ps1 script confirmed a clean pre-run state: the Kafka broker was responding at localhost:9092 (the mTLS-secured broker listens on 9093), the topic arena-bench-test existed with zero messages, and no StreamKernel consumer groups were registered. The pipeline was starting from a verified clean state with full mTLS enforcement active before the first record was written.

Terminal output of the pre-run demo script showing Kafka broker health, topic state, and consumer group state before the run.
Image 3 — demo_before_kafka.ps1: broker healthy, topic clean (0 messages), no consumer groups. Clean state confirmed before mTLS+OPA run.

The demo_after_kafka.ps1 script confirmed 217,197,335 records distributed across 12 partitions. The partition distribution is the operational proof of correct behavior under mTLS: each of the 12 parallel pipeline workers maintained an independent, authenticated SSL connection to the Kafka broker, routing records across all 12 partitions in near-perfect distribution. The tightest partition spread is 17,487,418 (partition 9) to 18,791,866 (partition 5) — a 7.5% variance, well within expected range for a synthetic payload with low entropy.

Three sample records are shown from the topic. Each begins with a hex prefix (E2740, E1B85, E7FD) followed by 1,024 bytes of synthetic payload — double the payload size used in the Kafka ALO baseline (512 bytes). The mTLS + OPA profile deliberately uses 1,024-byte payloads to produce acquisition-grade evidence at a more demanding payload size.

Terminal output of the post-run demo script listing per-partition record counts and sample messages after the run.
Image 4 — demo_after_kafka.ps1: 217,197,335 records total. 12-partition distribution, 7.5% spread. Sample records confirm 1,024-byte payloads written through mTLS-authenticated SSL producer.

Summary · The security cost is negligible

366K ops/sec With Hard Security Enforcement.

The at-least-once baseline (STRING_TO_WIREEVENT transform, 512-byte payload, no security) runs at 525K ops/sec. This profile — NOOP transform, 1,024-byte payload, mTLS + OPA fail.open=false — runs at 366K ops/sec. The security stack adds zero to the transform overhead; the throughput difference is entirely explained by the doubled payload size and the conservative 6GB/3-thread heap configuration.

What fail.open=false means in practice

Most security implementations in streaming pipelines are advisory — if the policy engine is unavailable, the write proceeds. StreamKernel's OPA integration runs fail.open=false: a policy engine failure stops the pipeline. This is the only configuration acceptable for financial transactions, protected health information, or classified data. The 366K ops/sec number is measured with this setting active — not with security bypassed.

ProfileAvg EPSRecordsSecurityWhat it proves
Kafka ALO (512B WireEvent)525K313MNoneKafka write ceiling no security overhead
mTLS + OPA (1024B NOOP)366K217MTLSv1.3 OPA fail.open=falseSecurity at throughput no compromise
MongoDB Insert (512B)163K95.5MNoneMongoDB write ceiling document persistence

Commercial path

Want to turn this paper into a concrete evaluation?

Bring the action you have in mind and we will map it to what the runtime does today.