Suggestion #121
Provide blockchain data services with high availability, high stability, and high security for the elastos community 为elastos社区提供具有高可用性、高稳定性、高安全性的区块链数据API服务[2021Q4-2022Q1]
- 1. PublishedNow
- 2. RaisedNot yet
- 3. DecidedNot yet
Abstract
继续为社区提供稳定、可靠、安全的API服务,覆盖ELA主链、ESC侧链、EID侧链、DID侧链等在内的所有主侧链节点数据,便于开发者等社区成员及相关产品直接使用API服务,促进elastos生态发展。
Continue to provide stable, reliable and secure API services for the community, covering all mainchain and sidechain node data including ELA mainchain, ESC sidechain, EID sidechain, DID sidechain, etc., so that developers and other community members and related products can directly use API services. Promote the ecological development of elastos.
Goal
- 提供ELA节点、ESC侧链节点、 EID侧链节点、DID侧链节点的RPC服务 Provide RPC services of ELA nodes, ESC sidechain node, EID sidechain node, and DID sidechain node
- 提供ESC及EID侧链节点的WebSocket服务 Provide WebSocket service of ESC and EID sidechain node
- 提供支持查询ESC及EID侧链跨链交易的Oracle服务 Provide Oracle service that support querying ESC sidechain and EID sidechain cross-chain transactions
- 提供支持查询ESC及EID侧链交易记录及token列表的API-Misc服务 Provide API-Misc service that supports querying ESC sidechain and EID sidechain transaction records and token list
- 支持mainnet及testnet环境 Support mainnet and testnet environment
- 按照节点发布计划,按时升级主侧链节点 According to the node release plan, upgrade the mainchain & sidechain nodes on time
- 根据业务访问需求,优化节点服务器数量及配置,保证服务的稳定性及可靠性 According to business access requirements, optimize the number and configuration of node servers to ensure the stability and reliability of the service
- 根据社区开发者及用户反馈的意见,对API服务进行优化 Optimize API services based on feedback from community developers and users
- 服务运行周期不少于6个月 Service operation period is not less than 6 months
- 维护API服务及节点监控程序,在出现问题后及时报警并修复 Maintain API service and node monitoring program, alarm and repair in time when problems occur
Motivation
在一个生态系统中,应用与API服务是相辅相承的2部分。优秀的API服务,可以帮助开发者降低开发难度及开发成本,缩短开发周期,提升dApp的稳定性,保证用户使用的流畅性;开发者在开发过程中,会对API服务提出新的功能、性能等方面的需求,能够满足开发者数据需求的API服务才能被更多的dApp使用、获得开发者的支持。dApp和API服务之间双向的正反馈,可以有效的推动整个生态的发展。
ETH、BTC等生态中已经出现了大量的API服务提供商,他们为生态提供了丰富多样的有偿数据服务。API服务提供商在满足生态发展的同时,自身也获得了来自生态的资金、技术等支持,取得了很好的发展。
但亦来云生态目前还处于早期发展阶段,很多应用仍在探索自身的盈利模式,而开发者对便捷的API服务的需求始终存在。所以,我们计划向CR申请资金,用于为亦来云生态中的应用提供API数据服务。当生态中出现大量应用具备成功的盈利模式后,停止向CR申请经费,转为通过向应用提供有偿的数据服务获得资金支持。
目前API服务在#33提案 (opens in a new tab)及#44提案 (opens in a new tab)的支持下已经上线并稳定运行超过10个月,已经成为Essentials、FILDA、Feeds、Identity、Profile、Assit、Wallet等多个产品的开发者的重要工具,为社区开发者和用户提供了稳定、可靠的API服务。
从2020年11月上线至今,API服务已累计为社区提供数据服务超过1.2亿次,其中生产环境超过1.12亿次,目前日均访问量稳定在34万至42万之间。
稳定日均访问量,表明FILDA、Essentials、Feeds等产品为elastos社区带来了稳定的活跃用户,也表明API服务作为相关产品的一个重要支撑组件,为产品的发展提供了可靠、稳定的数据服务,有效的推动了相关产品用户的持续增长。
目前#44提案 (opens in a new tab) 已于9月底完结,计划通过本提案为API服务的后续运行提供资金支持,并根据前期运行数据及后续不同主侧链上业务发展的需要,对elastos节点集群进行优化,维持ESC、EID等重要业务节点的承载能力,保证API服务的高可用性、高稳定性、高安全性,为后续业务的快速增长提供稳固的底层支持。
In an ecosystem, applications and API services are two complementary parts. Excellent API services can help developers reduce development difficulty and development costs, shorten development cycles, improve dApp stability, and ensure user fluency; developers will propose new functions and performance to API services during the development process Only API services that can meet the data needs of developers can be used by more dApps and get the support of developers. The two-way positive feedback between dApp and API services can effectively promote the development of the entire ecosystem.
A large number of API service providers have appeared in ETH, BTC and other ecosystems, and they have provided rich and diverse paid data services for the ecosystem. While meeting the development of the ecosystem, API service providers themselves have also obtained funds and technical support from the ecosystem, and have achieved very good development.
However, the Elastos ecosystem is still in the early stage of development, many applications are still exploring their own profit models, and developers' demand for convenient API services always exists. Therefore, we plan to apply for funds from CR to provide API data services for applications in the Elastos ecosystem. When a large number of applications in the ecosystem have a successful profit model, stop applying for funding from CR and switch to obtaining financial support by providing paid data services to the applications.
Currently, the API service has been launched and ran stably for more than 10 months with the support of the Proposal #33 (opens in a new tab) and Proposal #44 (opens in a new tab). It has become an important tool for developers of Essentials, FILDA, Feeds, Identity, Profile, Assit, Wallet, etc., provides a stable and reliable API service for community developers and users.
Since its launch in November 2020, the API service has provided more than 120 million data services to the community, including more than 112 million in the production environment, and the current average daily visits have stabilized between 340,000 and 420,000.
Stable daily average visits indicate that FILDA, Essentials, Feeds and other products have brought stable and active users to the elastos community. It also indicates that API services, as an important support component of related products, provide reliable and stable data services for product development , Which effectively promoted the continuous growth of users of related products.
Currently Proposal #44 (opens in a new tab) has been completed at the end of September. It is planned to provide financial support for the follow-up operation of API services through this proposal, and according to the previous operation data and subsequent different main To meet the needs of business development on the side chain, optimize the elastos node cluster, maintain the carrying capacity of important business nodes such as ESC and EID, ensure the high availability, high stability, and high security of API services, and provide stability for the rapid growth of subsequent business The underlying support.
Relevance
Some of what this suggestion recorded is not shown here yet. Nothing has been removed; this page cannot carry it.
Some of what this suggestion recorded is not shown here yet. Nothing has been removed; this page cannot carry it.
Some of what this suggestion recorded is not shown here yet. Nothing has been removed; this page cannot carry it.
Plan introduction
- 沿用API服务现有技术架构,根据数据访问情况对服务器配置进行适当调整 Continue to use the existing technical architecture of API services, and adjust the server configuration appropriately according to the data access situation
由于API服务已经稳定运行超过10个月,在本提案中将继续采用API服务现有技术架构,并根据前期服务访问情况及后续业务发展需求,对后端节点配置进行调整。
根据前期统计数据,生产环境中 ESC 侧链及 EID 侧链的访问量约占总访问量的90%,目前系统容量可以满足业务需求;由于 DID 侧链上的主要功能已经迁移至 EID 侧链,所以计划减少 DID 节点数量,维持已最少节点数量运行。
测试环境的访问压力较小,计划在保持系统最低冗余度的情况下,维持已最少节点数量运行。
因API服务已稳定运行多月,方案稳定可靠,不需要对方案进行较大改动,故以6个月为项目周期,6个月后希望由后续提案为该API服务继续提供支持。
Since the API service has been running stably for more than 10 months, the current technical architecture of the API service will continue to be adopted in this proposal, and the back-end node configuration will be adjusted according to the access situation of the previous service and the subsequent business development needs.
According to the previous statistical data, the visits of the ESC sidechain and EID sidechain in the production environment accounted for about 90% of the total visits. The current system capacity can meet business needs; because the main functions on the DID sidechain have been migrated to the EID sidechain, Therefore, it is planned to reduce the number of DID nodes and maintain the minimum number of nodes running.
The access pressure of the test environment is relatively small, and the plan is to maintain the minimum number of nodes running while maintaining the minimum redundancy of the system.
Because the API service has been running stably for many months, the plan is stable and reliable, and there is no need to make major changes to the plan, so the project cycle is 6 months. After 6 months, it is hoped that subsequent proposals will continue to provide support for the API service.
- 增加运维团队,保证服务的高可用性、稳定性、安全性 Add the operation and maintenance team to ensure the high availability, stability and security of the service
成立有2人组成的运维团队,降低因个人因素导致的服务运行风险,并通过定时监控、定期维护等方式提高服务运行的稳定性和安全性,保证服务的高可用性。
Establish an operation and maintenance team composed of two people to reduce service operation risks caused by personal factors, and improve the stability and security of service operation by regular monitoring and regular maintenance, and ensure high service availability.
- 虽然我们会尽最大的努力保证API服务的安全性及稳定性,但API服务仍存在被攻击的风险。所以建议处理大量资金的产品使用私有API服务保证产品和资金的安全性。 Although we will do our best to ensure the security and stability of the API service, the API service still has the risk of being attacked. Therefore, it is recommended that products handling large amounts of funds use private API services to ensure the safety of products and funds.
Budget introduction
本建议的经费由2部分组成:1.服务器租赁,2.运维团队人员薪酬
The proposed funding consists of two parts: 1. Server leasing, 2. Operation and maintenance team staff salaries
- 服务器租赁费 Server leasing fee
根据mainnet与testnet访问量的不同及不同节点对服务器配置的需求,计划分别租用29台AWS t3服务器运行相关服务。
According to the difference of mainnet and testnet visits and the server configuration requirements of different nodes, it is planned to rent 29 AWS t3 servers to run related services.
AWS t3服务器的租用价格如下:
The rental price of AWS t3 server is as follows:
| Type | CPU | RAM(GB) | Price(USD/Hour) | Amount(USD/Week) | Amount(USD/Month) |
|---|---|---|---|---|---|
| t3.small | 2 | 2 | 0.025 | 4.2 | 18 |
| t3.medium | 2 | 4 | 0.05 | 8.4 | 36 |
| t3.large | 2 | 8 | 0.1 | 16.8 | 72 |
| t3.xlarge | 4 | 16 | 0.2 | 33.6 | 144 |
服务器用途、配置及数量见下图:
The server usage, configuration and quantity are shown in the figure below:
| Service | Network | Server Type | Server Count | Price(USD/Month) | Amount(USD/Month) |
|---|---|---|---|---|---|
| ELA-RPC | Mainnet | t3.xlarge | 4 | 144 | 576 |
| ESC(RPC+WebSocket+Oracel+APIMisc) | Mainnet | t3.large | 6 | 72 | 432 |
| EID(RPC+WebSocket+Oracel+APIMisc) | Mainnet | t3.large | 6 | 72 | 432 |
| DID-RPC | Mainnet | t3.medium | 2 | 36 | 72 |
| ELA-RPC | Testnet | t3.xlarge | 2 | 144 | 288 |
| ESC(RPC+WebSocket+Oracel+APIMisc) | Testnet | t3.large | 2 | 72 | 144 |
| EID(RPC+WebSocket+Oracel+APIMisc) | Testnet | t3.large | 2 | 72 | 144 |
| DID-RPC | Testnet | t3.medium | 2 | 36 | 72 |
| Frontend | - | t3.large | 2 | 72 | 144 |
| Moniter | - | t3.small | 1 | 18 | 18 |
| Sum | - | - | 29 | 2322 |
表中为AWS服务器EC2实例的成本,由于AWS的存储及网络费用需要根据实际使用量付费,预估为EC2实例的10%,所以每月服务器费用大约为 2322*1.1=2554 USD。
The table shows the cost of the AWS server EC2 instance. Since AWS storage and network fees need to be paid based on actual usage, it is estimated to be 10% of the EC2 instance, so the monthly server fee is approximately 2554 USD.
- 运维团队人员薪酬 Operation and maintenance team staff salary
运维团队由2人组成,按照 250 USD/人月 支付薪水,运维团队每月费用为 500 USD。
The operation and maintenance team consists of 2 people, and the salary is 250 USD/person-month, and the monthly cost of the operation and maintenance team is 500 USD.
综上,项目总预算为 (2554+500)6=18324 USD。
考虑到后续ELA价格波动等影响,申请增加 30% 风险基金,用于平衡由于ELA价格下跌导致的预算不足以支付上述费用的情况。参考火币交易所ELA的30天均价,为4.3 USDT/ELA,所以项目总预算ELA数量=183241.3/4.3≈5539.8 ELA。
本项目将以每个月实际支出费用计算支出,并按照每个月中旬 ELA在火币交易所的价格计算世纪花费的ELA数量,在项目结束后,将剩余的ELA退还至CR运营地址CREXPENSESXXXXXXXXXXXXXXXXXX4UdT6b。
In summary, the total project budget is (2554+500)6=18324 USD.
Taking into account the subsequent ELA price fluctuations and other impacts, apply for an increase of 30% risk fund to balance the situation that the budget caused by the fall in ELA price is not enough to cover the above expenses. Refer to the 30-day average price of ELA on Huobi Exchange, which is 4.3 USDT/ELA, so the total project budget ELA number = 183241.3/4.3≈5539.8 ELA.
This project will calculate expenditures based on the actual monthly expenditures, and calculate the amount of ELA spent by the century based on the price of ELA on the Huobi Exchange in the middle of each month. After the project ends, the remaining ELA will be returned to the CR operating address CREXPENSESXXXXXXXXXXXXXXXXXX4UdT6b.
Budget amount
5539.8
Plan
| Milestone goal | Date |
|---|---|
提供第1个月的稳定API服务 Provide stable API service for the 1st month | 2021-11-01T09:49:51.778Z |
提供第2个月的稳定API服务 Provide stable API service for the 2nd month | 2021-12-01T09:49:51.778Z |
提供第3个月的稳定API服务 Provide stable API service for the 3rd month | 2022-01-01T09:49:51.778Z |
提供第4个月的稳定API服务 Provide stable API service for the 4th month | 2022-02-01T09:49:51.778Z |
提供第5个月的稳定API服务 Provide stable API service for the 5th month | 2022-03-01T09:49:51.778Z |
提供第6个月的稳定API服务,本提案任务完成 Provide stable API service for the 6th month, the task of this proposal is completed | 2022-04-01T09:49:51.778Z |
Budget
| Type | Milestone | Amount | Criteria |
|---|---|---|---|
CONDITIONED | 0 | 923.3 | 提供第1个月的稳定API服务 Provide stable API service for the 1st month |
CONDITIONED | 1 | 923.3 | 提供第2个月的稳定API服务 Provide stable API service for the 2nd month |
CONDITIONED | 2 | 923.3 | 提供第3个月的稳定API服务 Provide stable API service for the 3rd month |
CONDITIONED | 3 | 923.3 | 提供第4个月的稳定API服务 Provide stable API service for the 4th month |
CONDITIONED | 4 | 923.3 | 提供第5个月的稳定API服务 Provide stable API service for the 5th month |
COMPLETION | 5 | 923.3 | 提供第6个月的稳定API服务,本提案任务完成 Provide stable API service for the 6th month, the task of this proposal is completed |
Sign in to reuse as a draft Creates a private draft. Nothing is stored until you save it.