Tidemark

Reference

Configuration keys

Tidemark reads its configuration from environment variables and nothing else. In Kubernetes they come from the Helm chart, helm/tidemark, and its values.yaml has a key for every decision an installation makes. The tables below are generated from that file when this site is built, so they say what the file says. The variables themselves are explained in docs/running.md in the repository. Which keys to set for which task is in Configuration.

An empty key sets no variable, and Tidemark’s own default applies. The chart refuses at install what Tidemark would refuse at start, and names the key to set: no store, two stores, no cluster name, no bootstrap servers. The HTTP port is fixed at 8080 (TIDEMARK_HTTP_PORT), so that the container, the probes and the Service cannot disagree.

The image and the cluster

Key and defaultWhat it does
image.repositoryregistry.gitlab.dataflow.academy/kafka/tidemark
image.tagempty
image.pullPolicyIfNotPresent
imagePullSecrets[]
For a private registry, e.g. - name: tidemark-registry
clusterNameempty
The cluster's name in manifest keys and metrics; in restore mode the lost cluster's. Empty: kafka.strimzi.clusterName.
principalempty
Tidemark's own principal, recorded in every manifest (acls.read_as) so that after a restore the page gives the new cluster's Tidemark its ACLs before the first release (#371). Empty: the SCRAM or PLAIN user name, or User:CN=<user> for a Strimzi KafkaUser with tls; set it for any other TLS certificate or OAuth.

Kafka

Beside Strimzi kafka.strimzi.clusterName is enough; otherwise the connection, TLS and authentication in the shape of Strimzi’s client authentication. kafka.config passes any other client property on as it is: client.dns.lookup: use_all_dns_ips becomes TIDEMARK_KAFKA_CLIENT_DNS_LOOKUP, which Tidemark hands to every Kafka client as client.dns.lookup.

Key and defaultWhat it does
kafka.strimzi.clusterNameempty
kafka.strimzi.listener.port9093
kafka.strimzi.listener.tlstrue
Beside Strimzi: the Kafka resource in this namespace. Set, the rest of kafka.* is not needed.
kafka.strimzi.kafkaUser.createtrue
false: use an existing KafkaUser of that name and its Secret.
kafka.strimzi.kafkaUser.nameempty
Empty: the release's name.
kafka.strimzi.kafkaUser.authenticationtls
tls or scram-sha-512, as the listener authenticates.
kafka.bootstrapServersempty
Without Strimzi: host:port,host:port.
kafka.tls.enabledfalse
kafka.tls.caCertificate{}
The brokers' CA as PEM, {secretName or configMapName, key}. Empty: the JVM's trust.
kafka.authentication{}
As Strimzi's client authentication: type: tls certificateAndKey: {secretName, certificate, key} type: scram-sha-512 username, passwordSecret: {secretName, password} type: scram-sha-256 the same type: plain the same
kafka.config{}
Further client properties under Kafka's own names, e.g. client.dns.lookup: use_all_dns_ips.

The store

Key and defaultWhat it does
storage.s3.bucketempty
storage.s3.endpointempty
storage.s3.regionempty
Exactly one of s3 or azure.
storage.s3.credentials{}
{secretName, accessKey, secretKey}. Empty: workload identity or the SDK's default chain.
storage.s3.workloadIdentity.roleArnempty
IRSA: the IAM role for the ServiceAccount.
storage.s3.caCertificate{}
The store's CA, if the JVM does not trust it: {secretName or configMapName, key}, plus type (PKCS12, JKS) and passwordKey for a keystore file.
storage.azure.containerempty
storage.azure.endpointempty
https://<account>.blob.core.windows.net
storage.azure.workloadIdentity.clientIdempty
The managed identity's client id; it annotates the chart's ServiceAccount.
storage.azure.workloadIdentity.podLabelfalse
Label the pod for the workload identity webhook without a client id here, for a ServiceAccount of your own that carries the annotation.
storage.azure.connectionString{}
{secretName, key} holding a connection string, instead of workload identity.
manifestRetentionDays7
How long the store's lifecycle rule keeps the manifests; the alerts warn before the restore point falls out of it.

The backup and the restore policy

Key and defaultWhat it does
backup.kannika.namespaceempty
Where Kannika's resources are. Empty: the release's namespace.
backup.kannika.storageempty
The Storage the backup writes to, and the Credentials with its keys; the location and the keys are read from them.
backup.kannika.credentialsempty
backup.kannika.credentialsSecrets[]
The Secrets those Credentials point at, for the Role.
backup.kannika.prefixempty
By hand, instead of or over what the Storage says. Empty fields fall back to storage.*.
backup.kannika.s3.bucketempty
backup.kannika.s3.endpointempty
backup.kannika.s3.regionempty
backup.kannika.s3.credentials{}
backup.kannika.s3.caCertificate{}
backup.kannika.azure.containerempty
backup.kannika.azure.endpointempty
backup.kannika.azure.connectionString{}
restorePolicy.configMaps[]
ConfigMaps whose keys are policy files; all are mounted into one directory.

Restore mode

Key and defaultWhat it does
restore.enabledfalse
The target of a restore: a release of its own.
restore.executefalse
Execute the page's commands where the principal has the rights, instead of showing them.
restore.kannika.createtrue
With execute, grant create on Kannika's restores, so that Tidemark creates the Restore resource on a click. false: the page offers it as a file to apply.
restore.kannika.resource.nameempty
restore.kannika.resource.storageempty
restore.kannika.resource.eventhubempty
restore.kannika.resource.serviceAccountempty
restore.kannika.resource.parallelismempty
restore.kannika.resource.maxProducersempty
restore.kannika.resource.labels{}
The fields of Kannika's Restore resource this installation fixes.

The round, the page and the log

Key and defaultWhat it does
ui.enabledtrue
log.levelINFO
log.kafkaLevelWARN
cadenceSeconds10
Seconds between rounds, so between restore points.
topicPrefix_tidemark.
Tidemark's own topics: the canary and the restore's state topic.
canary.topics.inempty
canary.topics.outempty
A topic named in full instead of following the prefix; empty: <prefix>canary.in, canary.out and restore.
stateTopicempty

Metrics and the pod

Key and defaultWhat it does
metrics.serviceMonitor.enabledfalse
metrics.serviceMonitor.interval30s
metrics.serviceMonitor.labels{}
metrics.prometheusRule.enabledfalse
metrics.prometheusRule.labels{}
metrics.dashboard.enabledfalse
metrics.dashboard.labels.grafana_dashboard1
metrics.dashboard.annotations{}
A ConfigMap for Grafana's sidecar.
rbac.createtrue
The chart's Roles: Strimzi's KafkaTopics and KafkaUsers, Kannika's resources.
serviceAccount.createtrue
serviceAccount.nameempty
serviceAccount.annotations{}
resources.requests.cpu100m
resources.requests.memory512Mi
resources.limits.memory1Gi
Placeholders until #37 has measured numbers.
podSecurityContext.runAsNonRoottrue
podSecurityContext.runAsUser1001
The pod runs as a user, never as root.
securityContext.allowPrivilegeEscalationfalse
securityContext.readOnlyRootFilesystemtrue
securityContext.capabilities.drop["ALL"]
The container: no privilege escalation, a read-only root file system, no capabilities. Tidemark writes nothing to disk.
commonLabels{}
On every resource and the pod.
nodeSelector{}
tolerations[]
affinity{}
priorityClassNameempty
podLabels{}
podAnnotations{}
extraEnvs[]
extraVolumes[]
extraVolumeMounts[]

Outside Kubernetes

Two variables are for running Tidemark on a laptop and have no key in the chart:

Variable What it does

TIDEMARK_MANIFEST_DIR

Writes manifests into this directory instead of an object store. Nothing outside the machine can read it, so it is no place for a backup’s restore points.

TIDEMARK_MANIFEST_COMPRESS

true by default. false writes .json instead of .json.gz, so cat can read a manifest. Readers handle both.

Two variables of the AWS SDK, not Tidemark’s, matter for some S3-compatible stores; in the chart they go into extraEnvs:

Variable What it does

AWS_REQUEST_CHECKSUM_CALCULATION

when_required makes the SDK send a PutObject body as it is, without the aws-chunked checksum trailer that some stores reject with a 403 on every write.

AWS_RESPONSE_CHECKSUM_VALIDATION

when_required does the same for what the store sends back.

Metrics

/metrics serves the Prometheus text format on TIDEMARK_HTTP_PORT. Every series carries a cluster label with TIDEMARK_CLUSTER_NAME, so one Prometheus can watch several Tidemarks.

The series to alert on is tidemark_restore_point_age_seconds{class="clean"}: how far back a restore would go right now. The chart’s alerts (metrics.prometheusRule) are on it, and the dashboard helm/tidemark/files/dashboard.json puts it at the top.

Restore point and manifests

Series Meaning

tidemark_restore_point_age_seconds{class}

Age of the newest written manifest the backup covers: the recovery point. class="clean" counts only clean and atomic manifests, the ones a restore takes without an override; class="any" counts all. Needs a coverage provider. Absent while no manifest is covered.

tidemark_restore_point_unknown{class}

1 after a start, until the stored manifests have been judged again. While it is 1, an absent restore point means "not known yet", not "none".

tidemark_manifest_age_seconds{class}

Age of the newest manifest written to the store, by the same classes. Says that Tidemark is alive and cutting; says nothing about the backup.

tidemark_manifest_retention_seconds

TIDEMARK_MANIFEST_RETENTION_DAYS in seconds. Declared, not observed; the alerts compare against it.

tidemark_manifests_written_total{class}

Manifests confirmed written to the store.

tidemark_manifest_bytes

Histogram of the compressed size of a written manifest.

tidemark_manifest_atomic

1 when the last manifest’s cut provably splits no transaction, 0 when it does or cannot tell, absent when transactions could not be checked.

The cut and the canary

Series Meaning

tidemark_cut_margin_seconds{leg}

The canary floor minus the widest partition interval of the last manifest. leg="chain" is the health claim and has to stay above zero. leg="produce" is recorded and routinely negative.

tidemark_cut_headroom_ratio

The chain floor divided by the width of the last cut. Above 1, every partition is inside the yardstick.

tidemark_cut_width_seconds

Histogram of how wide each completed cut came out.

tidemark_canary_seconds{leg}

Histogram of canary round trips. leg="chain" is produce to visible through both canary topics; leg="produce" is the acknowledgement alone.

tidemark_canary_floor_seconds{leg}, tidemark_canary_ceiling_seconds{leg}

Fastest and slowest canary round trip since the last manifest. The gap between them is the spread across brokers.

tidemark_canary_probes_total{outcome}, tidemark_canary_probe_errors_total{error}

Probes by outcome, and failed probes by the exception the client reported.

tidemark_canary_last_success_age_seconds

Time since a probe last measured something. Climbing means every manifest is graded wide.

tidemark_canary_topics_missing

Canary topics that do not exist. Above zero, no floor is measured.

tidemark_canary_replicas{topic}, tidemark_canary_in_sync_replicas{topic}

Replicas and in-sync replicas of each canary topic, fewest across its partitions.

Rounds

Series Meaning

tidemark_rounds_total{outcome}

Rounds by outcome. complete and incomplete each published a manifest; retried ran out of time at its rung and ran again at the next, without a manifest.

tidemark_deadline_seconds

How long the last round was allowed to take. Above the shortest rung, rounds are being retried with more time.

tidemark_partitions_in_round

Partitions the last round asked about.

tidemark_partitions_by_health{health}

Partitions of the last manifest by health, clean or wide.

tidemark_partitions_missing

Partitions the last manifest expected and did not get. Above zero, the manifest is not clean.

tidemark_undecided_records{topic}

High watermark minus cut, summed per topic: committed records held back by an open transaction. A backup tool’s own lag metric reads zero here.

Which partition holds a topic back is on the page, in the manifest’s partition table.

Transactions and consumer offsets

Series Meaning

tidemark_transaction_view_caught_up

1 once __transaction_state has been read to the end. No manifest is atomic before that.

tidemark_transactions_split

Transactions the last cut provably fell through.

tidemark_transactions_undecided, tidemark_transactions_undecided_partitions

Transactions and partitions whose side of the cut the round could not tell. Either makes the manifest not atomic.

tidemark_transactions_offset_commits_in_flight

Transactions that committed during the round with consumer offsets, so a group may stand past records the cut does not hold.

tidemark_transactions_open

Partitions whose cut is held at the first offset of an open transaction.

tidemark_offsets_view_caught_up, tidemark_offsets_view_lag_records

Whether, and by how many records, the view of __consumer_offsets is behind. No manifest is written before it has caught up.

tidemark_offsets_view_pinned_records

Undecided records on __consumer_offsets: an open transactional offset commit holds back the groups on that partition.

tidemark_consumer_groups_tracked

Consumer groups in the view.

tidemark_group_offsets_above_cut

Group partitions whose committed offset is beyond the cut: a read_uncommitted consumer or an offset reset forward.

tidemark_offsets_records_skipped_total{reason,version}

Records on __consumer_offsets with a version this build does not know. Not zero means the broker is newer than Tidemark’s Kafka client.

Backup coverage

These need TIDEMARK_COVERAGE_PROVIDER=kannika.

Series Meaning

tidemark_coverage_refresh_age_seconds

Time since the backup’s index was last read completely.

tidemark_coverage_partitions{reason}

Partitions of the newest manifest by what the backup holds of them: covered, covered-at-marker, short, not-backed-up, unread.

tidemark_coverage_pending_manifests{class}

Written manifests newer than the restore point, kept to be judged again.

tidemark_coverage_index_reads_total{outcome}

Reads of the index per topic: full, appended, unchanged, absent, failed.

tidemark_coverage_index_failing_topics{state}, tidemark_coverage_index_failing_seconds

Topics whose index could not be read on the last refresh, and how long the longest of them has failed.

tidemark_cut_topics_not_backed_up, tidemark_cut_topics_unread

Topics in the cut the backup holds nothing of, and topics whose index was not read yet.

Which topics and partitions the backup does not cover, and how many offsets they are short, is on the page under Restore readiness.

Restore readiness, store and clock

Series Meaning

tidemark_excluded_topics

Topics the restore policy (backup: exclude) or the topic prefix leave out of the newest manifest’s cut.

tidemark_groups_without_offsets

Groups an ACL names that have no offsets in the newest manifest. A restore starts them at their auto.offset.reset.

tidemark_store_writes_total{outcome}

Writes to the manifest store by outcome.

tidemark_store_buffer_depth

Manifests waiting for the store. They are not restore points yet.

tidemark_store_failing_seconds

How long the store has not taken a manifest. 0 while writes succeed.

tidemark_store_dropped_total

Manifests dropped because the buffer was full.

tidemark_wall_clock_jumps_total{direction}, tidemark_wall_clock_last_jump_seconds, tidemark_wall_clock_step_seconds

Steps of the wall clock of a second or more, the size of the last one, and how far the wall clock stands from the clock manifests are filed under.

tidemark_restore_state_ready

Restore mode only: 1 once the state topic has been read back.

Alerts

The chart’s metrics.prometheusRule needs the Prometheus Operator and a coverage provider.

Alert Severity Fires when

TidemarkRestorePointAging

warning

the clean restore point is older than half the manifest retention, for 15 minutes

TidemarkRestorePointNearRetention

critical

it is older than four fifths of the retention, for 5 minutes

TidemarkNoRestorePoint

critical

Tidemark has judged the stored manifests and none is covered, for 15 minutes

HTTP endpoints

All on TIDEMARK_HTTP_PORT. Without that variable there is no HTTP server at all.

Path Answers

/live

200 while the process answers. The liveness and startup probe.

/ready

200 once the consumer offsets view has caught up; 503 with the reason before that, also while the cluster does not answer at start. The readiness probe. It routes nothing: the Service publishes the pod while it is not ready.

/health

200 when a round was published and a manifest confirmed in the store within the last three cadences; 503 with the reason otherwise. Point monitoring here, not at the probes.

/metrics

The series above, in the Prometheus text format.

With TIDEMARK_UI=true, and always in restore mode, the page and what it reads:

Path Answers

/

The page.

/api/capabilities

What this service offers the page.

/api/status

The newest round, the store and its buffer, the canary, the coverage provider’s last result and the runtime checks. Uncovered partitions are counted per topic, not listed. From memory.

/api/rounds

The recent rounds. From memory.

/api/manifest?key=…

One manifest from the store, under this cluster’s prefix.

/api/coverage-verdict?key=…

The coverage verdict stored beside that manifest; 404 when it has none.

/api/partitions/uncovered

With a coverage provider: every partition of the newest written manifest the backup does not cover or has not read, by topic, without a cap. /api/status carries only the counts and this path. From memory.

/api/restore/…

Restore mode only: what the guided restore reads from the target and the store, and the decisions it records. They exist for the page; During the disaster uses them.

The manifest

One JSON object per round, gzip-compressed, at

tidemark/<cluster>/manifests/<yyyy-MM-dd-HH-mm-ss-SSS>-round-<n>.json.gz

The stamp is UTC and fixed-width, so the newest manifest is the last key of a listing. Coverage verdicts go beside the manifests, under tidemark/<cluster>/coverage/.

A restore needs this one file and no running Tidemark. Offsets are exclusive everywhere, and maps by partition are keyed by the partition number as a string. The fields an operator reads:

Field Meaning

format_version

1. A reader refuses a version it does not know.

send_wall_clock_millis

When the round went out. For humans; nothing orders manifests by it.

clean

Every partition clean and none missing.

complete

No partition missing.

atomic

No transaction split by the cut, proven. A restore takes a manifest that is clean, complete and atomic unless a human chooses otherwise.

cut.<topic>.<partition>.first_excluded_offset

Restore every record strictly below this offset.

cut.<topic>.<partition>.health, interval_nanos

The partition’s own measured interval, and whether it was below the canary chain floor (clean) or not (wide).

cut_width_nanos

The widest partition interval: how much time the cut spans at worst.

canary_chain_floor_nanos

The fastest canary chain the partitions were judged against.

deadline_tier

Which rung of the deadline ladder the round settled on. 0 is the tightest.

missing_partitions

Partitions the round could not place, with the reason for each.

consumer_offsets

Group, topic, partition: the offset the group had committed, in the original cluster’s numbering.

consumer_offsets_beyond_cut, consumer_offsets_below_log_start

Groups a restore cannot set as they are: beyond the cut, or below the log start. Reported for a human, never clamped.

transactions

checked, and the transactions under split and undecided and the partitions under undecided_partitions that make the manifest not atomic.

high_watermarks, log_start_offsets

Beside the cut, for diagnosis. A high watermark that stays above the cut is an open or abandoned transaction.

topics, acls, brokers

Every topic’s definition (partitions, replication factor, configuration; excluded for topics left out of the cut), the ACL bindings, and the brokers. What a restore rebuilds the cluster from.

topic_ids

The topic IDs of this incarnation of the cluster.

Glossary

Term Meaning

manifest

What a round writes: the cut per partition, the group offsets, the topic definitions and ACLs, and how good the cut is.

cut, first_excluded_offset

Per partition, the first offset that no longer belongs to the restore point. Everything below it does.

consistent cut

A cut with no effect inside it whose cause is outside. A cause without its effect is harmless: the application redoes it.

round

One pass of Tidemark: read groups, transactions and offsets, judge the cut, write a manifest. Every TIDEMARK_CADENCE_SECONDS.

canary

Tidemark’s own probe: a record written to the canary-in topic, read back, written to canary-out, and timed until it is visible there.

chain floor

The fastest canary chain in the window, shown as Baseline on the page. The yardstick for every partition: no real application chain is faster.

cut width

The widest partition interval in a cut. Width on the page.

headroom

The chain floor divided by the cut width. Above 1, the cut is narrower than any chain.

clean / wide

A partition whose interval was below the chain floor / reached it. A wide partition may hold an effect without its cause.

complete / incomplete

Every partition placed / some missing, with the reason.

atomic

No transaction is split by the cut, proven.

tx undecided

A transaction whose side of the cut the round could not tell.

holding the cut

An open transaction keeps the cut on that partition at its first offset.

deadline tier

The rung of the deadline ladder a round settled on. 0 is the tightest and the healthy case.

Last Stable Offset

The offset below which every transaction on a partition is decided. The cut sits on it, because a backup reading read_committed cannot reach past it.

coverage

Whether the backup holds every record below a manifest’s cut. Tidemark reads it from Kannika’s index.

restore point

A manifest a restore can start from. The Restore point tile on the page shows the newest one the store has confirmed.

recovery point

The newest written manifest the backup also covers, tidemark_restore_point_age_seconds. "Backed up, clean" on the page is the newest clean, atomic one.

backup lagging

The newest manifest is not covered by the backup yet.

cut − 1

On the page, the target of a partition that probably ends on a commit marker. A marker is no record and is not restored, so the partition counts as restored one offset below its cut.

excluded topic

A topic the restore policy says backup: exclude for, or one under the topic prefix: not in the cut, not backed up, recreated empty by a restore.

incarnation

One life of a cluster, told apart by its topic IDs. A restored cluster is a new incarnation and writes to a new prefix.

restore mode

TIDEMARK_MODE=restore: Tidemark on the target of a restore, leading the guided restore. It writes no manifests.

state topic

<prefix>restore, _tidemark.restore by default: the log of every decision a restore takes, on the target.

restore check

The guided restore’s verdict on a candidate manifest: passes, with warnings, falls short, or unknown.

newest that passes

The newest candidate that passes every check.

kannika-original-offset

The header Kannika gives every restored record, holding its offset in the original cluster.

release

The decision that an application may reach the target. Its ACLs follow.

ok / warn / fail / note

On the page: met / read the hint / blocked or violated / for information only.