High availability inquiries for Canton multi-node operation

Hi, :grinning:
I have configured Canton with 1 domain and 2 nodes (using postgresql) and running it using Docker.
When I read the Canton manual, I expected that if the node type was set to Vip, all contract data would be stored in the node set to Vip (for high availability), but when I ran it, it ran differently than expected, leaving a question.

I ran the test as shown below.

  • Test 1
  1. Set both nodes as Vip nodes
  2. Contract execution on node 1
    Expected result: Create the same contract data in 2 DBs
    Actual result: Only 1 DB creates contract data
  • Test 2
  1. Only node 1 is set as a Vip node.
  2. Contract execution on node 2
    Expected result: Create the same contract data in 2 DBs
    Actual result: Only 1 DB creates contract data

I came to check the results that were different from what I expected, am I doing something wrong?
In addition, if the data of nodes in the same domain is replicated in both directions through the VIP setting, can the data at this time be said to be immutable? :thinking:

Summary: When configuring 2 nodes in 1 domain using Canton, I am curious about how to store the same contract data in 2 nodes.

Reference URL
https://www.canton.io/docs/stable/user-manual/usermanual/console.html#participants.set_state

thanks

2 Likes

Hi @yongtaek

Please search for VIP here:
https://www.canton.io/docs/stable/user-manual/architecture/overview.html

The VIP setting does not change how contracts are distributed and who can see what. A VIP participant will not see everything.

It just changes the confirmation behavior. So in a transaction, where we would need two participants to confirm a particular view, if one of the participants is a VIP, then his confirmation will be sufficient to make the transaction final.

In the end, there is this privacy vs availability trade-off which is fundamental to any distributed problem (e.g. bitcoin chooses to broadcast everything to everybody). If you need higher availability in Canton, you can either use our Enterprise version with HA participants, or you can permission a party on several nodes (preview feature Identity Management — Canton 0.21.0 documentation), so that several nodes can confirm on behalf of that party. But if a party is on more than one node, you effectively reduce privacy as suddenly more participants learn about the contracts.

I hope this helps.

Cheers,
Ratko

1 Like

Excellent question @yongtaek and welcome to the community!

1 Like

Thank you for answer. :+1:
I have some understanding of Vip. Is the HA function provided only in the enterprise version? Only the community version can be downloaded from github. How do I use the corporate version and document content?

Thank you.

1 Like

Hi - this is Jon from the digital asset sales team. Happy to provide some more detail directly - you can contact me at jr@digitalasset.com. Looking forward to speaking soon!

1 Like

Hi @yongtaek

You have two options to make the system more available:

  1. Participant HA is a feature we’ll be releasing soon as part of our enterprise version.

  2. Both, enterprise and community support to deploy a party on two participant nodes.

The issue with the latter is that an application can not easily failover from one participant node to the other, as the “ledger-offsets” we currently emit on the ledger API differ, because the topologies of the two participant nodes might be different in the sense that they might host a different set of parties and be connected to different domains. There is more work to do on our side to fully support it: High-Level Requirements — Canton 0.21.0 documentation

The VIP options is more something you would do in a very asymmetric setup, where you have one participant that is trusted to not tamper with the protocol and the internals. I.e. for very central market operators. But this option is available both in community and enterprise.

In the end, the question is a bit on how you structure your Daml model. The availability of your Daml model state is governed by who the signatories of the contracts are. If you say that a party is signatory, then a participant representing that party with at least confirmation rights must be available to validate and approve the progression.

May I ask you what you are trying to achieve?

Cheers,
Ratko

2 Likes