|
| 1 | +# Recommended design for DCL MainNet deployment on AWS |
| 2 | +## AWS deployment diagram |
| 3 | + |
| 4 | + |
| 5 | +## Recommended IaC structure and frameworks |
| 6 | + |
| 7 | +- [Ansible](https://www.ansible.com) - provision of the following node types: |
| 8 | + - `Genesis Validator` - Validator Node created at the beginning of a network |
| 9 | + - `Non-genesis Validator` - Validator Node joined a network after a significant time period |
| 10 | + - `Private Sentry` - Full Node to connect other(external) Validator Nodes ([Sentry Node Architecture](https://forum.cosmos.network/t/sentry-node-architecture-overview/454)) |
| 11 | + - `Public Sentry` - Full Node to connect other(external) Full Nodes |
| 12 | + - `Observer` - Full Node for serving gRPC / REST / RPC clients |
| 13 | + - `Seed` - Full Node for sharing IP addresses of `Public Sentry` Nodes ([Seed Node](https://docs.tendermint.com/master/nodes/#seed-nodes)) |
| 14 | + |
| 15 | + > **_Note:_** Most of the nodes should enable `state sync` to avoid catching up with a network from scratch. Refer to [running-node-in-existing-netwrok.md](./running-node-in-existing-network.md) for details. |
| 16 | +
|
| 17 | +- [Terraform](https://www.terraform.io) - deploy an AWS infrastructure from one or more of the following modules: |
| 18 | + - Validator - `Validator` node instance |
| 19 | + - Private Sentries - Cluster of `Private Sentry` node instances |
| 20 | + - Public Sentries - Cluster of `Public Sentry` node instances with a collocated `Seed` node |
| 21 | + - Observers - Cluster of `Observer` node instances |
| 22 | + - Load Balancers - AWS Network Load Balancers for load balancing between `Observer` clusters |
| 23 | + |
| 24 | + |
| 25 | +## Node specific AWS and DCL configurations |
| 26 | + |
| 27 | +### Validator Node: |
| 28 | +- Tendermint: |
| 29 | + - [config.toml] |
| 30 | + - [p2p] |
| 31 | + - `pex` = false |
| 32 | + - `persistent_peers` = [`Private Sentry` nodes with private IPs] |
| 33 | + - `addr_book_strict` = false |
| 34 | + - [statesync] (only for `Non-genesis Validator` nodes) |
| 35 | + - `enable` = true |
| 36 | + - `rpc_servers` = [existing `Genesis Validator` / `Sentry` nodes' RPC endpoints] |
| 37 | + - `trust_height` = trust-height |
| 38 | + - `trust_hash` = trust-hash |
| 39 | + - [app.toml] |
| 40 | + - [state-sync] |
| 41 | + - `snapshot-interval` = snapshot-interval |
| 42 | + - `snapshot-keep-recent` = snapshot-keep-recent |
| 43 | + |
| 44 | +- AWS: |
| 45 | + - Instance type = EC2 instance |
| 46 | + - Network: |
| 47 | + - Private IPv4 = IPv4 address |
| 48 | + - Public IPv4 = not assigned |
| 49 | + - Security: |
| 50 | + - inbound: |
| 51 | + - allow `Tendermint p2p` port from `Private Sentry` Nodes' VPC CIDR |
| 52 | + - allow `RPC` port from `Private Sentry` Nodes' VPC CIDR |
| 53 | + - outbound: |
| 54 | + - all |
| 55 | + |
| 56 | + |
| 57 | +### Private Sentry Node: |
| 58 | +- Tendermint: |
| 59 | + - [config.toml] |
| 60 | + - [p2p] |
| 61 | + - `pex` = true |
| 62 | + - `persistent_peers` = [`Validator` node with private IP + other orgs' validator/sentry nodes with public IPs] |
| 63 | + - `private_peer_ids` = [`Validator` node id] |
| 64 | + - `unconditional_peers` = [`Validator` node id] |
| 65 | + - `addr_book_strict` = false |
| 66 | + - [statesync] |
| 67 | + - `enable` = true |
| 68 | + - `rpc_servers` = [`Validator` node's RPC endpoint] |
| 69 | + - `trust_height` = trust-height |
| 70 | + - `trust_hash` = trust-hash |
| 71 | + - [app.toml] |
| 72 | + - [state-sync] |
| 73 | + - `snapshot-interval` = snapshot-interval |
| 74 | + - `snapshot-keep-recent` = snapshot-keep-recent |
| 75 | +- AWS: |
| 76 | + - Instance type = EC2 instance |
| 77 | + - Network: |
| 78 | + - Private IPv4 = IPv4 address |
| 79 | + - Public IPv4 = Elastic IP |
| 80 | + - Security: |
| 81 | + - inbound: |
| 82 | + - allow `Tendermint p2p` port for whitelist IPs |
| 83 | + - allow `RPC` port from `Observer` Nodes' VPC CIDR |
| 84 | + - allow `RPC` port from `Public Sentry` Nodes' VPC CIDR |
| 85 | + - outbound: |
| 86 | + - all |
| 87 | + |
| 88 | +### Observer Node: |
| 89 | +- Tendermint: |
| 90 | + - [config.toml] |
| 91 | + - [p2p] |
| 92 | + - `pex` = true |
| 93 | + - `persistent_peers` = [`Private Sentry` nodes with private IPs] |
| 94 | + - `addr_book_strict` = false |
| 95 | + - [statesync] |
| 96 | + - `enable` = true |
| 97 | + - `rpc_servers` = [`Private Sentry` nodes' RPC endpoints] |
| 98 | + - `trust_height` = trust-height |
| 99 | + - `trust_hash` = trust-hash |
| 100 | + - [app.toml] |
| 101 | + - [api] |
| 102 | + - `enable` = true |
| 103 | +- AWS: |
| 104 | + - Instance type = EC2 instance |
| 105 | + - Network: |
| 106 | + - Private IPv4 = IPv4 address |
| 107 | + - Public IPv4 = not assigned |
| 108 | + - Security: |
| 109 | + - inbound: |
| 110 | + - allow gRPC / REST / RPC ports from the same VPC CIDR |
| 111 | + - outbound: |
| 112 | + - all |
| 113 | + |
| 114 | +### Public Sentry Node: |
| 115 | +- Tendermint: |
| 116 | + - [config.toml] |
| 117 | + - [p2p] |
| 118 | + - `pex` = true |
| 119 | + - `persistent_peers` = [`Private Sentry` nodes with private IPs] |
| 120 | + - [statesync] |
| 121 | + - `enable` = true |
| 122 | + - `rpc_servers` = [`Private Sentry` nodes' RPC endpoints] |
| 123 | + - `trust_height` = trust-height |
| 124 | + - `trust_hash` = trust-hash |
| 125 | + - [app.toml] |
| 126 | + - [state-sync] |
| 127 | + - `snapshot-interval` = snapshot-interval |
| 128 | + - `snapshot-keep-recent` = snapshot-keep-recent |
| 129 | +- AWS: |
| 130 | + - Instance type = EC2 instance |
| 131 | + - Network: |
| 132 | + - Private IPv4 = IPv4 address |
| 133 | + - Public IPv4 = Elastic IP |
| 134 | + - Security: |
| 135 | + - inbound: |
| 136 | + - allow `Tendermint p2p` port from anywhere |
| 137 | + - allow `Tendermint RPC` port from anywhere |
| 138 | + - outbound: |
| 139 | + - all |
| 140 | + |
| 141 | + |
| 142 | +### Seed Node: |
| 143 | +- Tendermint: |
| 144 | + - [config.toml] |
| 145 | + - [p2p] |
| 146 | + - `pex` = true |
| 147 | + - `seed_mode` = true |
| 148 | + - `persistent_peers` = [`Public Sentry` nodes with public IP] |
| 149 | + - [statesync] |
| 150 | + - `enable` = true |
| 151 | + - `rpc_servers` = [`Private Sentry` nodes' RPC endpoints] |
| 152 | + - `trust_height` = trust-height |
| 153 | + - `trust_hash` = trust-hash |
| 154 | +- AWS: |
| 155 | + - Instance type = EC2 instance |
| 156 | + - Network: |
| 157 | + - Private IPv4 = IPv4 address |
| 158 | + - Public IPv4 = Elastic IP |
| 159 | + - Public DNS = optional |
| 160 | + - Security: |
| 161 | + - inbound: |
| 162 | + - allow `Tendermint p2p` port from everywhere |
| 163 | + - outbound: |
| 164 | + - all |
| 165 | + |
| 166 | +### Load Balancer: |
| 167 | +- AWS: |
| 168 | + - Instance type = Elastic Network Load Balancer |
| 169 | + - Availability Zones = [availability zones of observer nodes from the same region] |
| 170 | + - Network: |
| 171 | + - Private IPv4 = IPv4 address |
| 172 | + - Public IPv4 = not assigned |
| 173 | + - Public DNS = assigned by AWS |
| 174 | + |
| 175 | + - Target groups: |
| 176 | + - gRPC |
| 177 | + - Registered targets = [observer nodes from all availability zones in the same region] |
| 178 | + - Attributes: |
| 179 | + - `Preserve client IP addresses` = disabled |
| 180 | + - Health checks: |
| 181 | + - protocol = TCP |
| 182 | + - REST |
| 183 | + - Registered targets = [observer nodes from all availability zones in the same region] |
| 184 | + - Attributes: |
| 185 | + - `Preserve client IP addresses` = disabled |
| 186 | + - Health checks: |
| 187 | + - protocol = TCP |
| 188 | + - RPC |
| 189 | + - Registered targets = [observer nodes from all availability zones the same region] |
| 190 | + - Attributes: |
| 191 | + - `Preserve client IP addresses` = disabled |
| 192 | + - Health checks: |
| 193 | + - protocol = TCP |
| 194 | + |
| 195 | + - Listeners: |
| 196 | + - gRPC |
| 197 | + - Protocol = TLS |
| 198 | + - Forward to = gRPC target group |
| 199 | + - Security policy = ELBSecurityPolicy-TLS13-1-2-2021-06 |
| 200 | + - Default SSL/TLS certificate = CA signed TLS certificate |
| 201 | + - REST |
| 202 | + - Protocol = TLS |
| 203 | + - Forward to = REST target group |
| 204 | + - Security policy = ELBSecurityPolicy-TLS13-1-2-2021-06 |
| 205 | + - Default SSL/TLS certificate = CA signed TLS certificate |
| 206 | + - RPC |
| 207 | + - Protocol = TLS |
| 208 | + - Forward to = RPC target group |
| 209 | + - Security policy = ELBSecurityPolicy-TLS13-1-2-2021-06 |
| 210 | + - Default SSL/TLS certificate = CA signed TLS certificate |
0 commit comments