Apache Fineract high availability

Apache Fineract high availability depends on splitting write, read and batch workloads, replicating PostgreSQL and keeping the Close of Business job recoverable. This page covers the decisions, build sequence, effort drivers and checks for a self-hosted deployment.

On this page

Why Apache Fineract high availability needs a deliberate design

A bank or lender that runs Apache Fineract as its core system needs two things at once: customer-facing transactions during business hours and a nightly batch cycle that finishes in time for the next morning. Fineract does not give you that by default. It is a headless application that exposes REST APIs and leaves the user interface to others, and its README states that PostgreSQL is the recommended database. The same README warns that a production deployment can be complex, costly and time-consuming, and that the project does not provide a comprehensive production deployment guide. The availability design therefore has to be worked out by your team or a partner, and written down before go-live.

Several features make uptime harder than it looks. The documentation recommends one write instance, one batch instance and multiple read instances, so a single write node remains a point of concern unless failover is planned for it. The Close of Business Day Spring Batch job can run for several hours on deployments with millions of accounts, which means the nightly window depends on batch capacity, not only on web traffic. Liquibase migrations run only on write instances, so every upgrade needs a sequence that keeps the write path and the batch path consistent. Multi-tenant setups add a tenants database and per-tenant connections, so a fault or a slow tenant can affect more than one institution. Confirm each of these against the Fineract documentation for the version you plan to run, starting with the Fineract platform documentation.

None of these choices is made by one setting. Whether a node is a read, write or batch instance is set through environment variables, but the outcome depends on the database topology, replication lag, load balancer rules, how batch partitions are assigned, how secrets and HTTPS are handled, and how maintenance windows are scheduled. Ask your team to document the intended behavior of each component, including what happens to in-flight requests and the batch job during a database failover. A useful first exercise is to write down the target business hours, the nightly completion deadline, and the recovery time and data loss your business owners accept, then test whether the design meets them. Those answers drive every later decision in this topic.

Which Fineract components carry availability

A Fineract deployment is several processes sharing one database and one message layer. Each component below has a different role in uptime, so an outage in one can look like a problem in another. Know what each part does before you decide how many instances to run and where to place them.

Write instances

Write instances handle every create, update and posting request from the API, so they are the path for all customer and ledger changes. Fineract documentation sets the instance type through environment variables and recommends one write instance for high load. Liquibase database migrations also run only on write instances, so a write instance that fails during an upgrade can block the whole platform. Check how your load balancer routes write traffic and how quickly you can restart or replace the node.

Recommended write instance
1
Fineract docs

Batch instances

Batch instances run scheduled work, including the Close of Business Day job that closes out each business day. If the batch instance is down, nightly processing stops and the next business day can open with stale balances or unposted accruals. The documentation recommends one batch instance, so plan for a fast restart and a documented manual run procedure. Confirm which instance hosts the scheduler and that it cannot start twice.

Recommended batch instance
1

Read instances

Read instances serve queries such as account lookups, statements and reports, which keeps that load away from the write path. The documentation recommends several read instances connected to database read replicas when load is high. Reads can be served while writes continue, but replicas can lag behind the primary, so a customer may briefly see an old balance. Test how your channels and reports behave during lag and decide which screens must always read from the primary.

Fineract docs

PostgreSQL primary and replicas

PostgreSQL is the recommended database for Fineract, and the primary holds the ledger, loan and savings data that every instance depends on. Read replicas take read load but do not replace the primary for writes, so losing the primary stops posting even when read instances stay up. Choose a replication and failover design with your database team, and document the recovery point and recovery time you can meet. Ask your DBA to rehearse failover against a Fineract test environment, not only against a generic database.

FSIP-9 proposal

Tenants database

In a multi-tenant setup, Fineract reads tenant connection details from a separate tenants database, and API requests identify the institution with the Fineract-Platform-TenantId header. If this database is unavailable, requests for tenants may fail to resolve their connections, even when the tenant databases are healthy. Treat it as a critical dependency, include it in backup and failover planning, and confirm how each instance caches tenant configuration after a restart.

