Kubernetes
Last updated
Was this helpful?
Last updated
Was this helpful?
Metarank can be deployed in a distributed fashion inside a Kubernetes cluster.
For a distributed K8S deployment, metarank requires the following external services and tools to be already available:
Helm: used to install the Metarank chart.
Redis: as an almost-persistent data store for inference. Can be also installed either inside k8s with helm, or as a managed service like AWS ElastiCache Redis.
Distributed event bus for event ingestion: Kafka, Pulsar, Kinesis and internal RESTful API are supported.
Metarank supports multiple ways of ingesting training data into the system:
event can be imported from a Kafka/Pulsar/Kinesis topic or read from files locally. Note that distributed import is not yet supported.
We suggest to start with a HTTP-based event import, and switch to offline local import if you have any issues with it.
In the chart directory there are metarank.conf
and values.yaml
files you'll need to update before the deployment:
The metarank.conf
file requires you to define a Redis endpoint for state store. A good-looking config file is shown below:
The values.yaml
is a generic helm deployment configuration file. You can tune it, but default one usually requires no extra changes.
The default helm chart sets no specific memory requests & limits, but it can be configured with values.yaml
.
The Metarank docker container accepts a JAVA_OPTS
environment variable to control the JVM memory usage. It defaults to JAVA_OPTS="-Xmx1g -verbose:gc"
which means:
Use 1Gb for JVM heap. The actual RSS memory usage should be a bit higher due to JVM extra overhead.
Enable verbose GC logging. You may notice the following lines in the log, they are normal:
The chart itself is agnostic to the Metarank version, and has separate versioning. For the latest Metarank 0.7.9
release, use the following command to install the chart:
After that, a single metarank pod will be running:
After successful deployment you may want to do the following:
Enable ingress in values.yaml
so Metarank can be accessible from outside.
event file can be HTTT POSTed to the /feedback
endpoint using the . Metarank does not do any in-memory buffering, so if your dataset is below 1GiB in size, this may be the simplest way to ingest.
With Helm installed according to its official , you need to add a :
The metarank.conf
file is a regular metarank configuration file, so you can check to set things up manually, or use an automatic .
HTTP POST the training data to the .
Send your first reranking request according to the
Configure Kafka/Pulsar/Kinesis as .