Skip to content

DB Optimizer ​

DB Optimizer extends obolIQ's cost visibility from Kubernetes compute into the managed data stores your workloads depend on — Amazon RDS (MySQL, PostgreSQL) and Amazon ElastiCache (Redis, Valkey).

What it does ​

Two independent evidence streams feed the panel:

  1. Infrastructure metrics read from Amazon CloudWatch, and the instance inventory from the RDS and ElastiCache APIs. These calls must run with credentials in your AWS account, so who makes them depends on where obolIQ runs (see Where AWS is called from).
  2. Query telemetry (optional) captured by the eBPF agent, correlating database queries with the workloads that issued them.

Where AWS is called from ​

DeploymentDiscovery and CloudWatchStatus
Self-hosted / Private Cloud — oboliq-core runs in your AWS accountoboliq-core, with its IRSA role and the policy in SetupAvailable
obolIQ Cloud — oboliq-core runs in obolIQ's accountThe obolIQ agent in your cluster, with an IAM role you grant itNot available yet

obolIQ Cloud never calls AWS on your behalf. Its server runs in obolIQ's own AWS account, where an RDS or CloudWatch call would describe the wrong account's databases, so the console says so instead of attempting discovery. Collection from your account by the agent is the planned path; until it ships, query capture (below) works on obolIQ Cloud today, because the eBPF agent needs no AWS access.

Together they produce recommendations that neither stream can give alone: a specific query fingerprint issued by a named workload, matched to the CPU, connection and cache pressure it causes on a named database instance.

Architecture ​

┌─────────────────┐     CloudWatch      ┌───────────────────┐
│  Amazon RDS     │◄────GetMetricData───│  obolIQ server │
│  Amazon         │                     │  (IAM role)       │
│  ElastiCache    │                     └───────────────────┘
└─────────────────┘                               ▲
                                                  │
┌─────────────────┐   query fingerprints          │
│  eBPF agent     │───(relayed by oboliq-agent)┘
│  (optional)     │
└─────────────────┘

The diagram is the self-hosted layout, where the obolIQ server runs in your account.

Key points:

  • Self-hosted: CloudWatch is scraped by the obolIQ server, with its own IAM role. No agent-side configuration needed.
  • obolIQ Cloud: core makes no AWS call for discovery or metrics (DB_OPTIMIZER_AWS_SOURCE=agent).
  • The eBPF agent adds optional query capture for the correlation layer.
  • Only registered instances are polled — you control CloudWatch API cost directly.
  • Metrics are kept for 15 days, the same as raw node and pod metrics.

Monitoring depth ​

Each registered instance has a monitoring depth setting:

DepthWhat it providesRequires
CloudWatch OnlyCPU, memory, connections, IOPS, storage, replicationIAM permissions on core
CloudWatch + Query CaptureAll above + query fingerprints, execution counts, per-query latencyIAM, plus every precondition below — and one extra setting for TLS-encrypted databases

Query capture preconditions ​

A default install of the oboliq-ebpf-agent chart (0.2.0 or later) meets the agent-side ones: query capture is on in fingerprint mode for every namespace except Kubernetes' own, and so is the TLS path described below. All of these must hold. Miss one and capture produces nothing — in most cases silently.

  • dbCapture.mode: fingerprint (or full) on the eBPF agent, which is the default. off loads no query program at all, and turns the TLS path off with it.
  • The calling pod's namespace in scope. dbCapture.namespaces defaults to *, every namespace except those in dbCapture.excludeNamespaces (kube-system, kube-public, kube-node-lease). A list of names narrows it; an empty value captures nothing.
  • A oboliq-agent with relay query forwarding, in the default relay mode. Query batches ride each flow window to the oboliq-agent, which forwards them to the ingest endpoint with its own key, so the eBPF DaemonSet still holds no key. Against an older oboliq-agent the eBPF agent logs that it is discarding query statistics and counts them. mode: direct also works and sends them straight to the ingest endpoint.
  • POSTGRES_DSN configured on core. Without it the query ingest RPC is not registered, so there is nothing to upload to.

Encrypted databases need one more setting ​

The preconditions above enable capture from the wire, which works only on unencrypted connections. If your database enforces TLS — rds.force_ssl=1, or ElastiCache with in-transit encryption — the wire carries ciphertext and those settings produce no statements no matter how correct they are.

Those need the uprobe path, which the chart turns on by default:

  • dbUprobe.mode: capture (DB_UPROBE_MODE=capture), with CAP_SYS_PTRACE and hostPID. The chart adds the capability whenever this mode is not off. It reads the statement inside the client process, before it is encrypted. Without the capability the scan sees roughly 7% of the node and none of your application containers, which looks like "no databases here" rather than a misconfiguration. Set dbUprobe.mode: off to drop both the path and the capability; wire capture keeps working for plaintext databases.

Check it attached with kubectl -n oboliq logs -l app.kubernetes.io/name=oboliq-ebpf-agent --tail=-1 | grep -c "uprobe attached". The total across all pods should be above 0; a 0 on one pod is normal for a node running no Go database client.

What it covers today: Go clients on amd64 nodes. Other runtimes need an OpenSSL-level probe that is not built yet, and on arm64 (Graviton) the path is compiled out. Java is not addressable this way at all.

What it adds beyond statements: per-query latency on encrypted connections.

EngineHow latency is measuredCoverage
PostgreSQL (pgx, database/sql)the client library call enclosing the query is timed end to end, so connection-pool wait is includedall executions
Redis / ElastiCache (go-redis)the encrypted write is paired with the read that answers itmost executions

Redis coverage is partial by design. A client can pipeline several commands into one write, and the round trip that returns cannot be attributed to any single one of them — so no per-command latency is recorded for those, rather than a divided or duplicated guess. The console shows the percentage of executions a latency average covers whenever it is not all of them.

Next steps ​

Every figure in obolIQ traces to a real cloud price. Where we cannot measure something, we say so.