Message broker for partitioning and events

ActiveMQ or Kafka serves two roles: coordinating remote partitioning of the Close of Business job across worker nodes, and carrying external business events such as ClientCreated to downstream systems. Event publishing is disabled by default, so confirm whether your deployment enables it before you count it as a dependency. If the broker is down, batch workers may stall and downstream consumers miss events, so plan replay and monitoring. Confirm with your platform team how the broker is clustered and monitored.

How requests and batch work flow through a Fineract topology

The diagram starts at the load balancer, which sits on the public edge and sends client and staff API traffic to read instances. Reads go to instances connected to database read replicas, while writes go to the write instance on the primary database. The batch instance hands Close of Business work to remote partition workers through a broker, and all of them reach the database inside the internal tier. Check that writes never reach a replica, that only one instance runs Liquibase migrations, and that the broker and database sit behind the application tier boundary. This is a reference topology, not a sizing guide.

Reference topology showing request routing and batch flow across trust boundaries.

Which topology fits your uptime and operating model

This table compares four Fineract topologies, from a single node with a backup database to a remote-partitioned batch design. Read each row against your uptime target, your team's operating capacity and how many services you can monitor and patch. The main takeaway is that every step up in resilience adds moving parts that must be operated, not just deployed.

TopologyWhen it fitsOperations cost
Single node with backup databaseLow transaction volume, small account base, and a business that can tolerate a planned outage while a database is restoredManual restore from backup, a recovery runbook that is rarely rehearsed, and downtime during failover or rebuild
One write instance with standby databaseModerate volume where a quick database failover matters more than read scaling, and the team can run a tested promotion procedureFailover steps for the database and application pointers, replication lag checks, and confirming the write instance restarts cleanly after promotion
Write, batch and multiple read instances on replicasHigh load with heavy reporting or teller and portal reads, and a team that can run several instance types and replicasMore instances to patch and monitor, replication lag handling for read consumers, and a load balancer that must route by instance role
Remote-partitioned batch with worker nodesDeployments with millions of accounts where Close of Business runs for hours and must finish within a fixed windowBroker maintenance for ActiveMQ or Kafka, worker health checks, partition failure recovery and monitoring of job progress

How to build the Fineract high availability setup in sequence

