Skip to main content
This page outlines best practices for using Galexie to build a data lake with the complete history of ledger metadata.

Why Full History Export?

Exporting the full history of Stellar ledger metadata provides a complete data lake of everything that has occurred on-chain. This makes it easy and fast to retrieve data at any point in the network’s history. This enables:
  • Analytics - run historical trend analysis with stellar-etl
  • Full History RPC - data lake backend supplying ledger metadata to RPC instances to enable full history data access
  • Real-Time Data - access to real-time data on top of the full historical data access

Costs and Storage Requirements

The estimates are based on GCP Compute Engine and Google Cloud Storage costs
  • Total Cost ~= $1,100 USD
    • Compute Costs ~= $500 USD
    • GCS Class A Operations (writes) Costs ~= $600 USD
  • Total Storage Size ~= 3 TB

Export Strategy

The best way to export full history with Galexie is by running multiple individual instances of Galexie in parallel. For reference, it is estimated to take approximately 150 days to export full history using a single Galexie instance. Running in parallel with 40-50 Galexie instances takes roughly 4-5 days.
  1. Make sure you have set up a storage system and have appropriate hardware available as defined in the Galexie Prerequisites
  2. Determine how many parallel instances of Galexie that you’d want to run
  3. Remember to pass non-overlapping ledger ranges to each of your Galexie instances
Note that earlier ledgers in history are smaller and export faster than newer, more recent ledgers. This performance difference becomes apparent around ledger 30,000,000. Because of this performance difference, it is generally better to allocate more Galexie instances for more recent ledgers.

How this Looks in Practice

Let’s say there are 50,000,000 ledgers that Galexie needs to export.
  • For 50 instances, this split could look like:
    • 15 instances to process genesis to 29,999,999
    • 35 instances to process 30,000,000 to 50,000,000
Each instance will follow the same Running Galexie instructions
Where your first instance would run
The second would run
and so on

Methods for Running Multiple Galexie Instances

There are different ways to start up multiple Galexie instances that can vary depending on your cloud provider or local hardware.

GCP Batch

Within GCP you can use Batch that accepts a job JSON or YAML file that can parameterize the start and end ledger ranges for each Galexie instance Example GCP Batch job YAML

GCP Compute Instances

You can spin up multiple individual compute instances manually Example GCP Compute Instance
Then create the instance by running the following gcloud command
Repeat process for as many parallel instances of galexie as desired

Local Galexie Instances

You can run multiple Galexie instances locally with a locally built Galexie executable