Marfle Australia Region: Local Infrastructure for Australian Customers

Juha Männikkö

5 mins

Background

Marfle has deployed a dedicated regional infrastructure cluster in Australia to serve Australian customers. The primary driver for this work was a contractual requirement from the Port Authority of New South Wales that all vessel data be stored locally within Australian jurisdiction. Beyond compliance, the deployment provides lower latency for Australian-based users and lays the foundation for serving additional customers in the region.

Infrastructure

The Australian cluster runs on Google Cloud Platform in the australia-southeast1 (Sydney) region. A dedicated Google Kubernetes Engine (GKE) cluster hosts application workloads, and a regional PostgreSQL database instance stores vessel operational data. All data at rest, backups, and disk snapshots are stored within the Australian region.

The following services are deployed in the Australian cluster:

Database Architecture

To support multiple regions without duplicating the entire database, the platform was restructured into a sharded architecture with a central metadata database and regional data shards.

The central database holds user accounts, vessel configurations, customer definitions, motor models, sensor configurations, warning thresholds, and other reference data — roughly 44 tables shared across all regions. This database is the single source of truth for administrative and configuration data.

Regional shard databases hold high-volume operational data: vessel telemetry (vessel_data_maintrips, logbook entries, fuel tank readings, motion profiles, engine economy metrics, battery data, and similar time-series and event tables — roughly 57 tables per shard. Each shard stores only the data belonging to customers assigned to that region.

Customer-to-shard assignment is tracked in the customers table via a datashard column. When a customer is assigned to the Australian shard, all their vessel data is written to and read from the Australian database exclusively.

Data Replication

Central metadata is replicated to each regional shard using PostgreSQL logical replication. A publication on the central database streams changes to subscriptions on each shard. This means that each shard has a local read replica of the reference data it needs (vessel definitions, user accounts, motor configurations) without requiring cross-region queries at request time.

For write operations that modify central data (e.g., updating vessel configuration), the application writes to the central database, then waits for replication to propagate the change to the relevant shard before confirming the operation with the user. This is handled by a waitShardSync mechanism that polls the shard's replication lag against the central WAL position.

Application-Level Data Routing

All application services were modified to be shard-aware:

This routing is implemented using an AsyncLocalStorage-based context that propagates the shard selection through the call stack without requiring explicit parameters at every level.

Database Optimisation

As part of preparing the database for sharding, several structural changes were made:

Deployment

The deployment pipeline was extended to support multi-cluster operations. A single deployment run can target the EU cluster, the Australian cluster, or both. Each cluster deployment includes:

  1. Pre-deployment disk snapshots (stored in the respective region)
  2. Database migrations on the central and each shard
  3. Container image rollout to the regional GKE cluster
  4. Configuration updates via Helm values specific to each region

The CI/CD workflow authenticates against both GKE clusters and applies Kubernetes manifests through a unified Helm chart with per-region value overrides.

End-to-End Testing

The test infrastructure was updated to validate sharded operation. The end-to-end test suite provisions a local central database and at least two shard databases, verifies that shard isolation is enforced (shard databases cannot write to central tables), and tests data routing for consumers, web requests, and background tasks across shards.

Benefits for Australian Customers

Current Status

The infrastructure, database sharding, application routing, and deployment automation have been implemented and are operational in the development environment. The architecture is designed to extend to production deployment and to accommodate additional regional shards in the future.


About the author

Juha Männikkö

With over 24 years of experience in software development and engineering leadership, Juha has built and led high-performing, cross-functional teams across different industries. Juha Männikkö, Marfle’s Chief Technology Officer, leads the technological heart of our operations, ensuring we deliver meaningful results for our customers.

Keep reading

  1. Kai Lebens (Guest Author)

    Tenggara Explorer Adopts Marfle to Modernise Vessel Monitoring

    By centralising maintenance, compliance, and performance data into a single, real-time system, Tenggara Explorer operates more efficiently, compliantly, and with full transparency throughout every charter. Learn more about this successful partnership here.

  2. Marfle, Flinders Port Holdings & Hart Marine Teams

    Marfle, Flinders Port Holdings, and Hart Marine Mark Two Years of Partnership Powering Smarter Pilotage in Australia

    Over the past two years, Marfle, Flinders Port Holdings, and Hart Marine have joined forces and are making pilotage in Australia safer, smarter and more reliable. Read all about it here.

  3. Farooq Al-Obaidi

    Harwich Haven Authority Fleet Integrates Marfle System

    Harwich Haven Authority now uses Marfle’s fleet management system for insights into fuel use, emissions, and maintenance. Marine Engineering Manager Matthew Pearson shares its impact on efficiency, downtime, and sustainability. Read more!