Running geth on kubernetes

2019-08-20 06:07发布

I am running geth full node https://github.com/ethereum/go-ethereum/wiki/geth on Google Cloud platform on a VM instance. Currently, I have mounted a SSD and write the chain data to it.

I want to now run it on multiple VM instances and use a load balancer for serving the requests made by Dapp. I can do this using a normal load balancer and create VMs and autoscale. However, I have the following questions:

  1. SSD seems to be a very important part of blockchain syncing speed. If I simply create VM images and add it for autoscaling, it won't help much because the blockchain will take time to sync.
  2. If I want to run these nodes on kubernetes cluster, what's the best way to use the disk?

1条回答
虎瘦雄心在
2楼-- · 2019-08-20 06:40

Take a look at this Kubernetes Engine tutorial which shows you how to run StatefulSets with automatic persistent volume provisioning: https://cloud.google.com/kubernetes-engine/docs/how-to/stateful-apps

Take a look at this Kubernetes Engine tutorial which shows you how to provision SSD disks https://cloud.google.com/kubernetes-engine/docs/concepts/persistent-volumes#ssd_persistent_disks

With these + HorizontalPodAutoscaler, you should be able to create a StatefulSet with auto-scaling and each pod will get its own SSD disk.

查看更多
登录 后发表回答