| With the continuous development of blockchain technology,more and more enterprises and individual users are beginning to think about using blockchain technology to empower their products and services,but the high threshold for learning and applying blockchain technology has blocked In the footsteps of many people,for this reason,the blockchain as a service(BaaS)application was born.BaaS combines the characteristics of cloud computing and blockchain to provide users and developers with convenient,high-performance,customizable and secure blockchain services.In terms of cloud computing,Kubernetes has gradually become the industry standard for digital transformation and next-generation workloads in recent years.Compared with traditional BaaS,Kubernetes-based BaaS has obvious advantages in underlying resource orchestration and scheduling,high system availability,resource isolation,operation and maintenance management,cloud adaptation,and system security.Exploring in-depth integration and utilizing Kubernetes technology has become one of the important directions of BaaS development.In order to combine blockchain and cloud computing technology more deeply,improve the utilization efficiency of BaaS platform for cloud computing platform,and make better use of the characteristics of cloud computing Kubernetes platform such as elastic expansion,portability,resource isolation,and security,this paper proposes a design A high-availability BaaS solution and system based on Kubernetes is proposed,and related key technologies are researched.The main work content of the paper is as follows:First,a high-availability BaaS model based on Kubernetes is proposed and related systems are designed and implemented.In this model,BaaS is deeply combined and utilizes Kubernetes-related technologies.Aiming at the problem that the fabric chain code of the typical consortium chain is not natively compatible with Kubernetes,this paper proposes a method of modifying the source code of Fabric Peer to bind the chain code in the form of a Deployment and the endorsement node container to run on the same node,so as to adapt to the Kubernetes environment.Using Kubernetes combined with the GlusterFS distributed file system provides BaaS with multi-cluster agile deployment capabilities to solve the complex and non-scalable problems of blockchain deployment and maintenance.Combine ETCD and MinIO for off-chain storage to solve the blockchain storage bottleneck problem.Finally,relevant high-availability technologies are integrated into the design and implementation of the model system to provide reliable support for the long-term stable operation of BaaS.Second,a Kubernetes-based BaaS high-availability and multi-cluster agile deployment core technology is proposed.Aiming at the complex and unexpandable deployment and maintenance of the blockchain network,the high availability of the BaaS system cannot be guaranteed.A Kubernetes-based BaaS multi-cluster agile deployment solution is proposed,using Kubernetes technology and distributed storage GlusterFS to realize the blockchain multi-cluster agile deployment capability,and from three aspects:BaaS service,blockchain network,and underlying Kubernetes cluster Designing and adding relevant high-availability technologies separately improves the high availability of the entire BaaS system.Thirdly,a scheme for on-chain and off-chain data collaboration based on ETCD and MinIO is proposed.Aiming at the storage bottleneck problem on the chain,this paper stores the off-chain data storage index and data hash value on the chain,stores the AES encrypted object data in the off-chain MinIO object storage,and stores the data access policy and AES encrypted non-The object data is stored in the ETCD distributed storage under the chain,and this article uses the Vault security key storage service to store each user’s AES encryption key.Under the premise of deep integration with Kubernetes,this solution greatly relieves the storage pressure of the blockchain,and at the same time ensures the security of off-chain data and user keys. |