This sequence takes a Fineract deployment from a database cluster to a load-balanced set of write, read and batch instances, with tenant routing, partitioned Close of Business processing and runbooks. Each step closes with a check so the team knows it can move on.

  1. Provision PostgreSQL primary and replicas

    The infrastructure or database team builds a PostgreSQL primary with one or more streaming replicas, using the PostgreSQL version and replication method your organization has approved. PostgreSQL is the recommended database for Fineract, so this is the foundation for every later step. Confirm replication health by checking that each replica is connected to the primary, that replication lag is within your agreed threshold, and that a test write on the primary appears on every replica. Do not point any Fineract instance at this cluster until those checks pass.

  2. Deploy and migrate the write instance first

    Deploy one write instance pointed at the primary and let it run the Liquibase migrations, since migrations run only on write instances. On Kubernetes, you can instead run a separate job with the liquibase-only Spring profile, then start the write instance. No other Fineract instance should start until the schema is current. The check is a completed migration log with no failed changesets, and a successful authenticated API call to the write instance that returns the expected tenant data.

  3. Deploy read instances against replicas

    Start the read instances with their environment variables set to the read instance type and their datasource pointed at the database read replicas. The Fineract documentation recommends multiple read instances for high load. Confirm that reads succeed, that a read against a record just written on the primary appears on the replica within your lag tolerance, and that write requests sent to a read instance are rejected or never reach the primary. Record the instance-to-database mapping in your runbook.

  4. Deploy the batch instance

    Deploy a single batch instance with the batch instance type, connected to the primary, so scheduled jobs run outside the write path. The Documentation recommends one batch instance alongside one write instance. Confirm that the batch instance does not receive user traffic from the load balancer and that a scheduled job can be triggered and completes with a status visible in the logs and job history. Test that the batch instance restarts cleanly after a forced stop.

  5. Configure load balancer routing and TLS

    Configure the load balancer to send write traffic to the write instance and read-only traffic to the read instances, based on HTTP method and path rules your team defines and tests. Terminate HTTPS at the edge or on each instance, and enable the documented SSL settings, such as FINERACT_SERVER_SSL_ENABLED. Health checks should use each instance's own health endpoint so a failed node is removed from rotation. The check is a set of test requests showing correct routing, a failed-health node being dropped, and no plain HTTP responses from the public address.

  6. Configure tenant routing and the tenant header

    Confirm that the tenants database holds the correct connection details for every institution hosted on the platform, and that each client application sends the Fineract-Platform-TenantId header on every API call. Decide whether the load balancer or the API gateway rejects requests without the header. Test one request per tenant through the load balancer and confirm each reaches the right database, using a request for one tenant that must not return another tenant's data. The check is a documented test matrix with the expected result for every tenant.

  7. Add broker-based remote partitioning for Close of Business

    The Close of Business Day Spring Batch job can run for several hours at scale, and the README describes remote partitioning across worker nodes coordinated through ActiveMQ or Kafka. Select the broker your organization already operates, deploy the worker nodes, and configure the coordinator. Then run a full Close of Business on a copy of production-scale data, not a small sample, and measure elapsed time, failed partitions and restart behavior. Confirm the outcome by comparing ledger totals and loan balances against the source before and after the run.

  8. Write and rehearse failover runbooks

    Write runbooks for the events your team expects: a failed read instance, a failed write instance, a failed primary database with promotion of a replica, a stalled batch job, and a broken broker. Each runbook should name the owner, the detection signal, the steps, the rollback path and the communications step. Rehearse at least the database failover and the Close of Business restart on the non-production copy. The check is a signed-off runbook set and a rehearsal record showing the measured recovery steps, with any gaps logged for remediation before go-live.

How the design changes by environment

A single node runs one Fineract instance with one PostgreSQL database and no redundancy. It suits development, testing, training and integration sandboxes, where a restart or a failed batch run is an inconvenience rather than an incident. The point of this environment is to exercise product configuration and interfaces, not to prove uptime, so keep its results separate from production expectations.

  • Instance roles: Run one instance that performs every role, so write, read and batch behavior are not separated or tested under load.
  • Schema changes: Apply Liquibase migrations as part of normal startup, and keep a copy of the database before each upgrade.
  • Health checks: Use a simple liveness check on the application and a database connection check so failures are visible during testing.
  • Secrets: Replace the default development login before any shared environment uses the instance, even if it holds only test data.
  • Data refresh: Plan how test data is restored, since a single database is also the only copy of test results.

Confirm with your team which production controls you will deliberately not reproduce here, and record those gaps so they are not carried into the production design.

What drives the effort and cost of Fineract high availability

This table lists the main drivers that change the effort of a Fineract high availability design, explains how each one raises work, and gives one way to keep it under control. Read it before scoping, so the quote reflects the account volume, tenant count, event consumers and recovery targets your environment actually needs.

DriverWhy it raises effortHow to keep it down
Number of accounts and transactionsThe Close of Business Day Spring Batch job can run for several hours on deployments with millions of accounts, which drives batch node sizing, partitioning design and the nightly window the bank must protect.Size and time the batch job on a copy of production-scale data early, then decide on partitioning before procurement rather than after go-live.
Number of tenants on one clusterEach tenant adds connections from the tenants database, separate data to protect and tenant-specific monitoring, and a larger blast radius when one tenant's batch or load misbehaves.Confirm the operating limits for tenants per cluster with the Fineract documentation and your own load tests, and split institutions or brands across clusters where the limits are reached.
Integrations consuming events from the brokerBusiness events such as ClientCreated are disabled by default, so each enabled event stream needs broker topics, consumer error handling, replay and ordering rules, and failover testing for both ActiveMQ and Kafka paths.Enable only the events a consumer needs, and use a message broker the team already operates and monitors, so the new work is configuration rather than a new platform.
Environments that must mirror productionLiquibase migrations, read replica topology, load balancer rules and batch partitioning must be tested in each environment, and a mismatch between staging and production makes failover results unreliable.Keep a single infrastructure template (for example, Infrastructure as Code) for every environment and limit the differences to size and secrets, then verify the topology matches before each release.
Required recovery targetsRecovery point and recovery time goals decide how often PostgreSQL replication is verified, whether replicas are synchronous or asynchronous, and how much failover drilling is needed. Targets are set by the institution and its regulator, not by the platform.Ask the business to agree written recovery targets before design starts, then test failover against those targets rather than designing for an assumed level of resilience.
Compliance evidence needsAssessors and auditors may ask for documented failover tests, backup restores, change records for Liquibase migrations, access logs for batch and read instances, and proof that each control operated over time.Define the evidence list with your compliance team at the start, and generate it from routine runs (failover drills, restore tests, batch logs) instead of assembling it before each assessment.

