Why X-Road clustering does not guarantee delivery of every message
A Security Server cluster keeps the exchange endpoint reachable when one node fails. It does not, on its own, guarantee that every message in flight at the moment of failure completes or is recorded. Clustering targets the availability of the endpoint that consumers and providers call, and the load balancer's health checks steer new connections away from a node that stops answering. Whether a request already accepted by a failed node is lost, duplicated or retried by the caller is a separate question. The answer depends on the load balancer, the consuming information system and the X-Road release in use. Plan on the assumption that some in-flight exchanges will fail during a node failure, and confirm the exact behavior before you rely on it.
The design has three limits you should write into your operating rules. First, no guarantee covers messages that a failed node was processing, so ask NIIS in writing how in-flight messages and their message log entries are handled for your release. Second, configuration changes are made against the primary, so while the primary is down no configuration changes can be made, even though the secondaries keep serving exchanges. Third, configuration is eventually consistent: changes reach secondaries after a delay, and during that window nodes can hold different configuration. Confirm the propagation mechanism, the expected delay and what a node does while it waits in the cluster documentation for your version.
Consumers need their own answer to the retry question. A caller often cannot tell whether a request reached the provider before a node failed, so a retry can produce a second call. Decide per service whether the operation is safe to repeat, make repeatable operations idempotent on the provider side, and set a retry limit and backoff in the consumer. Then test the cluster in a staging environment. Stop the primary and then a secondary during a steady stream of test exchanges, record what the consumer and the message log show, and compare the results with the behavior NIIS has confirmed. Use the X-Road releases page to confirm which 7.x version your cluster will run before you write the test plan.
How a failed node, a retry and a configuration change move through the cluster
The design sketch starts with the consumer information system sending a request through the external load balancer into the Security Server cluster. The request reaches a failed node, receives no acknowledgment, and the consumer retries, which is a decision the consumer makes, not something the cluster guarantees. The sketch also shows the primary Security Server unable to accept a configuration change while it is down, with the PostgreSQL configuration database holding the state. Check the trust boundary on TCP 5500 and treat every arrow as the intended design to verify in testing, not as guaranteed behavior.
Intended cluster design for a failed node, a consumer retry and a blocked configuration change.
Which failures a Security Server cluster absorbs and which it passes to clients
A Security Server cluster protects the exchange path from some single-component failures, but it does not protect message delivery or configuration consistency during every failure. Each card below separates three questions: whether exchanges keep flowing, whether configuration changes continue, and what the consumer information system must handle.
Secondary node goes down
A secondary Security Server fails its health check, and the load balancer stops sending it traffic. Exchanges already accepted by that node may never reach the provider, and the cluster does not replay them. Configuration changes made on the primary continue to reach the remaining nodes. Consumers must treat a timed-out exchange as an unknown outcome and decide, service by service, whether a retry is safe before resending it.
Primary node goes down
The remaining secondaries keep serving exchanges because they hold the same keys and certificates as the primary. Configuration changes stop, since the primary is the only node where they are made and no other node takes over that role. Consumers should not depend on configuration changes during a primary outage, such as new clients, new services or access rights. Confirm with your own design how the primary is restored and who can promote a replacement.
Health check misfires
A check that marks a healthy node as down removes capacity, while a check that passes a broken node keeps sending it requests. Either way, a request can land on a node that is being removed while it is processing. A misfiring check creates the same in-flight failure as a node loss, so consumers need the same timeout and retry handling. Configuration changes are unaffected because they go through the primary, not through the load balancer.
Configuration database unavailable
Each Security Server needs PostgreSQL, local or remote, so a database outage affects the servers that depend on it. Confirm which exchanges continue on the configuration each node already holds, because this depends on your deployment and the release you run. Configuration changes stop until the database is restored, which blocks onboarding, new services and access right updates. Consumers should expect failed administrative requests during this window, not only failed exchanges.
Security Server installation guideNetwork partition between nodes
When nodes cannot reach each other, each side may keep serving exchanges while the cluster is split. Configuration is eventually consistent, so a change made on one side may not reach the other until connectivity returns. Two nodes can hold different configuration at the same time. Consumers may see a newly added access right on one request and a rejection on the next, so they should not assume that two consecutive calls are judged against the same configuration.
Provider system fails
A Security Server cluster provides redundancy for the Security Server, not for the provider information system behind it. When the provider is down, the cluster still accepts the exchange, and the failure surfaces as an error from the provider side. Clustering the Security Server does not make the provider available. Configuration changes are unaffected. Consumers must distinguish provider error responses from transport failures, and provider redundancy must be designed separately if availability matters.
Choosing between a cluster, built-in redundancy and a single Security Server
This table compares three ways to keep an X-Road provider or consumer reachable: one Security Server, a cluster behind an external load balancer, and several Security Servers registered for the same member without clustering. Read each row against how many in-flight messages you can afford to lose and whether configuration changes must continue during an outage. The main takeaway is that every design relies on clients retrying failed requests, so the choice mainly sets how often retries happen and how much configuration work continues during a failure.
| Aspect | Single Security Server | Cluster behind external load balancer | Redundant servers without clustering |
|---|---|---|---|
| Availability gain | None if the server or its host fails | Traffic moves to healthy nodes once the load balancer removes a failed node | Requests can reach another registered server if one is down |
| Messages in flight on a failed node | All in-flight messages fail | Messages being processed on the failed node can be lost | Messages on the failed server fail and must be resent by the client |
| Configuration changes during an outage | Changes wait until the server returns | No configuration changes while the primary is down | Changes continue on servers that are up; confirm how the others catch up |
| Consistency after recovery | Not applicable | Secondaries catch up to configuration from the primary; confirm timing in your setup | Servers can hold different configuration until changes reach each one; confirm in your environment |
| Operating effort | Lowest: one server to patch, back up and monitor | Highest: shared keys, database replication, file sync and health checks | Moderate: each server is patched, backed up and configured separately |
| Client retry logic | Clients retry after the server returns or use another provider if one exists | Clients retry with backoff and treat repeated failures as possibly lost messages | Clients retry through the registered alternatives; retries must be safe to repeat |
| Best fit | Exchanges that can tolerate an outage window | Providers that need node-level failover and accept in-flight message loss with retries | Providers that want failover without sharing configuration across a cluster |
What clients must do about retries and duplicate requests
A consumer that receives no response cannot tell whether the provider processed the request, so a retry can create a duplicate. The consumer team owns this decision, and it has to be made before the first integration goes live. Start by classifying each operation the consumer calls as safe to repeat or not. A read is normally safe. A transfer, a registration or a status change may not be, unless the provider's API can detect the repeat. Record the answer per operation in the integration design, not as a general rule for the whole service.
Next, decide how the provider will recognize a repeated business transaction. Ask the provider whether its API accepts a client-generated idempotency key or a unique business reference, and where that value must travel in the request. Confirm whether the provider stores and checks it. The X-Road message header identifies the message, but whether a resent message is treated as new or as a duplicate depends on the provider's implementation and the X-Road version in use. Confirm this in the documentation for that version and test a deliberate retry in a non-production environment before relying on it.
Timeouts must be set as a chain. The consumer's client timeout should be longer than the load balancer's idle and backend timeouts, and both should be longer than the provider's expected processing time, so the consumer does not give up while the provider is still working. Document the values for each hop, including the X-Road Security Server installation guide for ports and the load balancer settings your team chose. Finally, log every failed or retried call with the message identifier, operation, attempt number, timeout and final outcome, so operations and the business can reconcile unclear results against the provider's records.
How a primary outage affects exchanges, configuration and new members
Exchanges in progress are the most exposed part of a cluster failure. A Security Server node that stops while handling a request can drop that message, and the consumer receives an error or a timeout. Requests that the load balancer routes to the remaining secondaries should continue, because those nodes already hold the keys, certificates and service configuration they need to answer. Confirm with NIIS and your version's documentation which in-flight messages are recovered and which are not.
- Requests on the failed node: Any message being processed at the moment of failure may be lost, and the consumer must treat the call as unconfirmed.
- Requests on healthy nodes: Traffic sent to the remaining nodes should keep flowing, provided those nodes can still reach the database and the information systems they call.
- Consumer retries: The client application must decide whether a failed call is safe to repeat. Operations that create or change business records need a deduplication key or a status lookup before any retry.
- Log gaps: Check whether the failed exchange was recorded on the node that failed and whether the consumer's own records show it.
When the primary returns, compare the message log and client-side records for the failure window, and confirm that retries did not create duplicate business transactions.
While the primary is down, configuration changes such as service descriptions, access rights, member settings and certificate updates cannot be made through it. Secondaries serve the configuration they last received, so existing exchanges can continue while changes wait. How long a secondary can operate on that stored configuration, and how it is brought up to date after recovery, depends on the version and setup, so confirm both with NIIS before you rely on them.
- Blocked changes: Changes that depend on the primary wait until it is available again, and any planned work in that window needs to be rescheduled.
- Frozen snapshot: A change made shortly before the failure may not have reached every secondary, so nodes can disagree about access rules.
- Emergency changes: Decide in advance whether a security-driven change, such as revoking a compromised certificate, may proceed through another path, who approves it, and how it is applied to every node.
- Sync verification: Compare the configuration on each node with the primary before resuming normal changes, using the method your version documents.
Before resuming changes, confirm that every node reports the same configuration state as the primary and that no change was left partly applied.
Onboarding a new member or a new service is a configuration change, so it depends on the primary. Existing members and services keep their current access, but a new one cannot be registered, activated or approved until the primary is back and the change has reached the nodes. Ask NIIS which registration steps can be prepared in advance and which must be completed on the Central Server side.
- New services: A service you publish is not available to consumers until the change is applied across the cluster.
- New consumers: Access rights for a newly onboarded consumer take effect only after the primary returns and the change propagates.
- Member onboarding: Steps that involve the Central Server depend on that server being reachable, so schedule them away from planned maintenance on the primary.
- Sequencing: Confirm cluster health before starting onboarding, and avoid running onboarding in the same window as a planned primary change.
When the primary returns, test the new service or member from a consumer that uses the production path, and confirm the access rule is active on every node.
How to test failure behavior before go-live
This sequence turns the documented limits of a Security Server cluster into observed behavior in a staging environment, so the operations team knows which requests fail, which may duplicate and how configuration converges before production traffic depends on the design.
Agree failure scenarios in a written test plan
The security architect, the X-Road operator and the owners of the consumer and provider information systems list each scenario in writing: a secondary node failing, the primary failing, a network partition between the load balancer and a node, and a configuration change made during an outage. For each scenario, the plan states the expected result, who observes it and where the evidence is recorded. The plan is done when every owner has signed off on the expected results, including the expectation that some in-flight requests may fail and that consumers must retry them.
Build a staging cluster that matches production
The platform team builds a staging Security Server cluster with the same node count, roles, load balancer type, health check configuration, database arrangement and information system connections as production. Where production uses external hardware security modules or a managed PostgreSQL service, staging uses the same type of component, or the team documents the difference and what it may change. Confirm that the primary and secondaries carry identical keys and certificates and that configuration replication works before any test starts. The step closes when the team can show the cluster topology side by side with production and the differences are listed.
Send test exchanges through the load balancer
The test team sends a steady set of test exchanges from a consumer system through the load balancer, using the same message exchange port and TLS path that production consumers use. They record the request identifiers, response codes and the nodes that handled each request. The baseline is complete when every test exchange succeeds under normal conditions and the consumer and provider message logs show matching entries for each request. Any unexplained errors at this stage are resolved before failure testing starts, because they would hide the effects of the failures.
Stop a secondary, then the primary during load
While the steady exchange load continues, the operator stops one secondary node, waits for the load balancer health check to remove it, and then stops the primary in a second run. The test team watches which in-flight requests return errors and whether the load balancer routes new requests only to surviving nodes. The check is the consumer-side log: each failed request should appear with its error, and each retried request should show the same request identifier. The step is done when both failure runs have been captured with timestamps from the load balancer, the Security Server logs and the consumer logs.
Record which requests fail or duplicate
The test team compares the consumer log, the provider log and the Security Server message logs for each run and classifies every request as delivered once, failed without delivery, or delivered more than once. A request that the consumer retried after a timeout may reach the provider twice if the first attempt was processed before the node failed, so the team checks whether the provider's service handles duplicate requests safely. The output is a table of request outcomes per scenario, reviewed with the provider owner. The step closes when every classification is backed by log evidence rather than by the consumer's own status code.
Change configuration during the outage and confirm the result
While the primary is down, the operator attempts a configuration change that the design does not allow to be made on a secondary, such as adding a member or updating a service description, and records the error or refusal. The team then checks whether the existing exchanges on the secondaries continue to work with the configuration they already hold. This step confirms what the cluster does and does not accept during the outage, so the change window and the rollback plan match documented behavior. The step is done when the attempted change, its result and the state of each node are written into the test record.
Restore the primary and compare configuration across nodes
The operator restarts the primary and waits for the cluster to settle, then compares the configuration version and the relevant configuration files or database content on every node, including the change attempted during the outage. Any node that shows a different configuration version or missing entries is investigated before the test closes, because eventual consistency means the nodes may differ for a period. The check is that all nodes report the same configuration version and that a test exchange routed to each node succeeds. The step ends with a signed test report that lists observed behavior against the expected results in the written plan.
Security risks that come with replicated keys and configuration
A Security Server cluster copies identity material, a database and configuration across several nodes, so one weak point can expose all of them. The four cards below cover the places where that replication widens the attack surface and the controls to apply in each.
Identical keys and certificates across nodes
Every node in a cluster carries the same signing and authentication keys and certificates, so compromising one node exposes the identity of the whole member. Treat the key store on each node as equally sensitive, restrict file permissions, and confirm where keys are backed up. Where the organization uses hardware security modules through PKCS#11, check whether the keys can stay in the module rather than on disk. The installation guide documents the token and key setup that applies.
Installation guideDatabase replication channel
The serverconf database is replicated from the primary to the secondaries, so anyone who can read or write that channel can change authorization and service configuration. Require TLS between nodes and the database, restrict which hosts may connect, and use separate database credentials for each role. Confirm the PostgreSQL setup against the installation guide, which covers local and managed remote databases.
Installation guideConfiguration sync path
Configuration files copied from the primary with rsync are a second route for changes to reach every node. An attacker or a misconfigured job that can write to the sync path can push unwanted settings to all secondaries at once. Restrict the sync account to key-only SSH, limit it to the required paths, and log every sync run. The hardening guidance recommends key-only SSH for administrative access, and the same rule should cover this account.
Hardening guidelinesLoad balancer exposing ports 5500 and 5577
The load balancer must accept TCP 5500 for message exchange and 5577 for OCSP from external networks, so it is the public face of the cluster. Keep the admin UI on TCP 4000 and information system access on 8080 or 8443 off the external network path. Apply the hardening guidance on account lockout after 3 failed logins for 15 minutes and on the allowed-hostnames setting to guard against host header injection. Confirm those settings on every node, not only the primary.
Hardening guidelinesQuestions teams ask before relying on X-Road clustering
Does an X-Road Security Server cluster prevent message loss when a node fails?
No. A cluster adds redundancy for the Security Server role, but it does not, by itself, promise that every message in flight on a failed node completes. Requests being processed when a node goes down can fail, and the calling system sees an error or a timeout it must handle. Whether a given exchange is lost, delayed or duplicated depends on where it stood in the transaction and how the calling system behaves. Confirm the failover behavior for your version (the supported releases are listed on X-Road releases) and test it by stopping nodes under load in a staging cluster before any business process depends on it.
Can we change X-Road configuration while the primary Security Server is down?
Plan on waiting until the primary is back. In a cluster with one primary and several secondaries, configuration changes are made on the primary and then distributed, so an outage of the primary normally blocks changes such as new members, services or access rights. Secondaries keep serving with the configuration they already hold. Confirm which operations remain possible on a secondary during a primary outage for your version, and write a runbook that states who promotes a node, who approves the change and what is checked before the cluster returns to normal operation.
How do retries and eventual consistency affect consuming systems?
Configuration and state can differ briefly between nodes while changes replicate, so a request may reach a node that has not yet received a new access right or service definition. The calling system may then receive a rejection that clears moments later. Each consuming team needs a retry policy that defines bounded retries with backoff, which errors are safe to repeat, and how the receiving side detects a duplicate, usually through an idempotency key or a unique transaction reference. Without that policy, a retry after a timeout can create a duplicate record. Record the identifiers your message logs keep so duplicates can be reconciled.
What drives the effort and duration of a clustering test or fix?
The main drivers are the number of nodes, how the shared PostgreSQL database is set up (local or managed, with or without replication and a standby), the number of consumers and services whose retry behavior must be tested, and the scope of failure scenarios such as node loss, database failover and configuration change during an outage. Load balancer configuration, the number of environments that must mirror production, and the number of change windows also add time. Duration is set by the written scope, so ask for a timeline that lists each scenario and each dependency on your team.
What does our team need to provide for this work?
Expect to provide a test environment that matches production topology, including the same number of Security Server nodes, the same database arrangement and the same load balancer type. You also need named owners for retry design in each consuming system, because only those teams know which operations are safe to repeat. Change windows are needed for failover tests, and someone with access to the load balancer, the database and the Security Server admin interfaces must be available during testing. Agree in advance who signs off on each failure scenario and on the final runbook.
Can our own team build and test an X-Road cluster without outside help?
Often yes, if the team has Linux administration, PostgreSQL operations and load balancer experience and can schedule destructive failure tests. The gaps teams most often underestimate are systematic failure testing under load, retry design across several consuming systems, and keeping runbooks accurate after each X-Road upgrade. Assess these honestly against your staff. If the gaps are real for your team, a partner can take on one part, such as the failure test plan and the retry guidance, while your team keeps operating the cluster.
What should a fixed-scope quote for X-Road cluster work include?
A fixed-scope quote should list the nodes and topology in scope, the X-Road version and the database and load balancer products, the failure scenarios to test, and the consuming systems covered by the retry review. It should name each deliverable, such as the test report, the runbook and the retry guidance, and state a retest after fixes. Also ask what is excluded, for example changes to consuming applications or environments that were not agreed. DeployOpen agrees scope, deliverables and timelines in writing before work starts, and the quote follows from that scope. Pricing is not published, so compare quotes on the same written scope.
Do we need an independent security or resilience test of the cluster?
An independent test is worth considering when the cluster carries regulated or sensitive exchanges, when the design depends on failover behavior your team has not tested, or when a customer or regulator asks for evidence. DeployOpen runs security testing of applications, APIs and infrastructure, and that can be scoped alongside cluster testing. Resilience testing is a separate question, so confirm with the provider what each test covers. Note that compliance assessments are performed by independent auditors and certification bodies, not by DeployOpen, so plan the evidence accordingly.
What to confirm with NIIS and your own tests before go-live
The supplied sources do not settle several behaviors that decide whether a Security Server cluster loses messages or serves stale configuration. Each card below names one open item, who should confirm it, and the evidence to request before you rely on the design in production.
Message handling on a failed node
Confirm exactly what happens to in-flight requests when a cluster node fails mid-exchange, including whether the consumer receives an error, a timeout or a partial response. Ask NIIS for the handling documented for the release you run, then reproduce the failure in a test cluster by killing a node under sustained load. Record which requests are lost, duplicated or answered twice, and compare the result with your message log.
Security Server user guideConfiguration changes during primary outage
Confirm which administrative actions are blocked while the primary Security Server is down, such as adding services, changing access rights or registering certificates. Ask NIIS for the list of blocked operations and whether secondaries can be promoted without manual steps. Test each operation against a stopped primary and log the errors your operators will see, so the runbook matches the real behavior.
Convergence time across nodes
Confirm how long a configuration change on the primary takes to reach every secondary, and what triggers the sync. Ask NIIS for the synchronization mechanism in your version and any documented intervals or retry rules. Measure the delay in your own environment by making a change and polling each node's configuration until it matches, then set consumer retry windows from that measurement.
Sync behavior under network partition
Confirm what a secondary does when it cannot reach the primary, including whether it keeps serving with its last known configuration and how it rejoins afterward. Ask NIIS for the reconciliation rules and any conflict handling when two nodes accept changes. Simulate a partition between the primary and one secondary with a firewall rule, make a change on each side where possible, and verify the state after the link returns.
Support status of your release
Confirm that the release you run is still supported and find its end of support date. The supported versions listed on the releases page are 7.8.3, 7.7.4 and 7.6.5, and 7.8.0 is the last new-feature release of the 7 line. Ask NIIS whether a 7.x release you run will receive security patches, and how long the 7 line will be maintained, since that period has not been decided.
X-Road releasesPlan for X-Road 8
If you are evaluating the 8.0.0 Beta 2 build, confirm which cluster and message handling behaviors will change in 8.x and whether your current design has a migration path. The production release is scheduled for December 2026, so ask NIIS for the planned upgrade route from 7.x clusters and the behaviors that are not yet final. Treat any beta results as provisional until the production build is tested against the same failure cases.
X-Road GitHub repositoryHow DeployOpen scopes and tests X-Road high availability
DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own infrastructure, including X-Road. For clustering limits such as message loss on a failed node, configuration changes during a primary outage and eventual consistency, we work from the written scope and test the behavior your teams would rely on.
How we scope
- Written scope lists which Security Server or Central Server design is in use and which failure cases are covered
- Failure cases are agreed in writing, including node loss during in-flight messages and primary outages
- Your client retry behavior, timeouts and idempotency expectations are documented before any build starts
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work begins
How we build
- Cluster and load balancer configuration is set up in your infrastructure, including health check settings
- Configuration sync between primary and secondaries is verified after each change, not assumed
- Failover tests run against real consumer and provider flows, with message logs checked for gaps
- Retry and error handling guidance is written for each client application that calls through X-Road
How we hand over
- A runbook covers primary outage procedures, configuration freeze windows and resynchronization steps
- Documentation states which messages can be lost, duplicated or delayed under each failure mode
- Your operations team walks through failover and recovery drills before handover is accepted
- Findings are delivered with fixes applied, retest results and a list of residual risks to confirm
How we support
- Ongoing support, upgrades and continuous testing are available as retainers
- Retainers can cover X-Road version changes, including the 7.x support policy and X-Road 8 evaluation
- Periodic failover retests confirm that health checks and retry guidance still match the deployed design
- Support scope and response expectations are written into the retainer before service begins

