Abandon the landing practice of Kong and nginx, Apache apisik on the baas platform of fun chain technology

InfoQ 2021-08-09 17:43:05
abandon landing practice kong nginx


{"type":"doc","content":[{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" This paper introduces Apache APISIX In fun chain technology BaaS Landing practice in the platform , And the choice of fun chain technology in many gateway applications Apache APISIX Why ."}]}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":" Business background "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"BaaS(Blockchain as a Service), Chinese is “ Blockchain as a service ”, It refers to embedding the blockchain framework into the cloud computing platform , Take advantage of the deployment and management advantages of cloud service infrastructure , Convenient for developers 、 High performance blockchain ecological environment and ecological supporting services , Blockchain open platform supporting developers' business development and operation support ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Usually , A complete set BaaS Solutions include device access 、 Access control 、 Service monitoring and blockchain platform ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/f9\/f9f1769ce0cd16c3bea3bb5368752893.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" adopt BaaS The blockchain network can be built quickly and flexibly , For businesses , With BaaS platform **** The blockchain business can be managed uniformly ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" I believe many friends have contacted the contract code on Ethereum , adopt BaaS platform , We can easily in IDE Write smart contracts on , Then deploy it to our created blockchain network , Finally, the upper layer services call the blockchain related contracts to carry out business flow ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Because there are many nodes in the chain , A few dozen , Thousands more , without BaaS Platform support , It is difficult for us to monitor and maintain the operation of the chain . By using BaaS platform , Users can not only save costs , And it's easier to manage blockchains , Improve the safety factor of the whole system ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Fun chain technology BaaS The architecture of the product is divided into four layers , They are the resource layer 、 Blockchain bottom layer 、 Blockchain service layer and application layer ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/25\/25f00eff70575ff05a3b8744de925c92.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Now we're right Baas Have a preliminary understanding of the platform , Let's take a look at Apache APISIX stay BaaS Usage scenarios and gains on the system ."}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"Apache APISIX Usage scenarios of "}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":" scene 1: stay BaaS Landing practice on the system "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/95\/95327d12a8346c7bd96ee1722fbea00c.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" You can see from this picture that , Fun chain technology BaaS The architecture of the platform is not only microservicing , And it's divided into two layers , They are service access layer and core service layer ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"BFF(Backend For Frontend) Usually facing the front , adopt HTTP Access . Core services are generally provided through similar services Dubbo 、ETCD And so on , Finally using gRPC To visit ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" in other words , Fun chain technology BaaS The front end of the platform is connected with BFF modular , then BFF The module is then connected to the following micro service module .BFF Its main function is to do business aggregation 、 Format adaptation , And send the final result data to the front end ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" These business modules need to store relevant information in the registry (ETCD), When to use , Then read out the information through the gateway module ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/58\/5870e18d4a24d1cc715813544def194d.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" In the whole process , We mainly use Apache APISIX Four characteristics of :"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Routing and forwarding "}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" flow control "}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" safety control "}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Dynamic loading "}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Let's take a look at these features in the interest chain BaaS How is it used on the system ."}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":" Routing and forwarding "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/67\/67f64d175403e4e43a4be0b3b37ae001.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Fun chain technology uses Apache APISIX Official Proxy-rewrite The plug-in performs routing and forwarding services ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" When a request accesses 8080 port , adopt Proxy-rewrite plug-in unit , The request will be forwarded to the corresponding service API Up ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/81\/81957999b47c762d483e601540be91a0.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" The picture above shows Proxy-rewrite Operation interface of , We can see that we can match our forwarding rules through regular matching , Of course, you can also write HOST Or by URL To match ."}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":" Current limiting management "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/b9\/b9ed881ffc8613620a72878931fbe471.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" In the fun chain BaaS In the platform , Customers can build any chain according to their own needs . here ,BaaS The platform needs to quickly support the creation of these chains , And life cycle management of them ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" The creation of these alliance chains , It's not written directly on the code through hard code , It is solved by driving components . In the privatization scenario , We need such driver components to provide support quickly , And need to control the access frequency of the driver process ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/e5\/e5af457e1655927bed1be9d19628b1c0.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" In the absence of Apache APISIX Before , The platform needs to write its own logic code , Yes Apache APISIX in the future , We can directly use the official Limit-req Plug in to limit input and output , To protect the system . adopt Limit-req The operation interface of the plug-in , We can easily configure the speed 、 Barrel height parameter ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/17\/178265f700e56d65691bac47753aac5d.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":" safety control 、 Rights management "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/12\/12418f33b4bee4427b76be56af6941b2.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" In the privatization scenario of fun chain technology , Many users don't like to use the account system provided by the platform , Require the platform to interface with their existing account system , So fun chain technology uses Apache APISIX Of Access-Auth Plug in to adapt the authentication service address of the third party ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/79\/79bb7767d7fb66ae5ab81c6c897d42b0.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" In the of fun chain technology Baas In the platform , be-all Web Requests go through Apache APISIX Of Access-Auth plug-in unit , complete cookie Parsing and authentication , And then in HEAD The header carries user information , It is passed to the back-end micro service to process the business . The advantage of this is , Microservice developers do not need to parse Cookie, Instead, user information can be sent directly to the microservice module , Very convenient ."}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":" Dynamic loading "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/b2\/b2d480aa8062a11c188c0683875d239d.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" On the left of the figure above is fun chain technology Baas The client interface of the platform , There is no “ The store ” The button ; But on the right side of the picture above , Fun chain technology Baas There is one on the public platform “ The store ” The button . In some privatization scenarios, you don't need “ The store ” Button , But their background services are shared , As soon as the back-end service starts , The platform interface will be displayed differently according to requirements ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Fun chain technology uses Apache APISIX Work with the Service Center , Ensure the addition and adjustment of front-end micro service business module , This makes fun chain technology Baas The online publishing process of the platform becomes very simple ."}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":" scene 2: Landing practice on blockchain nodes "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/85\/859c69dff069d7cabbe5c28000c18c46.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" As can be seen from the above figure, there are A、B、C Three chains , How are these three chains created ?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" When the user passes BaaS The platform bought a chain , Its upper business or developer client can directly connect to the node , For example, a bank has three to the left , An insurance company has three right , Or some users access a whole chain . This will bring a big problem , Because basically every node will be accessed , Therefore, we need to expose all nodes on the blockchain in the public network environment ."}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":" Save public network ports "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/f3\/f37898cc7a31e9caae8cd4f7f6253e66.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Take this picture for example , We can see 6 Nodes , Then this chain needs at least 6 Public networks IP and 6 Ports ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" This situation may be acceptable for privatized users , But for those who are open to Internet users like fun chain BaaS platform , At least it takes dozens , More than a hundred 、 Thousands of public networks IP. This is not only very expensive , Also for the public network IP Resources are wasted ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" To solve this problem , Fun chain technology Baas The platform uses Apache APISIX To provide services to the outside world in a unified way , There is no need for all nodes in the alliance chain to expose the external network access port , It can effectively save costs ."}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":" Access control "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/bb\/bb49d317d62cafd6c78f058e0fb3285b.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" For traditional software , Because different heterogeneous chain accesses have their own very complex RBAC Access control , Therefore, users need to add many certificates on the client , It's a headache ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" To solve this pain point , Fun chain technology BaaS The platform passes Apache APISIX Of Key-auth The plug-in allows authorized users to directly access , And unify the authority control of all chains ."}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":" Clustering improves node stability "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/6e\/6e11f404880b0bbad6344541461c70e3.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" One of the features of blockchain is : Essentially , Accessing any node is the same . Like bitcoin , We can access any node to get data , So many users operate directly on a node ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/2d\/2d83978e4cf9fe0db8c380640138427d.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" however , The mode of direct access to a single node is vulnerable . for instance , The concurrency of banks is very high ,TPS You can achieve 4-5W\/ second , Every transaction will impact this node ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" In order to achieve the effect of rapid dynamic expansion , Fun chain technology BaaS Platform utilization Apache APISIX stay Kubernetes Upper HPA Deployment mode , Dynamically expand according to traffic , It effectively solves the problem of single point flow impact ."}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":" Multi protocol support "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/27\/274ff3f42be2bb80a7c26203f91aeb46.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Fun chain technology BaaS The platform uses a lot of heterogeneous chains , This leads to a wide variety of protocols used , Such as HTTP、RPC、WebSocket etc. . and Apache APISIX Can well support multi protocol , It can completely satisfy the interest chain technology BaaS Use of the platform in relevant scenarios , It can significantly reduce the cost of development ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/41\/416b47210d612fa1c5adad1cdbb66101.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":" Why choose Apache APISIX?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" stay Apache APISIX Before , Fun chain technology BaaS The platform is already in use Kong 了 , But later Kong Was abandoned ."}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":" Why give up Kong?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Kong Use PostgreSQL To store its information , This is obviously not a good way ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/d9\/d9ee0b2e50dbc171e93faf6f6a0aa98d.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" In the software industry , The highly available configuration of the database is very complex . Not only need to be equipped with special DBA, It is also very difficult to implement ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Fun chain technology BaaS The system itself is already in use MySQL, If you need to build another one here PostgreSQL Database , It means the of fun chain technology BaaS The system needs two sets of relational databases . This will make implementation difficult 、 Operation and maintenance costs bring more trouble , Introduce more risks ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" meanwhile , Because fun chain technology BaaS The platform is also used in many places etcd, So in the end, fun chain technology chose to give up Kong, Full investment is based on etcd Of Apache APISIX."}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":" Why not use Nginx?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Maybe some friends will think , Then why not use Nginx?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" In fact, fun chain technology BaaS The platform used to be Nginx, But it turns out ,Nginx And Apache APISIX There are still many imperfections ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/a1\/a173a0ced1286c10c21dc213a5546355.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Hot start 、 Hot plug-in problem "}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" In the fun chain BaaS In the platform , We not only need to manage the alliance chain , And you should be able to add nodes at any time 、 Delete . If you use Nginx, There are not only scalability problems , After adjusting the configuration, you need to restart . And in the writing of plug-ins ,Nginx You need to configure very complex rule code on ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Clustering is difficult "}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Nginx Clustering is very difficult , and Apache APISIX Can pass etcd Cluster enhancements to achieve ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Cannot directly represent TCP、UDP"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Nginx By default, it can only implement the proxy of seven layer network , If you want to support four layer network , Need to put Stream Module recompile , and Apache APISIX Can support four at the same time \/ Agent on the seventh floor ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" There is no good Dashboard"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Nginx No, Dashboard, and Apache APISIX Dashboard Can let developers 、 The operation and maintenance personnel have less difficulty in managing nodes ."}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":" The future planning "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/30\/30bb55bdafadd62c4c5fa74bd454d1d6.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"1. Application Apache APISIX Provide or self-developed log plug-ins "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Apache APISIX The official website has provided many log plug-ins , For example, yes. HTTP、UDP Support for , Include Kafka etc. , But like the fun chain BaaS This requires a platform to control thousands of blockchain networks , Every time a problem occurs , Searching for fault traces in the log is a very headache ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" In the near future , Fun chain technology will be in BaaS Between the system and the blockchain system , be based on Apache APISIX Add some APM function , Improve operation and maintenance management efficiency under Multi Chain scenario ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"2. Develop regulatory plug-ins , Realize operation trace and traceability "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Domestic regulation of blockchain is very strict , All operations need to be marked and traced . future , Fun chain technology will be based on Apache APISIX Develop regulatory plug-ins to improve regulatory capabilities , increase VIP、 White list 、 Playback and other functions ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"3. Use APISIX Ingress Controller, Instead of Kubernetes default Nginx-Ingress"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" In the deployment Kubernetes When , We usually choose Nginx-Ingress To handle internet requests , But because of some of the above Nginx The problem of , Fun chain technology is investigating the use of APISIX Ingress Controller."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"4. Explore Service Mesh"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Fun chain technology has tried before traffic-mesh, I will try to use APISIX Mesh ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" The authors introduce :"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Sheng Weifeng , Now fun chain technology blockchain service platform (BaaS) Architects . He has been engaged in the research and development of domestic independent blockchain service platform technology for a long time , Relevant achievements serve China Construction Bank 、 Head office blockchain construction projects of China Everbright Bank and other large and medium-sized banks in China , On the blockchain operation mechanism 、 Alliance cross domain networking 、 Have a deep understanding and practice in the application of blockchain ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}}]}
版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://qdmana.com/2021/08/20210809173922316j.html

  1. HTML + CSS + JavaScript to achieve cool Fireworks (cloud like particle text 3D opening)
  2. HTML + CSS + JavaScript realizes 520 advertising love tree (including music), which is necessary for programmers to express themselves
  3. Solve the problem of Web front-end deployment server (it can be deployed online without a server)
  4. HTML + CSS + JS make wedding countdown web page template (520 / Tanabata Valentine's Day / programmer advertisement)
  5. What else can driverless minibus do besides "Park connection"?
  6. Cloud native leads the era of all cloud development
  7. NRM mirror source management tool
  8. Bring it to you, flex Jiugong
  9. Lolstyle UI component development practice (II) -- button group component
  10. Deconstruction assignment in ES6
  11. Luo 2 peerless Tang clan was officially launched. The official gave a key point, and the broadcast time was implied
  12. 20初识前端HTML(1)
  13. 当新零售遇上 Serverless
  14. 20 initial knowledge of front-end HTML (1)
  15. When new retail meets serverless
  16. [golang] - go into go language lesson 5 type conversion
  17. [golang] - go into go language lesson 6 conditional expression
  18. HTML5(八)——SVG 之 path 详解
  19. HTML5 (8) -- detailed explanation of SVG path
  20. 需要开通VIP以后页面内容才能复制怎么办?控制台禁用javascript即可
  21. Web前端|CSS入门教程(超详细的CSS使用讲解,适合前端初学者)
  22. 实践积累 —— 用Vue3简单写一个单行横向滚动组件
  23. Serverless 全能选手,再下一城
  24. What if you need to open a VIP to copy the page content? Just disable JavaScript on the console
  25. Web front end | CSS introductory tutorial (super detailed CSS explanation, suitable for front-end beginners)
  26. Practice accumulation - write a single line horizontal scroll component simply with vue3
  27. Dili Reba is thin again. She looks elegant and high in a strapless hollow skirt, and her "palm waist" is beautiful to a new height
  28. Serverless all-round player, next city
  29. The difference between MySQL semi synchronous replication and lossless semi synchronous replication
  30. Vue表单设计器的终极解决方案
  31. The ultimate solution for Vue form designer
  32. Nginx从理论到实践超详细笔记
  33. Yu Shuxin's red backless swimsuit is split to the waist and tail, with a concave convex figure and excessive color matching, and his face is white to dazzling
  34. Nginx ultra detailed notes from theory to practice
  35. 【动画消消乐|CSS】086.炫酷水波浪Loading过渡动画
  36. typecho全站启用https
  37. CCTV has another popular employee. The off-site interpretation is very professional, and the appearance ability is no less than that of Wang Bingbing
  38. [animation Xiaole | CSS] 086. Cool water wave loading transition animation
  39. Enable HTTPS in Typecho
  40. 50天用JavaScript完成50个web项目,我学到了什么?
  41. 根据JavaScript中原生的XMLHttpRequest实现jQuery的Ajax
  42. What have I learned from completing 50 web projects with JavaScript in 50 days?
  43. "My neighbor doesn't grow up" has hit the whole network. There are countless horse music circles, and actor Zhou Xiaochuan has successfully made a circle
  44. 根据JavaScript中原生的XMLHttpRequest实现jQuery的Ajax
  45. Implement the Ajax of jQuery according to the native XMLHttpRequest in JavaScript
  46. Implement the Ajax of jQuery according to the native XMLHttpRequest in JavaScript
  47. 30 + women still wear less T-shirts and jeans. If they wear them like stars, they will lose weight
  48. 数栈技术分享前端篇:TS,看你哪里逃~
  49. Several stack technology sharing front end: TS, see where you escape~
  50. 舍弃Kong和Nginx,Apache APISIX 在趣链科技 BaaS 平台的落地实践
  51. Abandon the landing practice of Kong and nginx, Apache apisik on the baas platform of fun chain technology
  52. 浪迹天涯king教你用elementui做复杂的表格,去处理报表数据(合并表头,合并表体行和列)
  53. 前端HTML两万字图文大总结,快来看看你会多少!【️熬夜整理&建议收藏️】
  54. Wandering around the world king teaches you to use elementui to make complex tables and process report data (merge header, merge table body rows and columns)
  55. 路由刷新数据丢失 - vuex数据读取的问题
  56. Front end HTML 20000 word graphic summary, come and see how much you can【 Stay up late to sort out & suggestions]
  57. Route refresh data loss - vuex data reading problem
  58. Systemctl系统启动Nginx服务脚本
  59. Systemctl system startup nginx service script
  60. sleepless