Securing the high availability tier

A high availability Fineract topology has more moving parts than a single instance: write, batch and read nodes, replicas, a broker and backups. Each one adds a path an attacker or a misconfiguration could use, so the controls below apply to every node, not only the front door.

Replace the default login first

Fineract ships with a development login of mifos and a default password. Replace it before any environment is reachable from a network, including test and staging, because scanners and attackers check default credentials first. Confirm that the default account is disabled or renamed in every tenant, and that OAuth2 or basic authentication uses credentials issued for the environment. Check this on each write, batch and read instance, since each one accepts API calls.

Fineract docs

Enforce HTTPS only

Traffic carrying loan, client and KYC data should never travel in clear text between the load balancer, the Fineract nodes and clients. The project strongly encourages HTTPS only and documents SSL settings through environment variables such as FINERACT_SERVER_SSL_ENABLED. Confirm that the load balancer terminates TLS with current certificates, that plain HTTP is refused or redirected, and decide where TLS is re-established to internal nodes.

Restrict database credentials by role

Read instances should connect to replicas with a database account that has read-only rights, so a compromised or misrouted read node cannot change loan balances or ledger entries. Write and batch instances need separate accounts scoped to what they do. Liquibase migrations run only on write instances, so the migration account should not be shared with read nodes. Test the restriction by attempting a write from a read instance and confirming it fails.

Isolate and limit the event broker

Business events such as ClientCreated are disabled by default, and when enabled they flow to ActiveMQ, another JMS broker or Apache Kafka. Anyone who can publish to a topic can inject false account events, and anyone who can consume can read customer data. Place the broker on a private network, give each producer and consumer its own identity, and grant topic-level permissions. Confirm that remote partitioning workers for the batch job use the same restricted identities.

Protect replica and backup access

Read replicas and backups hold the same personal and financial data as the primary database, often with weaker monitoring. Restrict network access to replication ports, encrypt backups at rest, and limit restore rights to a small named group. Record who restored what and when. Confirm that a restored copy is tested against tenant data separation before anyone queries it, because a restore that mixes tenants is a privacy incident.

Keep secrets out of images and repositories

Database passwords, OAuth2 client secrets, broker credentials and SSL keys should be injected at runtime from a secrets store, not baked into the Docker image or committed to configuration files in version control. Scan images and repositories for stray credentials before each release, and rotate any secret that was ever exposed. Every node in the topology should read secrets through the same controlled process, so one copied image cannot leak credentials for all tiers.

How to test that Fineract fails over and recovers safely

The design only counts if tests show it fails safely, so start with four checks that prove the role split holds under stress. First, confirm that read instances reject writes: send create, update and approve requests to each read instance and verify that none reach the database. Second, restart the write instance during a batch of loan repayments and savings postings, then reconcile the ledger and the transaction history against the request log to confirm that no in-flight work was half committed. Third, fail over the primary PostgreSQL node and check that the read replicas, the write instance connection and the load balancer routing all settle on the expected topology, with no write traffic sent to a replica. Record which configuration keys, such as the instance type environment variables, each component reads at startup so the team can explain what the test proved.

