Skip to content

Check xtdb indexing in healthcheck endpoint? #100

Description

@peter-wilkins

We are using ECS and during deployments the load balancers are switched before site is functional.
We suspect it is due to xtdb indexing.
Would it be useful to check if xtdb lag is within a threshold in wrap-healthcheck?

(defn xtdb-tx-lag []
  (let [node (xtdb-node)
        tx-id (fn [tx] (get tx ::xt/tx-id 0))]
    (- (tx-id (xt/latest-submitted-tx node))
       (tx-id (xt/latest-completed-tx node)))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions