当前位置:网站首页>Cloud native architecture (05) - Application Architecture Evolution

Cloud native architecture (05) - Application Architecture Evolution

2022-06-23 23:59:00 Yanglinwei

01 introduction

Learning reference materials :《 Enterprise Cloud native architecture : technology 、 Service and practice )》

 Insert picture description here

Application architecture has experienced Monomer architecture 、 Distributed architecture 、SOA 、 Microservice architecture 、 Service Grid Architecture 、 Serverless framework Evolution of , This article briefly explains .

02 Monomer architecture

Single application (monolith, Also called Jushi application ) Not a stand-alone application , A single application in a production environment is usually deployed on multiple nodes in a cluster environment .

Single application architecture refers to The realization of business functions is all in one process (process) Finish in , Reception of user requests 、 Call of relevant business logic 、 Getting data from the database and other processing are all completed in one process , This is a more traditional architectural style .

shortcoming : With the further development of enterprise informatization , Single application systems are becoming more and more complex , It's getting bigger and bigger , A large application system often needs a team of hundreds of people to jointly develop and maintain , No one can completely control the whole system , The application deployment will affect the whole body , Every time an application goes online, there are uncertainties and global risks , This brings great challenges to development management . The technical decision link is long , Inefficient development ..

03 Distributed architecture

Distributed architecture : Technicians split it vertically 、 Horizontal split and other different means , Split a large single application system into several independent small application systems , Each small application system is developed and maintained by a team , The team can independently select the system architecture and technology stack of the application , The release and deployment of applications are also more free and flexible , Applications interact with each other through distributed services . Further subdivided into :

  • The front and rear ends are separated . This brings many benefits : It can increase concurrent access , Static content can be placed on content distribution networks (Content Delivery Network, CDN) On , Reduce network stress ; Multi terminal cooperation ( Mobile 、 Browser side ) You can better reuse back-end code ; The front-end design is more professional , It can better improve customer satisfaction .
  • The back-end is split into services . The service-oriented split is due to the application becoming more and more complex , An application often needs hundreds or even thousands of people to develop , Development collaboration has become a big problem , Service is a good solution to this problem . The distributed architecture divides the application into several small application units , Each small application unit only needs a dozen or even smaller teams , Avoid large-scale collaborative development by thousands of people , Greatly improve the efficiency of collaboration .

shortcoming : With the level of distributed architecture application system + Split Vertically , The scale of application systems and services has risen dramatically , The inter invocation relationship between services is intertwined , The system is lined with chimneys 、 Data island and application collaboration have become the problems of enterprise informatization .

04 SOA framework

SOA : It solves the communication problem between enterprise systems from the perspective of system , Scatter the original 、 The network structure between unplanned systems is sorted into a regular one 、 Governable inter system star structure , This step often involves introducing some products .

such as : Enterprise service bus (Enterprise Service Bus, ESB) And technical specifications 、 Service management specifications . The core problem to be solved in this step is “ Orderly ”, So that the services built in various systems can interact in a unified and common way .

 Insert picture description here

shortcoming :SOA It didn't give full play to the effect expected by the designer , First of all , Over emphasis on Technology , High technical requirements ; second , The implementation of SOA All are third parties , It is implemented according to the project , It is difficult to effectively and long-term respond to the needs of the enterprise SOA Services for optimization iterations , In order to achieve the desired purpose ; Third , Everyone to SOA There is a deviation in the understanding of , think SOA It is an integration tool or a process reengineering tool .

05 Microservice architecture

Microservice architecture : It's an architectural model , It promotes the division of a single application into a small set of services , Services collaborate with each other 、 Cooperate with each other , Provide the ultimate value for users . Each service runs in its own process , Services and services use lightweight communication mechanism to communicate with each other ( Usually based on HTTP Agreed REST API). Each service is built around a specific business , And can be independently deployed to the production environment 、 Class production environment, etc . in addition , We should try our best to avoid unified 、 Centralized service management mechanism , For a specific service , Should be based on the business context , Choose the right language 、 Tools to build it .

Microservice architecture and SOA Architecture is fundamentally different , Here's the picture :
 Insert picture description here

shortcoming : Microservice architecture also has some obvious drawbacks : First of all , To adopt RPC The microservice architecture of the protocol , There is a problem of protocol binding between calls between different microservices ; second , In addition to focusing on the implementation of business logic , You also need to deal with a series of problems in the microservice module , For example, service registration 、 Service discovery 、 Service communications 、 Load balancing 、 Service failure 、 Request timeout, Retry, etc , It's very bad . The strength of the business development team lies in business understanding , Not technology .

06 Service Grid Architecture

Service Grid Architecture : In the service grid pattern , Each service is equipped with an agent “sidecar”( Side car ), For communication between services , These agents are typically deployed with application code , And will not be perceived by the application , These agents are organized to form a lightweight network agent matrix , These agents are no longer isolated components , They are a valuable network in themselves .

 Insert picture description here

Service grid is a key component of cloud native technology stack . among Istio The most famous , It provides a simple way to set up a network of deployed Services , With load balancing 、 Service to service authentication 、 Monitoring and other functions , Without changing any service code , Its functions are as follows :

  • Traffic management : Control traffic between services and API The flow of calls , Make the call more reliable , And make the network more robust in bad conditions .
  • Observability : Understand the dependencies between services , And the nature and direction of the flow between them , To provide the ability to quickly identify problems .
  • Strategy execution : Apply organizational strategies to interactions between services , Ensure that access policies are enforced , Resources are well distributed among consumers . The policy change is to configure the grid , Instead of modifying the application code .
  • Service identity and security : Provide verifiable authentication for services in the grid , And provide the ability to protect service traffic , So that it can flow on the network with different credibility .

advantage : The service grid architecture is adopted sidecar Decouple service governance from business and sink to the infrastructure layer , Make the application lighter , Let business development focus more on business itself , With systematic 、 Solve various service governance challenges under the micro service architecture in a standardized way , Improved observability 、 Diagnosability 、 Governance capability and rapid iteration capability .

07 Serverless framework

Serverless( There is no server ): It is a complete process of building and managing microservice architecture , Allow users to Service deployment level instead of Server deployment level To manage application deployment , Can even manage Deployment of a specific function or port , This allows developers to iterate quickly , Develop software faster .

Serverless It's an architectural concept , Its core idea is to abstract the infrastructure providing service resources into various services , With API The method is provided to the user to call on demand , Truly scale on demand 、 Charge for use .

Serverless Architecture is an extension of the traditional cloud computing platform , yes PaaS To finer grained BaaS and FaaS The development of , for example :

  • Functions are services (FaaS): Is an event driven function managed computing service . Through function services , Developers only need to write business function code and set the running conditions , No need to configure and manage infrastructure such as servers . Function code runs in a stateless container , Triggered by an event and transient , And completely managed by a third party , Infrastructure is completely transparent to application developers . Function to be elastic 、 Run in a highly reliable way , And charge for the actual execution of the resource , If it is not implemented, no cost will be incurred .
  • Back end as a service (BaaS): It covers all third-party services that the application may depend on , Like cloud database 、 Authentication 、 Object storage 、 Message queuing and other services , Developers through API And from BaaS Provided by the service provider SDK, Be able to integrate all the back-end functions required , Without building back-end applications , Not to mention infrastructure like virtual machines or containers , To ensure the normal operation of the application .

Serverless Architecture also saves development 、 function 、 O & M costs , Use up release , Charge on demand :
 Insert picture description here

原网站

版权声明
本文为[Yanglinwei]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206232135587309.html