Tx-Rails: Production Sizing

Package Builder — THE LADDER: Member-classes ≤ Overseers ≤ Gov-commercial = Gov-regulators ≤ National-registry = Power-funnel = 13. Verdict: VALID — the ladder holds.
Ladder step Tier Sizes offered Chosen n Ladder rule Rule check Faults tolerated f Quorum 2f+1 Auditor mesh n BFT nodes (workload + auditor) Databases (1 per node) Relations per mesh n(n−1)/2 Relations, both meshes Valid splits (each domain ≤ f) by offered size Split for chosen n Juju models = failure domains ⌈n/f⌉ Largest domain Survives losing any one domain? Max per domain (f) Auditor app prefix (input) Max prefix length Prefix OK? Size script variable
1 Member-classes 7,10,13 7 Bottom of the ladder OK 2 5 7 14 14 21 42 7: 2 + 2 + 2 + 1 · 10: 3 + 3 + 2 + 2 · 13: 4 + 3 + 3 + 3 2 + 2 + 2 + 1 4 2 YES — 5 left ≥ quorum 5 2 aud-mc 9 OK BFT_NODE_APPS (list) — single-model today; needs multi-model support for the 4-domain split
2 Overseers 7,10,13 7 ≥ Member-classes OK 2 5 7 14 14 21 42 7: 2 + 2 + 2 + 1 · 10: 3 + 3 + 2 + 2 · 13: 4 + 3 + 3 + 3 2 + 2 + 2 + 1 4 2 YES — 5 left ≥ quorum 5 2 aud-ovs 9 OK TOTAL_OVERSEERS + OVS_MODELS (4 model names)
3 Gov-commercial 10,13 10 ≥ Overseers OK 3 7 10 20 20 45 90 10: 3 + 3 + 2 + 2 · 13: 4 + 3 + 3 + 3 3 + 3 + 2 + 2 4 3 YES — 7 left ≥ quorum 7 3 aud-gc 8 OK TOTAL_GOV + GOV_MODELS (4 model names)
3 Gov-regulators 10,13 10 Equal to Gov-commercial (set automatically) OK 3 7 10 20 20 45 90 10: 3 + 3 + 2 + 2 · 13: 4 + 3 + 3 + 3 3 + 3 + 2 + 2 4 3 YES — 7 left ≥ quorum 7 3 aud-gr 8 OK TOTAL_GOV + GOV_MODELS (4 model names)
4 National-registry 13 only 13 Fixed at 13 OK 4 9 13 26 26 78 156 13: 4 + 3 + 3 + 3 4 + 3 + 3 + 3 4 4 YES — 9 left ≥ quorum 9 4 aud-nr 8 OK TOTAL_REG — single-model today; needs multi-model support
4 Power-funnel 13 only 13 Fixed at 13 OK 4 9 13 26 26 78 156 13: 4 + 3 + 3 + 3 4 + 3 + 3 + 3 4 4 YES — 9 left ≥ quorum 9 4 aud-pf 8 OK TOTAL_PF — single-model today; needs multi-model support
Total 60 60 120 120 576 24
Package Builder — rough memory estimate (linear scaling from one dev measurement; measure before sizing hardware)
Item Value
Measured estate RAM (GiB) 34
BFT nodes in that measurement 48
GiB per BFT node (incl. its DB, share of overhead) 0.71
Estimated RAM for this package (GiB) 85
Package Builder — notes
Note
The ladder: each tier sits above the one it oversees, so its fault tolerance is never lower — n (and f) never decrease from member-classes to the top.
Gov-commercial and gov-regulators are always the same size; national-registry and power-funnel are always 13 (f=4).
f only holds if no single host / rack / zone carries more than f nodes of one mesh — one node per host is the ideal.
Minimum failure domains to survive losing one domain is ⌈n/f⌉ = 4 for every offered size.
Each node stays co-located with its own database; each auditor mesh needs its own spread, separate from the workload it audits.
Model split: one Juju model per real failure domain (datacentre / controller / custodian), never more than f nodes in any one. That needs ⌈n/f⌉ = 4 models at every offered size. The old '4, then +3' pattern halts on losing one domain at n = 7 and 10 (see TxRails_Model_Split_Decision.xlsx).
apps_per_model_split, given 4 model names, produces exactly these splits (7 → 2+2+2+1, 10 → 3+3+2+2, 13 → 4+3+3+3).
Max prefix length = 18 − len('patroni-') − digits in n (standup-auditor-mesh.sh's CN guard).
Valid Packages — every package the ladder allows (Member-classes ≤ Overseers ≤ Gov, both equal ≤ Registry = Funnel = 13)
Package Member-classes n Overseers n Gov-commercial n Gov-regulators n National-registry n Power-funnel n f per tier (mc / ovs / gov / reg / pf) Workload nodes Total BFT nodes (+ auditors) Databases Est. RAM (GiB) Ladder holds?
P1 7 7 10 10 13 13 2 / 2 / 3 / 4 / 4 60 120 120 85 yes
P2 7 7 13 13 13 13 2 / 2 / 4 / 4 / 4 66 132 132 93.50 yes
P3 7 10 10 10 13 13 2 / 3 / 3 / 4 / 4 63 126 126 89.25 yes
P4 7 10 13 13 13 13 2 / 3 / 4 / 4 / 4 69 138 138 97.75 yes
P5 7 13 13 13 13 13 2 / 4 / 4 / 4 / 4 72 144 144 102 yes
P6 10 10 10 10 13 13 3 / 3 / 3 / 4 / 4 66 132 132 93.50 yes
P7 10 10 13 13 13 13 3 / 3 / 4 / 4 / 4 72 144 144 102 yes
P8 10 13 13 13 13 13 3 / 4 / 4 / 4 / 4 75 150 150 106.25 yes
P9 13 13 13 13 13 13 4 / 4 / 4 / 4 / 4 78 156 156 110.50 yes
Customer Menu — what each size survives, in ladder order
Ladder step Tier Nodes (n) Faults tolerated (f) Agreement needs (2f+1) Auditor nodes Constraint Customer wording
1 Member-classes 7 2 5 7 Your choice 7 nodes: keeps running with up to 2 nodes failed or misbehaving
1 Member-classes 10 3 7 10 Your choice 10 nodes: keeps running with up to 3 nodes failed or misbehaving
1 Member-classes 13 4 9 13 Your choice 13 nodes: keeps running with up to 4 nodes failed or misbehaving
2 Overseers 7 2 5 7 At least the member-classes size 7 nodes: keeps running with up to 2 nodes failed or misbehaving
2 Overseers 10 3 7 10 At least the member-classes size 10 nodes: keeps running with up to 3 nodes failed or misbehaving
2 Overseers 13 4 9 13 At least the member-classes size 13 nodes: keeps running with up to 4 nodes failed or misbehaving
3 Gov-commercial 10 3 7 10 At least the overseers size; equal to gov-regulators 10 nodes: keeps running with up to 3 nodes failed or misbehaving
3 Gov-commercial 13 4 9 13 At least the overseers size; equal to gov-regulators 13 nodes: keeps running with up to 4 nodes failed or misbehaving
3 Gov-regulators 10 3 7 10 Same size as gov-commercial 10 nodes: keeps running with up to 3 nodes failed or misbehaving
3 Gov-regulators 13 4 9 13 Same size as gov-commercial 13 nodes: keeps running with up to 4 nodes failed or misbehaving
4 National-registry 13 4 9 13 Always 13 13 nodes: keeps running with up to 4 nodes failed or misbehaving
4 Power-funnel 13 4 9 13 Always 13 13 nodes: keeps running with up to 4 nodes failed or misbehaving
Min-Max Estates — smallest and largest estates
Tier Minimum n Maximum n
Member-classes 7 13
Overseers 7 13
Gov-commercial 10 13
Gov-regulators 10 13
National-registry 13 13
Power-funnel 13 13
Workload nodes 60 78
Auditor nodes 60 78
Total BFT nodes 120 156
Plus one database each (units) 240 312
Est. RAM (GiB), using Package Builder's GiB/node 85 110.50
Port Plan — one fixed NodePort block per tier and service. Overlap check: no overlaps; ports reserved: 279 of 2768
Tier Service Base port (input) Block reserved (input) Nodes (from Package Builder) Ports per node Ports needed Last port used Fits block? Today's base (dev) Overlaps another block?
Member-classes RPC (26657) 30700 20 7 1 7 30706 OK 30710 no
Overseers RPC (26657) 30720 20 7 1 7 30726 OK 30720 no
Gov-commercial RPC (gov-api 8081) 30740 20 10 1 10 30749 OK 30750 no
Gov-regulators RPC (gov-api 8081) 30760 20 10 1 10 30769 OK 30754 (suggested) no
National-registry RPC 30780 20 13 1 13 30792 OK none published no
Power-funnel RPC 30800 20 13 1 13 30812 OK charm-managed? no
Member-classes gRPC BlockService (50051) 30820 20 7 1 7 30826 OK 30820 no
Overseers gRPC BlockService (50051) 30840 20 7 1 7 30846 OK 30830 no
Gov-commercial gRPC 30860 20 10 1 10 30869 OK — no
Gov-regulators gRPC 30880 20 10 1 10 30889 OK — no
National-registry gRPC 30900 20 13 1 13 30912 OK — no
Power-funnel gRPC 30920 20 13 1 13 30932 OK — no
Member-classes DHT edge (webrtc/ws/addrs) 30940 39 7 3 21 30960 OK 30860 no
Script Mapping — mapping a size onto the deploy scripts
Script Size variable Multi-model support Must change before production
deploy-member-classes-int.sh BFT_NODE_APPS="bft-node0 … bft-node12" (a list, not a count) Single model today — production split needs multi-model support (4 models) bft_validators_required is not set by the script — set it to n. Also set CONTROLLER_DEMONSTRATOR and ORGSNODE_CHARM=orgsnode-txrails.
deploy-overseers-int.sh TOTAL_OVERSEERS + OVS_MODELS Yes: pass 4 model names in OVS_MODELS; apps_per_model_split gives 2+2+2+1 / 3+3+2+2 / 4+3+3+3 Fix the midx indexing bug in phases 3a/3c (gov script has the fix) before using more than one model.
deploy-gov-int.sh (×2) TOTAL_GOV + GOV_MODELS — same TOTAL_GOV for both runs (the ladder makes them equal) Yes: pass 4 model names in GOV_MODELS; same even split Distinct GOV_CHAIN_ID and GOV_PORT_BASE per mesh; one run per mesh; set CONTROLLER_CROSS_NETWORK and CLOUD_CROSS_NETWORK.
deploy-national-registry-int.sh TOTAL_REG=13 (fixed by the ladder) Not yet — needs multi-model support (4 models) for production Peer-relation loop should be j > i; one txrails/registry-tier label per node; confirm REG_MODEL (nat-reg vs national-registry).
deploy-power-funnel-int.sh TOTAL_PF=13 (fixed by the ladder) Not yet — needs multi-model support (4 models) for production Same loop fix; one txrails/tier label per node; new PF_CHAIN_ID (default is the abandoned power-funnel-1).
standup-auditor-mesh.sh N One model; pre-made machines = N Prefix ≤ 18 − 8 − digits(N) (8 characters at N ≥ 10); ENDPOINTS must list one target per node.
Breaks at 10+ — what breaks at 10 nodes and above
Issue Why What to do
NodePort collisions Today's bases are 10 apart: at n=13 member-classes RPC (30710–30722) runs into overseers (30720+), and member-classes gRPC (30820–30832) into overseers' 30830. DHT edge needs 3 ports per node (39 at n=13). Use the Port Plan sheet's blocks of 20, or move production auditors to load-balanced services.
Auditor database name length Two-digit node numbers add a character; standup-auditor-mesh.sh caps patroni-<prefix><i> at 18 characters. Keep auditor prefixes ≤ 8 characters (current aud-mc, aud-ovs, aud-gc, aud-gr, aud-nr, aud-pf all fit).
Wiring time A full mesh is n(n−1)/2 relations — 21 at 7, 45 at 10, 78 at 13 — each confirmed one at a time. Budget WAIT_TIMEOUT and stand-up windows accordingly.
Placement f holds only if no failure domain carries more than f nodes of one mesh; the estate once ran five of eight validators on one node. At least 4 failure domains per mesh (⌈n/f⌉); ideally one node per host; auditors spread separately.