Skip to content

Commit

Permalink
Merge pull request #150 from aws-samples/solana
Browse files Browse the repository at this point in the history
Solana
  • Loading branch information
frbrkoala authored Nov 20, 2024
2 parents e2a9a43 + 59893a0 commit e86263c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/solana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ This is the Well-Architected checklist for Solana nodes implementation of the AW
| | | Following principle of least privilege access | In all node types, root user is not used (using special user "solana" instead). |
| | Application security | Security focused development practices | cdk-nag is being used with appropriate suppressions. |
| Cost optimization | Service selection | Use cost effective resources | 1/ AMD-based instances are used for Consensus and RPC node to save the costs. Consider compiling Graviton-based binaries to improve costs for compute. 2/ Cost-effective EBS gp3 are preferred instead of io2. 3/ Solana nodes generate a substantial amount of outgoing data traffic, which deeds to be addressed with non-technical means like getting private agreements with AWS. |
| | Cost awareness | Estimate costs | Single RPC node with `r6a.8xlarge` EBS gp3 volumes about 2549 GB with On-Demand pricing will cost around US$1,596.43 per month in the US East (N. Virginia) region. More cost-optimal option with 3 year Compute Savings plan the cost goes down to $962.84 USD. Additionally, the data transfer costs can be about $1,356.80 USD per month for 15TB of outgoing traffic. |
| | Cost awareness | Estimate costs | Single RPC node with `r7a.12xlarge` EBS gp3 volumes about 2549 GB with On-Demand pricing will cost around US$2,665.67 per month in the US East (N. Virginia) region. More cost-optimal option with 3 year Compute Savings plan the cost goes down to $1,643.52 USD. Additionally, the data transfer costs can be about $1,356.80 USD per month for 15TB of outgoing traffic. Check pricing with [AWS Calculator](https://calculator.aws/) |
| Reliability | Resiliency implementation | Withstand component failures | This solution uses AWS Application Load Balancer with RPC nodes for high availability. Newly provisioned Solana nodes triggered by Auto Scaling get up and running in about 30-50 minutes. |
| | Data backup | How is data backed up? | Considering blockchain data is replicated by nodes automatically and Solana nodes sync from start within an hour, we don't use any additional mechanisms to backup the data. |
| | Resource monitoring | How are workload resources monitored? | Resources are being monitored using Amazon CloudWatch dashboards. Amazon CloudWatch custom metrics are being pushed via CloudWatch Agent. |
Expand All @@ -85,8 +85,8 @@ This is the Well-Architected checklist for Solana nodes implementation of the AW
| Usage pattern | Ideal configuration | Primary option on AWS | Data Transfer Estimates | Config reference |
|---|---|---|---|---|
| 1/ Consensus node | 48 vCPU, 384 GiB RAM, Accounts volume: 500GiB, 7K IOPS, 700 MB/s throughput, Data volume: 2TB, 9K IOPS, 700 MB/s throughput | r7a.12xlarge, Accounts volume: 500GiB, 7K IOPS, 700 MB/s throughput, Data volume: 2TB, 9K IOPS, 700 MB/s throughput | Proportional to the amount at stake. Between 200TB to 400TB/month | [.env-sample-consensus](./sample-configs/.env-sample-consensus) |
| 2/ Base RPC node (no secondary indexes) | 48 vCPU, 384 GiB RAM, Accounts volume: 500GiB, 7K IOPS, 700 MB/s throughput, Data volume: 2TB, 9K IOPS, 700 MB/s throughput | r7a.12xlarge, Accounts volume: 500GiB, 7K IOPS, 700 MB/s throughput, Data volume: 2TB, 9K IOPS, 700 MB/s throughput | 150-200TB/month (no staking) | [.env-sample-baserpc](./sample-configs/.env-sample-baserpc) |
| 3/ Extended RPC node (with all secondary indexes) | 96 vCPU, 768 GiB RAM, Accounts volume: 500GiB, 7K IOPS, 700 MB/s throughput, Data volume: 2TB, 9K IOPS, 700 MB/s throughput | r7a.24xlarge, Accounts volume: 500GiB, 7K IOPS, 700 MB/s throughput, Data volume: 2TB, 9K IOPS, 700 MB/s throughput | 150-200TB/month (no staking) | [.env-sample-extendedrpc](./sample-configs/.env-sample-extendedrpc) |
| 2/ Base RPC node (no secondary indexes) | 48 vCPU, 384 GiB RAM, Accounts volume: EBS gp3, 500GiB, 7K IOPS, 700 MB/s throughput, Data volume: EBS gp3, 2TB, 9K IOPS, 700 MB/s throughput | r7a.12xlarge, Accounts volume: EBS gp3, 500GiB, 7K IOPS, 700 MB/s throughput, Data volume: EBS gp3, 2TB, 9K IOPS, 700 MB/s throughput | 13-15TB/month (no staking) | [.env-sample-baserpc](./sample-configs/.env-sample-baserpc) |
| 3/ Extended RPC node (with all secondary indexes) | 96 vCPU, 768 GiB RAM, Accounts volume: 500GiB, 7K IOPS, 700 MB/s throughput, Data volume: 2TB, 9K IOPS, 700 MB/s throughput | r7a.24xlarge, Accounts volume: EBS io2, 500GiB, 7K IOPS, 700 MB/s throughput, Data volume: EBS gp3, 2TB, 9K IOPS, 700 MB/s throughput | 13-15TB/month (no staking) | [.env-sample-extendedrpc](./sample-configs/.env-sample-extendedrpc) |
</details>

## Setup Instructions
Expand Down
6 changes: 3 additions & 3 deletions lib/solana/sample-configs/.env-sample-extendedrpc
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ SOLANA_CPU_TYPE="x86_64" # All options: "x86_64", "ARM_64".
# Data volume configuration
SOLANA_DATA_VOL_TYPE="gp3" # Other options: "io1" | "io2" | "gp3" | "instance-store" . IMPORTANT: Use "instance-store" option only with instance types that support that feature, like popular for node im4gn, d3, i3en, and i4i instance families
SOLANA_DATA_VOL_SIZE="2000" # Current required data size to keep both smapshot archive and unarchived version of it
SOLANA_DATA_VOL_IOPS="9000" # Max IOPS for EBS volumes (not applicable for "instance-store")
SOLANA_DATA_VOL_IOPS="12000" # Max IOPS for EBS volumes (not applicable for "instance-store")
SOLANA_DATA_VOL_THROUGHPUT="700" # Max throughput for EBS gp3 volumes (not applicable for "io1" | "io2" | "instance-store")
# Accounts volume configuration
SOLANA_ACCOUNTS_VOL_TYPE="gp3" # Other options: "io1" | "io2" | "gp3" | "instance-store" . IMPORTANT: Use "instance-store" option only with instance types that support that feature, like popular for node im4gn, d3, i3en, and i4i instance families
SOLANA_ACCOUNTS_VOL_TYPE="io2" # Other options: "io1" | "io2" | "gp3" | "instance-store" . IMPORTANT: Use "instance-store" option only with instance types that support that feature, like popular for node im4gn, d3, i3en, and i4i instance families
SOLANA_ACCOUNTS_VOL_SIZE="500" # Current required data size to keep both smapshot archive and unarchived version of it
SOLANA_ACCOUNTS_VOL_IOPS="4000" # Max IOPS for EBS volumes (not applicable for "instance-store")
SOLANA_ACCOUNTS_VOL_IOPS="7000" # Max IOPS for EBS volumes (not applicable for "instance-store")
SOLANA_ACCOUNTS_VOL_THROUGHPUT="700" # Max throughput for EBS gp3 volumes (not applicable for "io1" | "io2" | "instance-store")
# Secrets configuration
SOLANA_NODE_IDENTITY_SECRET_ARN="none" # Optional. The ARN of the secret in AWS Secrets Manager with the node identity key pair. In case you want to provision a node but keep the old identity.
Expand Down

0 comments on commit e86263c

Please sign in to comment.