Kafka Payload Logging

This notebook illustrates testing your model with Kafka payload logging.

Prequisites

  • An authenticated K8S cluster with istio and Seldon Core installed

    • You can use the ansible seldon-core and kafka playbooks in the root ansible folder.

  • vegeta and ghz benchmarking tools

Port forward to istio

kubectl port-forward $(kubectl get pods -l istio=ingressgateway -n istio-system -o jsonpath='{.items[0].metadata.name}') -n istio-system 8003:8080
  • Tested on GKE with 6 nodes of 32vCPU e2-standard-32

from IPython.core.magic import register_line_cell_magic


@register_line_cell_magic
def writetemplate(line, cell):
    with open(line, "w") as f:
        f.write(cell.format(**globals()))
VERSION = !cat ../../../version.txt
VERSION = VERSION[0]
VERSION

CIFAR10 Model running on Triton Inference Server

We run CIFAR10 image model on Triton inference server with settings to allow 5 CPUs to be used for model on Triton.

Direct Tests to Validate Setup

Run Vegeta Benchmark

Summary

By looking at the Kafka Grafana monitoring on e can inspect the achieved message rate.

You can port-forward to it with:

The default login and password is set to admin.

On the above deployment and test we see around 3K predictions per second resulting in 6K Kafka messages per second.

Last updated

Was this helpful?