Running geth on kubernetes

梦想与她 提交于 2020-01-06 06:55:37

问题


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:


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.



来源:https://stackoverflow.com/questions/51560467/running-geth-on-kubernetes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!