The Close of Business Day job needs its own failure drills. Run it with remote partitioning across at least two worker nodes coordinated through ActiveMQ or Kafka, then stop one worker partway through the run. The test passes if the job either reassigns the lost partition or resumes it cleanly after the worker returns, and if the end-of-day balances match a control run on the same data. Repeat the drill with the write instance stopped during the job. Confirm which step the job reports as failed, whether it restarts from the last completed step, and whether any accounting entries are posted twice. Ask your implementation partner to show the job execution records and the monitoring alerts that fire during each drill.

Run all of these tests on a copy of production-scale data, restored from a backup into an environment that mirrors production topology, not on a small seed dataset. Time each run from the failure to the moment normal traffic and the nightly job both return to a healthy state, and keep the timings in a test log so they can be compared across releases. Do not set recovery targets before the first timed runs, because the numbers depend on account volume, hardware and database settings. Finally, test tenant separation during failover: with several tenants configured, confirm that requests carrying each Fineract-Platform-TenantId header still return only that tenant's data after a replica or write instance failover. Treat any cross-tenant read as a blocking defect, and ask whether your partner will provide a retest report after each fix.

Questions teams ask before building Fineract high availability

Can our team build a highly available Fineract setup without a partner?

Yes, if your engineers already run PostgreSQL, Java services and load balancers in production, and they have time to own the design. The Fineract documentation describes instance types set by environment variables: one write instance, one batch instance and multiple read instances on database read replicas for high load. The project does not provide a comprehensive production deployment guide, and its README warns that production deployments can be complex and time-consuming. The practical question is whether your team can carry the design, testing and ongoing operation after the first build. Confirm that with your own staff before deciding, and compare that against a fixed-scope quote that lists what is delivered.

How long does high availability work take, and what sets the duration?

Duration depends mostly on the number of environments, the size of your account base and how much failover testing you require, so ask for a timeline tied to a written scope rather than a generic estimate. The main drivers are the database topology you choose, how many read instances you run, whether batch workers are distributed across nodes, and how much of your existing infrastructure (monitoring, secrets, network controls) can be reused. Each of these adds design decisions and verification steps. A quote should list the environments covered, the failure scenarios tested and the handover documentation.

What does the design need from our infrastructure, database and security teams?

Your infrastructure team provides the cloud or data center capacity, network segmentation and load balancer, your database team owns PostgreSQL replication, backups and failover procedures, and your security team reviews HTTPS settings, identity, secrets and access to the tenants database. Fineract's documentation strongly encourages HTTPS only and documents SSL settings through environment variables such as FINERACT_SERVER_SSL_ENABLED. Early agreement on who approves configuration changes, who holds database credentials and who receives alerts prevents delays later. Confirm each of these owners in your own environment before the design starts.

Is it safe to send read traffic to database replicas?

Read traffic can go to replicas only when the reads your users depend on tolerate replication lag, and the design must decide which endpoints use read instances. The Fineract documentation recommends multiple read instances on database read replicas for high load, which makes reads cheaper for the write path but introduces a delay before new writes are visible. Teams should classify screens and APIs by how fresh their data must be, for example, a balance shown just after a transaction versus a monthly report. Test lag under realistic load and confirm the behavior against the platform documentation at Apache Fineract platform documentation before routing live customer requests.

What happens to the Close of Business job if a worker fails?

The outcome depends on how you configured remote partitioning, the job's restart behavior and your monitoring, so verify it in a test environment before go-live. The Fineract README notes that the Close of Business Day Spring Batch job can run for several hours on deployments with millions of accounts and supports remote partitioning across worker nodes coordinated through ActiveMQ or Kafka. Design for a failed worker by confirming how partitions are reassigned, how the job is restarted and how operators see partial progress. Also define a cutoff time after which the business day cannot be closed safely, and plan the manual procedure for that case.

How does a high availability design affect future quarterly upgrades?

