Historical development
From 2012 to 2013, the core business of Feizhu was mainly based on PC platform. The core pain point of front and rear end r&d collaboration was the compilation of dynamic templates, and conflicts were often caused by the attribution of “template set” work between front and rear ends of different teams.
To 14, 15 years, All in the process of wireless, in order to solve complex business data from the PC era to the rapid transformation of the wireless gateway, flying pigs set up wireless server team work to complete the data to the end side of the glue layer, can well solve the problem of series, but repeated package interface also makes wireless growth and precipitation problem facing the service side, Less sustainable.
After the stable construction of wireless server technology in 2016 and 2017, the work of interface encapsulation was gradually transferred to the back end of the industry due to the above problems. With the multi-terminal development of H5/Weex/iOS/Android, their demands for interfaces were difficult to be consistent, and the glue problem was carried out through Node BFF layer. However, the front-end operation and maintenance capacity is not strong, and the waste of the long tail machine makes it difficult to fully BFF.
To 18 years flying pigs platform modification completion, horizontal platform from vertical industry to undertake business, needs the landing after the coordination and scheduling, the fragmentation of the middle layer is more serious, the front and back side coordination costs brought a bigger challenge, at the same time, through single domain problem solution (as a single page solutions) to solve the problem of other business layer, A lightweight universal solution is urgently needed to solve the increasingly serious collaboration of glue layers.
The construction of the target
Based on the above background and problem analysis, Feizhu launched the “Sky City” – Serverless technology system construction special project in May last year. The overall objectives of the project are as follows:
Build the r&d infrastructure of Flying Pig Serverless, empower the upper products/platforms, promote the front-end/back-end, business/platform, and r&d collaboration between fields to evolve into a more efficient and function-focused mode, shorten the landing cycle of innovative business R&D, and improve the input-output ratio of R&D resources.
-
Short and medium term: clear functional boundaries (front-end/back-end, business/platform), innovative business incubation (MISC services, platform capacity deficiency)
-
Medium and long term: cost reduction (RESEARCH and development, machinery), free operation and maintenance (reduce operation and maintenance investment such as pressure test in large-scale promotion scenarios), long tail migration of stock (construction of CaaS capacity)
Recent half a year
Completed a series of the first half of the construction of infrastructure, research facilities and experienced group BU more communicate, around the flying pigs before and after the end put forward goal, cooperative development and business pain points to an empty island development platform and the construction of the gateway, and the depth of the group to build unified FaaS r&d platform, as well as around the various development experience, the stability of construction, Make the entire Serverless available.
However, at that time, there was still a long way to go from the overall construction perfection and usability of the Flying Pig Serverless system, facing four urgent problems that needed to be solved: strong stability, incomplete BaaS capacity, inconvenient engineering links and poor sense of rhythm of business pilot.
In this case, in the second half of the year [we started the second phase of the Flying Pig Serverless system], we found the breakthrough of the combination of front-end R&D system upgrade and Serverless in consolidating the construction of the Serverless technology system. Focus on promoting Serverless infrastructure upgrade, monitoring stability enhancement, RESEARCH and development experience and engineering upgrade, front-end and back-end integration business best practices.
At the present stage, the pilot exploration of multi-business scenarios is completed, while the construction of Serverless technology meets the needs of business use, and the trial period -> availability period is completed. The next main goal is to expand the scope of business scenarios to generate greater value.
I would like to take this summary to synchronize some of our technical construction achievements in the last six months, there may be some capabilities you need just to solve your urgent. Welcome to discuss together, if there is misunderstanding or unclear description of the point, welcome to directly point out or put forward suggestions.
Say to the ground first
When it comes to technology systems, you need to think about how they add value to the business, including how to measure the differentiated value they bring.
First of all to give everyone synchronous Serverless in the flying pig business scenario landing effect, At present one year fly pig Serverless accumulated in high-speed rail travel, traffic search, fly pig published comments, resource bit management platform, visa, WIFI, peripheral travel, travel arbitrary door, travel purchase, super new discovery, tickets, POI, discover video, new people’s zone, find similar, Titan, small program URL Exploration is applied to 25 scenarios such as management, collection/itinerary, ship tickets, Deutsche Railway and PC content details, including FaaS SSR, live broadcast, unified destination, issuing platform coupon/circle of people/release activities, among which S2 has 10 function groups online, mainly focusing on the landing work of new business and new type scenarios. All front-end teams including the flying pig side are also in use, and there are also many “special representative” scene businesses:
-
Rax integration scenario: We completed the implementation of the Rax + FaaS integration project of the overseas purchase. In many places, students of the group were brought together to support and improve it. It was also the first Weex integration business of the group to go online.
-
General search capacity architecture: Students in the ticket group use Serverless to do the search capacity of traffic lines, design the corresponding search capacity, and enable the use of ship tickets and German rail search behind;
-
Integration scenario of middle and background: Ant Design Pro + Serverless integration capability and database connection are used to quickly launch the transparent management and control platform of flying pig parameters, eliminating the complex process of application and domain name application and making it lighter to use
-
SEO SSR ability landing of flying pigs: Flying pig side SEO platform in last year to fly pig users to pull new, search ranking has brought great value, but want to quickly land an SSR page, in fact, still need a lot of server ability, currently running through the flying pig strategy page SSR process, can be like the development function to develop our SSR, use is also very simple, Expect to bring more value later
Ability to consolidate
The following figure shows some of our construction items in the past six months. Through the integrated development mode, the front-end students can gradually have the development idea of production. The expansion of BaaS capacity will make the things that can be done down another layer, and the monitoring of the integrated construction makes the whole serverless link get visual guarantee. With business demands to participate in the group Serverless construction to better promote the overall development.
The integrated research and development model has been upgraded
-
Rax + FaaS integration capability: S2 We have promoted the co-construction team to upgrade to the front-end oriented [SRC /apis] directory structure in the original [client/ Cloud]. The local development and debugging SDK and gateway request front-end SDK upgrade are compatible with the completion and transparent transfer of fcMtopInnerParams parameter simulation. On the business side, we completed the landing and launching of the outbound purchase business
-
Ant Design Pro + FaaS integration of background development: At present, many Feizhu Xiaoer platforms complete the deployment of Node applications by applying for 1+3 machines in Aone. There are problems such as troublesome application, machine waste and complicated on-line. Based on this, weThe whole process of local debugging, compilation and deployment of FaaS integration under Ant Design Pro system has been settled into scaffolding and r&d platform, we can launch the middle and background applications just like developing a common front-end page without applying for machines and domain names. At present, the Feizu channel management platform has completed the colluding database use process and gone online
-
FaaS Rax SSR integrated running: Before the development of SSR, need to make a front-end into a full stack, and need to take into account Node selection, application, construction, deployment, guarantee these processes, which also leads to a reason that it is difficult to use in a wide range of internal, water LAN side SSR co-construction group students produce general ability, The subsequent dynamic proxy strategy based on Nginx + Lua + cache has completed the full link online running of the flying pig side. It can also be put into production at present, which can be well used in the subsequent flying pig SEO and page performance improvement scenarios.
This type of integrated development mode is currently in the process of launching and landing the representative business of flying pigs, and we need to work on it in the follow-up mass production so as to realize greater value of this technology.
Perfect development experience
When it comes to front-end development experience, flying Pig front-end students will inevitably think of “CLAM engineering system” (there is a feeling of CLAM code banging on the seashore). A set of simple commands can complete the whole process of clan init, clam newbranch, clam dev, clam prepub and clam publish, seamlessly connecting with the underlying platform capabilities.
Based on this, we have completed the development system of Clam and FaaS. Now feizhu developers do not need to apply for corresponding applications on the DEVELOPMENT platform. Click iteration step by step. Create a pure FAAS project directly through Clam Init FAAS, and create a RAX+ FAAS integrated project through Clam Init RAX — FAAS. The subsequent process can maintain the same page development experience as before, which can reduce the use cost of everyone.
At the same time, in order to reduce the initial cost for students to use FaaS, complete the classification and summary of the Serverless usage documents on the Flying Pig side, including the use documents of the whole process of tutorial, framework introduction, common service invocation, BaaS capability, integrated development, operation and maintenance investigation and development. >>>
BaaS capacity building
I vaguely remember that in the first half of the year, some scenes could not be supported due to the poor capability of many BaaS, especially the use of database. This part is also a part that we need strong support to promote the co-construction of the group. In the second half of the year, we worked out the following plans together to meet the existing business demands:
Connect to the database in proxy mode (transition solution, used in existing scenarios) : At the beginning, we used baas-SDK to connect the central application to realize the operation of adding, deleting, modifying and checking the proxy to the database, which was used as a transitional method that could not use the database at that time. However, since the centralized agent did not dare to strongly guarantee the stability of c-end application, we recommended internal application.
FaaS directly connected database (recommended, safer) : With the need for database capabilities on the C-side of the business, we worked with midway Runtime to enable a direct connection to the database during the LifeCycle of the FaaS function, allowing each function to read the Configuration. At the same time, we also accumulated a set of methods for adding, deleting, modifying, checking and building tables in FaaS database, which filled the blank of FaaS database of the group. At present, this kind of application has been used in the unification of The C-end city destination of Feizhu and the management of internal, middle and background channels.
Intranet login capability invocation: The first middleware capability in our backend system, used in much the same way as midway’s middleware, can be used quickly to access Intranet login capability.
Stability and operation and maintenance capability
Stability has always been the most important thing to be concerned about in the Serverless system. As it is an emerging thing, it is more necessary to ensure stability as far as possible, so that new students can feel that this system is reliable and his business can be used for production, so as to promote its better integrated development.
Serverless Monitoring integration platform: In order to better find and troubleshooting problems, we pulled the original Node monitoring students together to make a Serverless monitoring integration platform, the current 1.0 version has been released, plus function monitoring information, the introduction of health points concept, but also added important functions of the full link monitoring, through the flow chart can see the problem, The rapid hemostasis portal is added, while the overall capability has been connected to the unified FaaS development platform. Currently we are working on the function monitoring focus, as well as the ability to customize log statistics, looking forward to bringing more value to the monitoring side in the future
In addition to the monitoring part, how to make the function under low operation and maintenance cost is also a key consideration. Based on this, the Serverless co-construction group promoted the Serverless machine students to go online with the function dynamic reduction and expansion capacity, and also established the function tenant control platform, which is convenient for the subsequent function capacity, tenant, online control and other work.
Along with this, there is also an important fly Pig Serverless support for multi-unit issues that have been pushed in case an emergency problem occurs to achieve cell escape.
Gateway side enhancement
In the first half of this year, the capability of our gateway side can meet the requirements of the existing C-end business side. In S2, we have done some enhancement work, such as the gateway front-end SDK supporting the transparent transmission of H5 and Rax1.0 gateway information, and the standardized opening of the gateway buried point data and full-link monitoring on the flying pig side. This satisfies serverless full link monitoring
Group to build
Most of the above capabilities are implemented together with the capabilities of the Serverless co-construction side of the Group. Special thanks to the cooperation and support of the brother team, such as FaaS RESEARCH and development platform, integrated scheme, monitoring integration and BaaS capacity, which are strongly dependent on the cooperation of everyone to implement.
Looking forward to
Next year, we will focus more on the business side of the rollout and use, at the same time, we need to verify the real differentiated value of Serverless to the business and prove the machine saving; Also welcome more students to refer to come in, ali Serverless system value to push forward one step!
In the next year, the technical side will focus more on the stability, the underlying BaaS capacity, and the construction of peripheral monitoring system. In the business side, more business scenes will be spread out, and further explore the business value brought by Serverless!