App Query Service

The Query Service provides materialised view objects for entities stored in the Obcerv Platform, and exposes additional query capabilities that are not directly supported by the Obcerv Platform.

The Query Service exposes a gRPC API which is not publicly exposed and only internally accessible by Obcerv apps.

Some apps require access to the Query Service to provide functionality.

Install with defaults

helm install obcerv-app-query-service itrs/obcerv-app-query-service \
     --version 1.9.0 -n <namespace> --wait

Install with overrides

The Query Service consists of three workloads, all of which are Kubernetes Deployments/ReplicaSets:

  1. Create a chart config file, named app.yaml containing content similar to:
bff:   
  threadPoolSize: 20
  resources: 
    requests: 
      memory: "512Mi"
      cpu: "200m"
    limits: 
      memory: "2Gi"
      cpu: "1"
sink:
   resources: 
    requests: 
      memory: "512Mi"
      cpu: "200m"
    limits: 
      memory: "3Gi"
      cpu: "2" 
db:
  resources: 
    requests: 
      memory: "4Gi"
      cpu: "1"
    limits: 
      memory: "8Gi"
      cpu: "4"
  1. To install the chart, run:
helm install -f app.yaml obcerv-app-query-service itrs/obcerv-app-query-service
  --version 1.9.0 -n <namespace> --wait

Storage

The Persistent Volume Claims (PVC) used by the Query Service are:

PVC Mount
app-query-service-data /data
app-query-service-wal /wal

The allocated storage can be changed by modifying the PVCs in Kubernetes, or the defaults can be overridden at install time by setting db.dataDiskSize and db.walDiskSize in the chart config file.

db:
  dataDiskSize: 20Gi
  walDiskSize: 5Gi

Resource allocation

The app deploys a query service and a database with the following default resource allocations:

bff:   
  threadPoolSize: 20
  resources: 
    requests: 
      memory: "512Mi"
      cpu: "200m"
    limits: 
      memory: "2Gi"
      cpu: "1"
db:
  resources: 
    requests: 
      memory: "4Gi"
      cpu: "1"
    limits: 
      memory: "8Gi"
      cpu: "4"

The following additional parameters are available:

Batch processing

The following additional parameters for sink are available:

  sink:
      batchSize: 1000
      queueSize: 100000
      attributeLookbackPeriod: P7D

Queue size

Since each queue has a different data source, the volume of data largely differs. You can separately configure queue size parameters for entities, attributes, and signals.

The following additional parameters for sink are available:

  sink:
    queue:
      entities: 100000
      attributes: 500000
      signals: 100000

Uninstall

To uninstall, run:

helm uninstall obcerv-app-query-service -n itrs

Upgrade

To upgrade the Query Service, first uninstall and then install it again.

None of the data stored in the Query Service is authorative, and the state is re-built from the Platform on re-install.

["Obcerv"] ["User Guide"]

Was this topic helpful?