A clean topology makes quarterly upgrades more predictable, because Liquibase database migrations run only on write instances, so the upgrade sequence must start there. The Fineract README states that official releases are created quarterly, at the end of each quarter, so you will repeat this process often. Keep instance roles, environment variables and load balancer rules in version-controlled configuration, and document which instances are drained during each step. On Kubernetes, the liquibase-only Spring profile can run migrations separately, which helps you control that step. Include a rehearsal on a copy of production data in your upgrade plan.

What to monitor, back up, upgrade and document

A highly available Fineract topology stays available only if someone owns its daily health, recovery and change control. The cards below set out six operating responsibilities, each with the evidence to keep, so the team can show that the platform behaves as designed before an incident and after a release.

Close of Business duration and failures

Track how long the Close of Business Day Spring Batch job runs each night, and alert on runs that overrun the agreed window or stop partway. Record the job execution history, failed step names and restart points, because the README notes the job can run for several hours on deployments with millions of accounts. Confirm with your vendor how restarts are handled before go-live, and keep a dated log of each run so trends are visible.

Typical nightly run
Several hours
Fineract docs

Replica lag and database health

Monitor replication lag between the primary PostgreSQL server and each read replica, since read instances serve stale data when lag grows. Track connection counts, disk growth, long-running queries and failover readiness on the primary. Keep dated lag graphs and the thresholds that triggered action, so reviewers can see that reads reflected recent postings.

Broker queue depth under remote partitioning

When Close of Business runs with remote partitioning, watch queue depth and consumer count on ActiveMQ or Kafka, along with the age of the oldest unprocessed message. A growing backlog or a worker that has gone quiet means partitions will not finish. Keep broker metrics alongside batch timings so a slow night can be traced to workers, brokers or database load.

Backups and restore tests

Back up the primary Fineract database and the tenants database together, on schedules that keep both at a consistent point. Define a retention period, store copies outside the primary failure domain, and run restore tests into an isolated environment on a set cadence. Keep restore test records showing the time taken, the row or balance reconciliation performed, and any gaps found, because an untested backup is not evidence of recovery.

Quarterly releases applied write instance first

Fineract publishes official releases quarterly, so plan a recurring upgrade cycle rather than ad hoc patching. Apply each release to a staging copy first, then run Liquibase migrations on the write instance, since migrations run only there. Keep the regression results for products, accounting and batch jobs, plus the change record that shows the write instance was upgraded before read and batch instances.

Official release cadence
Quarterly
Fineract releases on GitHub

Current topology runbook

Maintain a runbook that names each write, batch and read instance, its database connection, its broker dependencies and the environment variables that set its role. Update it on every topology change, failover test and release. Keep dated versions and sign-off records, so an on-call engineer can confirm which instance is authoritative during an incident.

How DeployOpen scopes, builds and hands over Fineract high availability

DeployOpen plans Apache Fineract high availability as a fixed-scope piece of work inside the client's own infrastructure, with the instance roles, database layout and batch design agreed in writing before any build starts. The work ends with documented runbooks and tested failover steps that the client's own platform team can operate.

How we scope

  • Map the expected load, tenant count and account volume to a write, batch and read instance layout, agreed in writing before build
  • Review the PostgreSQL topology, replication plan and backup approach against the client's recovery targets and hosting constraints
  • Confirm the Close of Business run window, partitioning needs and the ActiveMQ or Kafka broker the client already operates

How we build

  • Configure write, batch and read instances through environment variables, with Liquibase migrations confined to the write instance
  • Set up PostgreSQL replication and read replicas, then the load balancer routing rules for read traffic and HTTPS-only access
  • Test failover, replica lag handling and a full Close of Business run under partitioned workers before sign-off

How we hand over

  • Deliver architecture diagrams, configuration records and runbooks for node restarts, failover, batch re-runs and capacity changes
  • Walk the client's operations and database teams through monitoring of batch duration, replica health and failed job alerts
  • Provide a findings log of open risks, with the owner and the next action for each one agreed with the client

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after hand over, scoped in a separate written agreement
  • Retest the high availability setup after each Fineract quarterly release and after changes to database or broker topology
  • Confirm with the client which uptime, recovery and support commitments belong in the contract before any are promised

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.