No description
  • Rust 75%
  • Go 23.8%
  • Shell 0.6%
  • Just 0.4%
  • Jinja 0.2%
Find a file
Alexander Bürger 5c544f017f
All checks were successful
ci/woodpecker/pr/yamlfmt Pipeline was successful
ci/woodpecker/pr/ansible-lint Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
resolve clippy complaint about superfluous into_iter()
2026-04-24 08:00:08 +02:00
.github integration_tests: remove localstack, change tests that use it to unit tests 2026-02-26 12:01:25 +01:00
.woodpecker .woodpecker: build and test migrations 2026-02-26 13:20:59 +01:00
ansible remove deleted qc_pipelines from ansible deploy play 2026-02-26 12:01:25 +01:00
db Revert "Add histogram calculation benchmarks" 2025-10-07 15:56:01 +02:00
docs docs: fix typos in INTEGRATION_TESTS.md 2025-03-28 11:02:37 +01:00
egress resolve clippy complaint about superfluous into_iter() 2026-04-24 08:00:08 +02:00
ingestion 2024 formating 2026-03-31 14:45:47 +02:00
integration_tests remove unnecessary unwrap, from Louise's suggestion 2026-04-20 09:59:44 +02:00
migrations Improve migrations/README.md 2025-10-20 09:25:47 +02:00
util util/auth: custom extractors for different types of roles 2026-04-18 13:34:24 +02:00
.gitignore Create bucket externally 2025-05-22 12:07:29 +02:00
.yamlfmt Move .yamlfmt to root dir 2025-03-12 14:08:22 +01:00
Cargo.lock move auth from egress to util 2026-04-18 11:43:21 +02:00
Cargo.toml clean up unused dependencies and upgrade to 2024 2026-03-31 14:45:47 +02:00
justfile integration_tests: remove localstack, change tests that use it to unit tests 2026-02-26 12:01:25 +01:00
LICENSE add license (MIT) 2025-08-11 12:57:35 +02:00
README.md docs: fix typos in README.md 2025-03-28 11:02:37 +01:00
rustfmt.toml move auth from egress to util 2026-04-18 11:43:21 +02:00

Lard (Live Atmospheric Readings Database)

An ingestion, storage, and delivery system for meteorological observations that delivery reliability and performance, while remaining simple to understand, operate, and maintain.

TODO: Banner image?

Status

Approaching beta, targeting summer 2025.

Architecture

Lard is built around a Postgres database with two services that interact with it, one focused on ingestion, and one providing an API to access the data.

Diagram of the architecture on a single node

This architecture lets it scale down to run on a single machine, while also scaling up to respond to high query volume:

Diagram of the architecture on a cluster of nodes

Here, one node takes responsiblity for ingestion, using Postgres replication to sync the others. Meanwhile, the others focus on serving read-only requests from the API service, allowing read throughput to scale linearly with the number of replicas. Replicas are also able to take over from the primary in case of outages, minimising downtime.

In addition to read throughput, previous experience with database systems at Met has taught us that as our dataset grows (think past 1 billion observations) write throughput begins to slow to a problematic degree. This happens because the indexes (structures needed to speed up queries on large tables) become resource intensive to maintain as they grow larger. Particularly the BTree indices we use to represent time need to remain balanced, but as we always add data on one side of the tree (the present is one extreme of the time range our dataset covers), we are constantly unbalancing it, and the expense of balancing a tree scales with its size.

We've gotten around this by partitioning the main data table in time, breaking up the indices, while still maintaining a single logical table from the perspective of the services.

Deeper dives into the architecture of the components:

Deployment

TODO: Publish container image?

At Met Norway we use these ansible playbooks to manage a VM based deployment on our local OpenStack. These are somewhat specific to our infrastructure, but can serve as a good starting point for your own playbooks.

Development

With Rust installed, compile the project with:

cargo build --workspace

We have integration tests that require a local postgres instance to run. To save having to maintain a local postgres, we provide a justfile that orchestrates setup and teardown in a container, and runs the tests with:

just test_all

This requires you to have Docker (or an equivalent substitute) installed