<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by David Mehi on Medium]]></title>
        <description><![CDATA[Stories by David Mehi on Medium]]></description>
        <link>https://medium.com/@DavidMehi?source=rss-4198695ee5b1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XCsDNaR3Wwxjd0n6YxC2rQ.jpeg</url>
            <title>Stories by David Mehi on Medium</title>
            <link>https://medium.com/@DavidMehi?source=rss-4198695ee5b1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 16:17:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@DavidMehi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Running Solana Nodes on GCP — Updated December 2025]]></title>
            <link>https://medium.com/@DavidMehi/running-solana-nodes-on-gcp-updated-december-2025-3cfb063e3779?source=rss-4198695ee5b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/3cfb063e3779</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[solana-blockchain]]></category>
            <category><![CDATA[solana-network]]></category>
            <dc:creator><![CDATA[David Mehi]]></dc:creator>
            <pubDate>Fri, 05 Dec 2025 16:40:13 GMT</pubDate>
            <atom:updated>2025-12-05T16:40:13.845Z</atom:updated>
            <content:encoded><![CDATA[<h3>Running Solana Nodes on GCP — Updated December 2025</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yDe2qbu0NKQq1xxCg61FOA.jpeg" /><figcaption>Solana node on GCP</figcaption></figure><h3>Introduction</h3><p>Solana is one of the top blockchain networks in market cap, number of transactions and total value locked. It is also one of the high performance blockchains, theoretically achieving 100k/TPS, which means the nodes that operate the network have high hardware <a href="https://docs.solana.com/running-validator/validator-reqs#hardware-recommendations">requirements</a>. Typically, those kinds of nodes are run on bare metal servers because you have direct access to the CPU and can squeeze more performance out of the hardware.</p><p>However, more blockchain nodes are moving to the cloud due to its ease of use, reliable networking, and enterprise level hosting services and tools. Our Web3 team at Google Cloud have been running Solana RPC and Validator nodes on GCP and I would like to share the configuration we used. <em>Note that the commands show Solana version 2.3.*, but this will also work with v3.0.*.</em></p><h3>VM Specs</h3><p>Running Solana nodes need specific VM requirements in order for the node to “keep up with the network”. After much experimentation, these are the VM and storage specifications that worked best for us. There has been an increase in traffic on the network due to Solana’s popularity, requiring more powerful compute to compete on the network. GCP has also released additional compute options for us to choose from.</p><p><strong>Recommended Specs</strong></p><ul><li>CPU: <strong>c3d-highmem-90-lssd</strong></li><li>CPU Settings: AMD Genoa, 90 vCPU (2vCPU/core)</li><li>RAM: 720GB</li><li>Networking: gVNIC</li><li>Storage:</li><li>Boot disk: 500GB PD SSD (Bootdisk)</li><li>Ledger disks: LocalSSD 3TB (8x375GB)</li><li>OS: Ubuntu 24.04 LTS (x86/64)</li></ul><p>When creating the VM, choose C3D. Under “Machine type”, choose Preset and c3d-highmem-90-lssd from the dropdown option. Expand “Advanced Configurations” for CPU platform and vCPU ratio settings. Under “CPU Platform”, choose “AMD Genoa or later”. For “vCPUs to core ratio”, choose “2 vCPU per core”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*vQa2WouISMDbbFIcLcrQkg.png" /><figcaption>GCP console for creating a VM instance</figcaption></figure><p><strong>The following configurations also work, it’s a matter of balancing price, performance and region.</strong></p><ul><li><strong>c4d-highmem-64-lssd</strong> (AMD Turin), 504GB RAM, 1 vCPU/per core</li><li>Storage:</li><li>Boot disk: 500GB PD SSD (Bootdisk)</li><li>Ledger disks: LocalSSD 2.25TB (6x375GB)</li><li><strong>c4d-highmem-64</strong>, 504GB RAM, 1 vCPU/per core</li><li>Hyperdisk balanced 4TB: IOPS: 100,000; Provisioned throughput: 2,400</li><li><strong>c4d-highmem-96</strong>, 756GB TAM, 1 vCPU/per core</li><li>Storage:</li><li>Boot disk: 500GB PD SSD (Bootdisk)</li><li>Ledger disks: LocalSSD 2.25TB (6x375GB)</li></ul><h3>VM Networking</h3><p>Solana uses the following ports. Configure a <a href="https://cloud.google.com/vpc/docs/firewalls">firewall</a> to allow these ports access to the VM. This article assumes that the VM is a VM with a public IP address, but you could make the VM private, and expose the ports through an external load balancer, domain name and certificate. There are other ways to do networking in GCP that better secure the node.</p><ul><li>RPC Port: 8899 TCP</li><li>Websocket Port: 8900 TCP</li><li>Gossip Port: 8001 TCP/UDP</li><li>Dynamic Port Range: 8000–8020 TCP/UDP</li></ul><p>To apply the firewall, on the VM, add a networking tag of “solana-node”. Use this same tag in the firewall definition so the firewall rule and the VM match up.</p><h3>VM Setup</h3><p>Once you have created the VM, follow these instructions to set up the VM. You will need to mount the localSSD drives and install the necessary software. In our <a href="https://medium.com/@DavidMehi/running-solana-nodes-on-gcp-e9534fe9015d">previous Solana recommendation</a>, we recommended a swapfile. However, since there is more than enough RAM on this VM, we don’t need a swapfile. If you have less than 512GB RAM, it is recommended to use a swap file.</p><ol><li>SSH into the VM. Click the “ssh” dropdown on the VM.</li><li>Create a solana linux user to run the Solana validator under.</li></ol><pre># Example:<br>sudo useradd -m solana<br>sudo usermod -aG sudo solana<br>sudo usermod -aG google-sudoers solana<br># to default user to use bash, update the new user&#39;s entry in the file: /etc/passwd<br># Update solana user to use /bin/bash<br>chsh -s /bin/bash solana</pre><p>3. Switch to the solana user</p><pre>sudo su - solana</pre><p>4. Update the OS</p><pre>sudo apt-get update -y</pre><p>5. Mount localSSD drives. There are 8 localSSD drives. (adjust commands to the number of localSSD drives) These drives need to be raided together and then mounted to give us the storage that we need. We are going to group them and mount them separately. We get better performance with Solana if the drives are treated separately. See <a href="https://cloud.google.com/compute/docs/disks/add-local-ssd">docs here</a>. Note that the snapshot drive can be moved to the boot disk if needed.</p><pre>sudo apt update -y &amp;&amp; sudo apt install mdadm --no-install-recommends -y<br>df -h<br>lsblk<br>find /dev/ | grep google-local-nvme-ssd<br><br># Groups drives for the ledger<br>sudo mdadm - create /dev/md0 - level=0 - raid-devices=3 \<br>/dev/disk/by-id/google-local-nvme-ssd-0 \<br>/dev/disk/by-id/google-local-nvme-ssd-1 \<br>/dev/disk/by-id/google-local-nvme-ssd-2<br><br># Groups drives for the accounts<br>sudo mdadm - create /dev/md1 - level=0 - raid-devices=3 \<br>/dev/disk/by-id/google-local-nvme-ssd-3 \<br>/dev/disk/by-id/google-local-nvme-ssd-4 \<br>/dev/disk/by-id/google-local-nvme-ssd-5<br><br># Groups drives for the snapshots<br>sudo mdadm - create /dev/md2 - level=0 - raid-devices=2 \<br>/dev/disk/by-id/google-local-nvme-ssd-6 \<br>/dev/disk/by-id/google-local-nvme-ssd-7<br><br># Formats the drives<br>sudo mkfs.ext4 -F /dev/md0<br>sudo mkfs.ext4 -F /dev/md1<br>sudo mkfs.ext4 -F /dev/md2<br><br># Creates the mounted drives<br>sudo mkdir -p /mnt/disks/solana-ledger<br>sudo mkdir -p /mnt/disks/solana-accounts<br>sudo mkdir -p /mnt/disks/solana-snapshots<br><br># Mounts the drives<br>sudo mount /dev/md0 /mnt/disks/solana-ledger<br>sudo mount /dev/md1 /mnt/disks/solana-accounts<br>sudo mount /dev/md2 /mnt/disks/solana-snapshots<br><br># Updates permissions<br>sudo chmod a+w /mnt/disks/solana-ledger<br>sudo chmod a+w /mnt/disks/solana-accounts<br>sudo chmod a+w /mnt/disks/solana-snapshots<br><br># Changes ownership<br>sudo chown solana:solana /mnt/disks/solana-ledger<br>sudo chown solana:solana /mnt/disks/solana-accounts<br>sudo chown solana:solana /mnt/disks/solana-snapshots<br><br>ls -la /mnt/disks<br><br># Adds the entry to /etc/fstab<br>echo UUID=`sudo blkid -s UUID -o value /dev/md0` /mnt/disks/solana-ledger ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab<br>echo UUID=`sudo blkid -s UUID -o value /dev/md1` /mnt/disks/solana-accounts ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab<br>echo UUID=`sudo blkid -s UUID -o value /dev/md2` /mnt/disks/solana-snapshots ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab<br>systemctl daemon-reload<br><br># Confirm that all of the drives are there<br>df -h</pre><p>6. Tune the OS for Solana. Run these commands to configure these settings. The solana <a href="https://docs.solanalabs.com/operations/setup-a-validator#system-tuning">tuning guide</a> is here.</p><pre>sudo bash -c &quot;cat &gt;/etc/sysctl.d/21-solana-udp-buffers.conf &lt;&lt;EOF<br># Increase UDP buffer size<br>net.core.rmem_default = 134217728<br>net.core.rmem_max = 134217728<br>net.core.wmem_default = 134217728<br>net.core.wmem_max = 134217728<br>EOF&quot;<br><br>sudo sysctl -p /etc/sysctl.d/21-solana-udp-buffers.conf<br>sudo bash -c &quot;cat &gt;/etc/sysctl.d/21-solana-mmaps.conf &lt;&lt;EOF<br># Increase memory mapped files limit<br>vm.max_map_count = 1000000<br>EOF&quot;<br><br>sudo sysctl -p /etc/sysctl.d/21-solana-mmaps.conf<br>sudo bash -c &quot;cat &gt;&gt; /etc/systemd/system.conf &lt;&lt;EOF<br>DefaultLimitNOFILE=1000000<br>EOF&quot;<br><br>sudo systemctl daemon-reload<br><br>sudo bash -c &quot;cat &gt;/etc/security/limits.d/90-solana-nofiles.conf &lt;&lt;EOF<br># Increase process file descriptor count limit<br>* - nofile 1000000<br>EOF&quot;</pre><h3>Solana Installation</h3><p>Once the VM has started, ssh into the VM. Do the following to install Solana. Once solana is installed, run the command “solana cluster-version” to get the version of the network. Note that if you find that the network is using a newer version than what you installed, run the install command again using the version that matches the network.</p><p>See Solana docs for more information about <a href="https://docs.solana.com/cli/install-solana-cli-tools#macos--linux">installing</a> and <a href="https://docs.solana.com/running-validator/validator-start">preparing</a> the validator.</p><pre># Install GCP Ops agent<br>curl -sSO https://dl.google.com/cloudagents/add-google-cloud-ops-agent-repo.sh<br>sudo bash add-google-cloud-ops-agent-repo.sh - also-install<br><br># Install Solana CLI - Adjust Solana version to the version of the network<br>sh -c &quot;$(curl -sSfL https://release.anza.xyz/v2.3.13/install)&quot;<br><br># Put solana in path<br>export PATH=&quot;~/.local/share/solana/install/active_release/bin:$PATH&quot;<br><br># Set config variable<br>export SOLANA_METRICS_CONFIG=&quot;host=https://metrics.solana.com:8086,db=mainnet-beta,u=mainnet-beta_write,p=password&quot;<br><br># Set mainnet api endpoint<br>solana config set - url https://api.mainnet-beta.solana.com<br><br># Run cluster-version command to find out version of the cluster. Try running it a few times to get a consistent result. If the version does not match what you installed, run the installation command again, matching the version number<br>solana - version<br>solana cluster-version<br><br># If they don&#39;t match, run this install command again, using the matching version number of cluster-version<br>sh -c &quot;$(curl -sSfL https://release.anza.xyz/v2.3.13/install)&quot;<br><br># If you do not have a key for this node, create an identity keypair. Record this information in a safe place<br>echo &quot;Record this data …&quot;<br>echo &quot;Create identity keypair&quot;<br>mkdir -p ~/.config/solana/keys<br>solana-keygen new - no-bip39-passphrase -o ~/.config/solana/keys/validator-keypair.json<br>solana-keygen pubkey ~/.config/solana/keys/validator-keypair.json<br>echo &quot;Use keypair&quot;<br>solana config set - keypair ~/.config/solana/keys/validator-keypair.json</pre><p>If you are running a Solana RPC node, just the validator-keypair key is good. If you are running a validator, see <a href="https://docs.solana.com/running-validator/validator-start#create-authorized-withdrawer-account">the docs</a> for creating the necessary keys. If staking, see<a href="https://docs.solana.com/running-validator/validator-stake#create-stake-keypair"> these docs</a>.</p><p><strong>As always, store the seed phrase and keys in a safe place.</strong></p><h3>Starting the Solana Validator</h3><p>Use the following commands to start the validator. This can be put into a script and run. I tend to use a folder from the home folder called “bin”. This makes it easy to find the executional scripts and log files.</p><pre>mkdir ~/bin<br>mkdir ~/bin/logs</pre><p>This doc shows how to <a href="https://docs.solana.com/running-validator/validator-start#systemd-unit">configure</a> it to run like a service (systemd unit) on the VM.</p><p>Many of these runtime <a href="https://docs.solana.com/running-validator/validator-start">options</a> are covered in the Solana documentation (<a href="https://docs.solana.com/clusters#mainnet-beta">cluster info</a>, <a href="https://docs.solana.com/running-validator/validator-start">starting</a>).</p><p>To run strictly as an RPC node, use the following settings.</p><pre>--identity ~/validator-keypair.json<br>--no-voting<br>--enable-rpc-transaction-history<br>--full-rpc-api<br>#If you want a public rpc, remove the flag - private-rpc</pre><p>To run as a validator, use the following settings.</p><ul><li>Remove the “ — no-voting flag”</li><li>— vote-account ~/vote-account-keypair.json</li><li>— private-rpc</li></ul><p>Adjust the paths of — accounts, — ledger, –snapshots and — log to match the mounted folders. Adjust the path of the json keys to match your environment.</p><pre># Mainnet<br>========<br><br><br>#!/bin/bash<br># Set config variable<br>export SOLANA_METRICS_CONFIG=&quot;host=https://metrics.solana.com:8086,db=mainnet-beta,u=mainnet-beta_write,p=password&quot;<br><br># Set Mainnet api endpoint<br>solana config set - url https://api.mainnet-beta.solana.com<br><br>#Mainnet RPC node<br>exec agave-validator \<br> - identity /home/solana/.config/solana/keys/identity.json \<br> - no-voting \<br> - known-validator 7Np41oeYqPefeNQEHSv1UDhYrehxin3NStELsSKCT4K2 \<br> - known-validator GdnSyH3YtwcxFvQrVVJMm1JhTS4QVX7MFsX56uJLUfiZ \<br> - known-validator DE1bawNcRJB9rVm3buyMVfr8mBEoyyu73NBovf2oXJsJ \<br> - known-validator CakcnaRDHka2gXyfbEd2d3xsvkJkqsLw2akB3zsN1D2S \<br> - accounts /mnt/disks/solana-accounts \<br> - ledger /mnt/disks/solana-ledger \<br> - only-known-rpc \<br> - rpc-port 8899 \<br> - private-rpc \<br> - full-rpc-api \<br> - enable-rpc-transaction-history \<br> - gossip-port 8001 \<br> - dynamic-port-range 8000–8020 \<br> - entrypoint entrypoint.mainnet-beta.solana.com:8001 \<br> - entrypoint entrypoint2.mainnet-beta.solana.com:8001 \<br> - entrypoint entrypoint3.mainnet-beta.solana.com:8001 \<br> - entrypoint entrypoint4.mainnet-beta.solana.com:8001 \<br> - entrypoint entrypoint5.mainnet-beta.solana.com:8001 \<br> - expected-genesis-hash 5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d \<br> - wal-recovery-mode skip_any_corrupted_record \<br> - limit-ledger-size \<br> - minimal-snapshot-download-speed 500 \<br> - incremental-snapshot-archive-path /mnt/disks/solana-snapshots \<br> - snapshots /mnt/disks/solana-snapshots \<br> - full-snapshot-interval-slots 9000 \<br> - maximum-full-snapshots-to-retain 5 \<br> - replay-slots-concurrently \<br> - use-snapshot-archives-at-startup when-newest \<br> - account-index program-id spl-token-owner spl-token-mint \<br> - account-index-exclude-key kinXdEcpDQeHPEuQnqmUgtYykqKGVFq6CeVX5iAHJq6 \<br> - account-index-exclude-key TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA \<br> - enable-cpi-and-log-storage \<br> - log /home/solana/bin/logs/solana-validator.log<br></pre><p>Take this section starting with Mainnet and copy into this bash script.<br>“run-mainnet-validator.sh”</p><pre>#!/bin/bash<br># Set config variable<br>export SOLANA_METRICS_CONFIG=&quot;host=https://metrics.solana.com:8086,db=mainnet-beta,u=mainnet-beta_write,p=password&quot;<br><br># Set testnet api endpoint<br>solana config set - url https://api.mainnet-beta.solana.com<br>exec agave-validator \<br>…</pre><p>Using a linux service example</p><h3>SystemCtl</h3><p>sol.service</p><pre># copy to /etc/systemd/system/<br>[Unit]<br>Description=Solana Validator<br>After=network.target<br>#Wants=solana-sys-tuner.service<br>StartLimitIntervalSec=0<br><br>[Service]<br>Type=simple<br>Restart=always<br>RestartSec=1<br>User=solana<br>LimitNOFILE=1000000<br>LogRateLimitIntervalSec=0<br>Environment=&quot;PATH=/home/solana/.local/share/solana/install/active_release/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin&quot;<br>ExecStart=/home/solana/bin/run-mainnet-validator.sh<br><br>[Install]<br>WantedBy=multi-user.target</pre><p><strong>Commands</strong></p><pre>sudo cp sol.service /etc/systemd/system/<br>sudo systemctl daemon-reload<br>sudo systemctl enable sol<br>sudo systemctl status sol<br>sudo systemctl stop sol<br>sudo systemctl start sol<br># Show solana jobs<br>ps -A | grep sol</pre><h3>Log Rotation</h3><p>The log files can get very large. It is recommended to configure log rotation.</p><pre># ~/bin/logrotate.sol<br>/home/solana/bin/logs/solana-validator.log {<br> rotate 7<br> daily<br> missingok<br> postrotate<br> systemctl kill -s USR1 sol.service<br> endscript<br>}<br><br>sudo cp logrotate.sol /etc/logrotate.d/sol<br>sudo systemctl stop logrotate.service<br>sudo systemctl start logrotate.service</pre><h3>Checking Status</h3><p>Check the log file with this command</p><pre>tail -f ~/bin/logs/solana-validator.log</pre><p>To see the status of the node and if it has caught up with the network yet, use this command. If it fails with a connection error, try again later. The node needs to download the latest part of the chain first before opening its RPC port.</p><pre>solana catchup - follow - our-localhost 8899</pre><p>The client will need some time to catch up to the network. We’ve seen this happen within 45 minutes to several hours. If it does not catch up in 24 hours, and falls further behind, then something is wrong. Either the VM is not powerful enough or there are some network issues.</p><p><strong>Note that this is the main way that you can tell your VM configuration is powerful enough to support Solana. If the node cannot consistently keep up with the network, then it is not powerful enough.</strong></p><h3>Testing</h3><p>Here are other curl calls to check the status. See the RPC API <a href="https://docs.solana.com/developing/clients/jsonrpc-api">docs</a> for more information.</p><pre>export IP_ADDRESS=localhost<br>export PORT=8899<br>curl -X POST http://$IP_ADDRESS:$PORT -d &#39;{ &quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 1, &quot;method&quot;: &quot;getHealth&quot;, &quot;params&quot;: []}&#39; -H &quot;Content-Type: application/json&quot;<br>curl -X POST http://$IP_ADDRESS:$PORT -d &#39;{ &quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 1, &quot;method&quot;: &quot;getBlockHeight&quot;, &quot;params&quot;: []}&#39; -H &quot;Content-Type: application/json&quot;</pre><h3>Logging/Monitoring/Alerts</h3><p>You can <a href="https://cloud.google.com/logging/docs/agent/ops-agent/configuration">configure</a> the logging ops agent to send the solana validator logs to Cloud Logging.</p><p>Metrics of the VM can be found in the GCP console under Cloud <a href="https://cloud.google.com/monitoring/agent/process-metrics">Monitoring</a>.</p><p><a href="https://cloud.google.com/monitoring/alerts">Alerts</a> can be configured (such as high RAM usage, storage, etc). HTTP uptime checks can be <a href="https://cloud.google.com/monitoring/uptime-checks/introduction">configured</a> as well.</p><p>Here is a <a href="https://cloud.google.com/monitoring/monitor-compute-engine-virtual-machine">quickstart guide</a> on configuring monitoring for a VM in GCP.</p><p><a href="https://github.com/Chainflow/solana-mission-control">Solana mission control</a> can be used to capture validator metrics and store in prometheus with grafana dashboards.</p><h3>Solana Public Datasets &amp; Helm Charts</h3><p>We leverage a GCP Partner to operate &amp; maintain the Solana node &amp; pipeline infrastructure supporting Solana on BigQuery (<a href="https://cloud.google.com/application/web3/discover">Cloud Web3 Portal</a> | <a href="https://console.cloud.google.com/marketplace/product/bigquery-public-data/crypto-solana-mainnet-us">Solana Public Dataset</a> )</p><p><strong>We have a fully end-to-end Terraform + Helm chart for anyone to spin up and operate a Solana node + data pipeline</strong>. Follow the guide here:</p><ul><li><a href="https://github.com/blockchain-etl/solana-etl/tree/main/iac">https://github.com/blockchain-etl/solana-etl/tree/main/iac</a></li></ul><p>The Solana public dataset node runs in an external project <a href="https://pantheon.corp.google.com/welcome?project=solana-bq">solana-bq</a> across 4x GCE VMs. It is recommend to increase the VM specs for the solana node to match the specs specified in the first part of this article. The n2-highmem-64 machine will struggle with keeping up with the network.</p><ul><li>Solana Node, n2-highmem-64 with 16x 375GB local SSDs NVME (6TB, total)</li><li>Rabbit MQ, n2-standard-8</li><li>HA-proxy, n2-standard-2</li><li>Etl-app, n2d-standard-32</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rhe2-owVMe_S3BeAxanf5w.png" /></figure><p>More details available at <a href="https://github.com/blockchain-etl/solana-etl">https://github.com/blockchain-etl/solana-etl</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3cfb063e3779" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Gateway Controller Resources]]></title>
            <link>https://medium.com/@DavidMehi/kubernetes-gateway-controller-resources-5a8592461c22?source=rss-4198695ee5b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a8592461c22</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[gateway-controller]]></category>
            <category><![CDATA[gke]]></category>
            <dc:creator><![CDATA[David Mehi]]></dc:creator>
            <pubDate>Fri, 27 Oct 2023 18:16:50 GMT</pubDate>
            <atom:updated>2023-10-27T18:16:50.181Z</atom:updated>
            <content:encoded><![CDATA[<p>The following are links about how the new Kubernetes Gateway Controller is implemented in GKE.</p><p><strong>Ingress</strong></p><ul><li><a href="https://cloud.google.com/kubernetes-engine/docs/concepts/ingress">https://cloud.google.com/kubernetes-engine/docs/concepts/ingress</a></li><li><a href="https://medium.com/google-developer-experts/getting-started-with-gke-gateway-controller-ee45c3bc8996">https://medium.com/google-developer-experts/getting-started-with-gke-gateway-controller-ee45c3bc8996</a></li></ul><p><strong>Gateway</strong></p><ul><li><a href="https://medium.com/google-cloud/kubernetes-ingress-vs-gateway-api-647ee233693d">https://medium.com/google-cloud/kubernetes-ingress-vs-gateway-api-647ee233693d</a></li><li><a href="https://cloud.google.com/kubernetes-engine/docs/concepts/gateway-api">https://cloud.google.com/kubernetes-engine/docs/concepts/gateway-api</a></li><li><a href="https://gateway-api.sigs.k8s.io/">https://gateway-api.sigs.k8s.io/</a></li><li><a href="https://medium.com/google-cloud/exposing-applications-with-gke-gateway-controller-bad99154ce2">https://medium.com/google-cloud/exposing-applications-with-gke-gateway-controller-bad99154ce2</a></li><li><a href="https://www.youtube.com/watch?v=GiFQNevrxYA">https://www.youtube.com/watch?v=GiFQNevrxYA</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a8592461c22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running Solana Nodes on GCP]]></title>
            <link>https://medium.com/@DavidMehi/running-solana-nodes-on-gcp-e9534fe9015d?source=rss-4198695ee5b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9534fe9015d</guid>
            <category><![CDATA[solana-network]]></category>
            <category><![CDATA[blockchain-node]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[David Mehi]]></dc:creator>
            <pubDate>Thu, 03 Nov 2022 19:54:10 GMT</pubDate>
            <atom:updated>2022-11-07T16:12:17.672Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*YkOpmSfzYYXa2i5iyGfOSQ.jpeg" /><figcaption>Blockchain Nodes on Google Cloud</figcaption></figure><p>Solana is one of the top blockchain networks in market cap, number of transactions and total value locked. It is also one of the highest performance blockchains, theoretically achieving 65k/TPS, which means the nodes that operate the network have high hardware <a href="https://docs.solana.com/running-validator/validator-reqs#hardware-recommendations">requirements</a>. Typically, those kinds of nodes are run on bare metal servers because you have direct access to the CPU and can squeeze more performance out of the hardware.</p><p>However, more blockchain nodes are moving to the cloud due to its ease of use, reliable networking, and enterprise level hosting services and tools. According to a recent <a href="https://twitter.com/theSamPadilla/status/1587898966540419073">tweet</a> put out by Sam Padilla, over 65% of the Solana network stake is hosted on Hetzner, Equinix and AWS. With Hetzner recently clamping down on blockchain related nodes, that is negatively impacting over 20% of the Solana network.</p><p>Our <a href="https://cloud.google.com/blog/topics/financial-services/google-cloud-launches-dedicated-digital-asset-team">digital assets team</a> at Google Cloud have been running Solana nodes on GCP and would like to share our results. <em>Note that these are not official numbers and we encourage readers to do their own testing.</em></p><h3>VM Specs</h3><p>Running solana nodes need specific VM requirements in order for the node to “keep up with the network”. After much experimentation, these are the VM and storage specifications that worked for us.</p><p><strong>Recommended Specs</strong></p><ul><li>CPU: n2-highmem-64</li><li>CPU Settings: Intel Ice Lake, 1vCPU/core</li><li>RAM: 512GB</li><li>Networking: gVNIC</li><li>Storage: SSD PD — 2TB</li><li>OS: Ubuntu 20.04 LTS</li></ul><p>The key is the processor and the RAM. When selecting the CPU, expand “CPU platform and gpu” for CPU platform and vCPU ratio settings. The following configurations also work, it’s a matter of balancing price and performance.</p><ul><li>n2d-highmem-64, AMD Milan, 64 vCPU (1vCPU/core), 512GB RAM, 2TB PD SSD, gVNIC</li><li>n2d-highmem-80, AMD Milan, 80 vCPU (1vCPU/core), 640GB RAM, 2TB PD SSD, gVNIC</li></ul><h3>VM Networking</h3><p>Solana uses the following ports. Configure a <a href="https://cloud.google.com/vpc/docs/firewalls">firewall</a> to allow these ports access to the VM. This article assumes that the VM has a public IP address, but you could make the VM private, and expose the ports through an external load balancer, domain name and certificate. There are other ways to do networking in GCP that better secure the node.</p><ul><li>RPC Port: 8899 TCP</li><li>Websocket Port: 8900 TCP</li><li>Gossip Port: 8001 TCP/UDP</li><li>Dynamic Port Range: 8000–8020 TCP/UDP</li></ul><h3>VM Setup</h3><ul><li>If you configured attached storage, follow <a href="https://cloud.google.com/compute/docs/disks/add-persistent-disk#format_and_mount_linux">these instructions</a> to mount the drive to your VM. (Boot disk will automatically be mounted). Use “df -h” to see VM storage, confirm disk capacity is available.</li><li>Create a solana linux user to run the Solana validator under. You may not want the solana user as part of the sudoers group after installation for security reasons.</li></ul><pre># Example:</pre><pre>sudo adduser solana<br>sudo passwd -d solana<br>sudo chown solana:solana /mnt/disks/solana # path to mounted drive<br>sudo usermod -aG sudo solana # optional — remove after install<br>sudo usermod -aG google-sudoers solana # optional — remove after install</pre><ul><li>Configure a swapfile. Since Solana is memory intensive, it is highly recommended to configure a swap file. 250GB is recommended</li></ul><pre>sudo dd if=/dev/zero of=/swapfile bs=1MiB count=250KiB<br>sudo chmod 0600 /swapfile<br>sudo mkswap /swapfile</pre><pre># sudo vi /etc/fstab<br># /swapfile swap swap defaults 0 0<br>echo “/swapfile swap swap defaults 0 0” | sudo tee -a /etc/fstab</pre><pre>sudo swapon -a<br>sudo sysctl vm.swappiness=10<br>free -g</pre><ul><li>(Optional) Configuring a <a href="https://docs.solana.com/running-validator/validator-start#using-a-ramdisk-with-spill-over-into-swap-for-the-accounts-database-to-reduce-ssd-wear">RAM disk</a> for Solana accounts is recommended by Solana. We saw minimal performance increase with this, but if you had extra RAM and disk space, it would help.</li></ul><h3>Solana Installation</h3><p>Once the VM is running, ssh into the VM. Do the following to install Solana. Run the command “solana cluster-version” to get the version of the network. Note that if you find that the network is using a newer version, run the install command again using the version that matches the network.</p><p>See Solana docs for more information about <a href="https://docs.solana.com/cli/install-solana-cli-tools#macos--linux">installing</a> and <a href="https://docs.solana.com/running-validator/validator-start">preparing</a> the validator. Adjust the settings appropriately for testnet vs mainnet.</p><pre># Update apt<br>sudo apt update -y<br>sudo apt-get update -y</pre><pre># Install GCP Ops agent<br>curl -sSO https://dl.google.com/cloudagents/add-google-cloud-ops-agent-repo.sh<br>sudo bash add-google-cloud-ops-agent-repo.sh — also-install</pre><pre># Install Solana CLI — Adjust Solana version to the version of the network<br>sh -c “$(curl -sSfL https://release.solana.com/v1.13.3/install)&quot;</pre><pre># Put solana in path<br>export PATH=&quot;~/.local/share/solana/install/active_release/bin:$PATH&quot;</pre><pre># Set config variable<br>export SOLANA_METRICS_CONFIG=&quot;host=https://metrics.solana.com:8086,db=mainnet-beta,u=mainnet-beta_write,p=password&quot;</pre><pre># Set mainnet api endpoint<br>solana config set — url https://api.mainnet-beta.solana.com</pre><pre># Start solana-sys-tuner<br>echo &quot;Start solana-sys-tuner&quot;<br>sudo $(command -v solana-sys-tuner) — user $(whoami) &gt; ~/sys-tuner.log 2&gt;&amp;1 &amp;</pre><pre># Create identity keypair for the node<br>echo &quot;Record this data …&quot;</pre><pre>echo &quot;Create identity keypair&quot;<br>solana-keygen new — no-bip39-passphrase -o ~/validator-keypair.json<br>solana-keygen pubkey ~/validator-keypair.json</pre><pre>echo &quot;Use keypair&quot;<br>solana config set — keypair ~/validator-keypair.json</pre><p>If you are running a Solana RPC node, just the validator-keypair key is good. If you are running a validator, see <a href="https://docs.solana.com/running-validator/validator-start#create-authorized-withdrawer-account">the docs</a> for creating the necessary keys. If staking, see <a href="https://docs.solana.com/running-validator/validator-stake#create-stake-keypair">these docs</a>.</p><h4><strong>As always, store the seed phrase and keys in a safe place.</strong></h4><h3>Starting the Solana Validator</h3><p>Use the following commands to start the validator. This can be put into a script and run.</p><p>This command can be used to run it as a background process. You can also <a href="https://docs.solana.com/running-validator/validator-start#systemd-unit">configure</a> it to run like a service (systemd unit) on the VM.</p><p>Many of these <a href="https://docs.solana.com/running-validator/validator-start">options</a> are covered in the Solana documentation (<a href="https://docs.solana.com/clusters#mainnet-beta">cluster info</a>, <a href="https://docs.solana.com/running-validator/validator-start">starting</a>).</p><p>There are a few different types of Solana nodes:</p><ul><li>RPC Nodes</li><li>Validator Nodes with Staking</li><li>Warehouse Nodes (not covered)</li></ul><p>To run strictly as an RPC node, use the following settings.</p><pre>--identity ~/validator-keypair.json<br>--no-voting<br>--enable-rpc-transaction-history<br>--full-rpc-api</pre><p>To run as a validator, use the following settings.</p><pre>Remove the &quot;--no-voting&quot; flag<br>--vote-acount ~/vote-account-keypair.json<br>--private-rpc</pre><p>Adjust the paths of — accounts, — ledger and — log to match the mounted folder (if you used an attached disk). Adjust the path of the json keys to match your environment.</p><pre># Mainnet</pre><pre># Set config variable<br>export SOLANA_METRICS_CONFIG=&quot;host=https://metrics.solana.com:8086,db=mainnet-beta,u=mainnet-beta_write,p=password&quot;</pre><pre># Set mainnet api endpoint<br>solana config set --url <a href="https://api.mainnet-beta.solana.com/">https://api.mainnet-beta.solana.com</a></pre><pre>#Mainnet RPC node<br>nohup solana-validator \<br>--identity ~/validator-keypair.json \<br>--no-voting \<br>--known-validator 7Np41oeYqPefeNQEHSv1UDhYrehxin3NStELsSKCT4K2 \<br>--known-validator GdnSyH3YtwcxFvQrVVJMm1JhTS4QVX7MFsX56uJLUfiZ \<br>--known-validator DE1bawNcRJB9rVm3buyMVfr8mBEoyyu73NBovf2oXJsJ \<br>--known-validator CakcnaRDHka2gXyfbEd2d3xsvkJkqsLw2akB3zsN1D2S \<br>--only-known-rpc \<br>--accounts ~/solana-accounts \<br>--ledger ~/solana-ledger \<br>--rpc-port 8899 \<br>--gossip-port 8001 \<br>--dynamic-port-range 8000–8020 \<br>--entrypoint entrypoint.mainnet-beta.solana.com:8001 \<br>--entrypoint entrypoint2.mainnet-beta.solana.com:8001 \<br>--entrypoint entrypoint3.mainnet-beta.solana.com:8001 \<br>--entrypoint entrypoint4.mainnet-beta.solana.com:8001 \<br>--entrypoint entrypoint5.mainnet-beta.solana.com:8001 \<br>--expected-genesis-hash 5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d \<br>--wal-recovery-mode skip_any_corrupted_record \<br>--limit-ledger-size \<br>--enable-rpc-transaction-history \<br>--full-rpc-api \<br>--account-index program-id spl-token-owner spl-token-mint \<br>--account-index-exclude-key kinXdEcpDQeHPEuQnqmUgtYykqKGVFq6CeVX5iAHJq6 \<br>--account-index-exclude-key TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA \<br>--log ~/solana-validator.log &gt; ~/output.log 2&gt;&amp;1 &amp;</pre><pre># Show solana jobs<br>ps -A | grep sol</pre><p>Note that the log file will get big over time! Configure the <a href="https://docs.solana.com/running-validator/validator-start#log-rotation">log rotator</a> to automatically rotate the log file.</p><h3>Checking Status</h3><p>Check the log file with this command</p><pre>tail -f ~/solana-validator.log</pre><p>To see the status of the node and if it has caught up with the network yet, use this command. If it fails with a connection error, try again later. The node needs to download the latest part of the chain first before opening its RPC port.</p><pre>solana catchup --follow --our-localhost 8899</pre><p>The client will need some time to catch up to the network. We’ve seen this happen between 45 minutes to several hours. If it does not catch up within 24 hours, and falls further behind, then something is wrong. Either the VM is not powerful enough or there are some network issues.</p><p>Use this curl command to check the health of the node</p><pre>curl -X POST -H &quot;Content-Type: application/json&quot; -d &#39;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1, &quot;method&quot;:&quot;getHealth&quot;}&#39; <a href="http://localhost:8899/">http://localhost:8899</a></pre><h3>Testing</h3><p>Here are other curl calls to check the status. See the RPC API <a href="https://docs.solana.com/developing/clients/jsonrpc-api">docs</a> for more information.</p><pre>export IP_ADDRESS=localhost<br>export PORT=8899</pre><pre>curl -X POST <a href="http://$IP_ADDRESS:$PORT">http://$IP_ADDRESS:$PORT</a> -d &#39;{ &quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 1, &quot;method&quot;: &quot;getHealth&quot;, &quot;params&quot;: []}’ -H &quot;Content-Type: application/json&quot;</pre><pre>curl -X POST <a href="http://$IP_ADDRESS:$PORT">http://$IP_ADDRESS:$PORT</a> -d &#39;{ &quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 1, &quot;method&quot;: &quot;getBlockHeight&quot;, &quot;params&quot;: []}&#39; -H &quot;Content-Type: application/json&quot;</pre><h3>Logging/Monitoring/Alerts</h3><p>You can <a href="https://cloud.google.com/logging/docs/agent/ops-agent/configuration">configure</a> the logging ops agent to send the Solana validator logs to Cloud Logging.</p><p>Metrics of the VM can be found in the GCP console under Cloud <a href="https://cloud.google.com/monitoring/agent/process-metrics">Monitoring</a>.</p><p><a href="https://cloud.google.com/monitoring/alerts">Alerts</a> can be configured (such as high RAM usage, storage, etc). HTTP uptime checks can be <a href="https://cloud.google.com/monitoring/uptime-checks/introduction">configured</a> as well.</p><p>Here is a <a href="https://cloud.google.com/monitoring/monitor-compute-engine-virtual-machine">quickstart guide</a> on configuring monitoring for a VM in GCP.</p><h3>Cost</h3><p>Approximate VM costs are listed below. Additional discounts and credits are available to those companies that qualify.</p><p>n2-highmem-64, Intel Ice Lake, 64 vCPU (1vCPU/core), 512GB RAM, gVNIC, 2TB PD SSD — $2,826/month</p><p>n2d-highmem-64, AMD Milan, 64 vCPU (1vCPU/core), 512GB RAM, 2TB PD SSD, gVNIC — $2,508/month</p><p>n2d-highmem-80, AMD Milan, 80 vCPU (1vCPU/core), 640GB RAM, 2TB PD SSD, gVNIC — $3,040/month</p><p>Egress costs would likely be around $2,900/month</p><p><em>Note that the numbers specified are not official numbers and we encourage readers to do their own testing and cost estimation.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9534fe9015d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>