Monolithic Architecture and Microservice Architecture

1. Monolithic architecture

 

advantage

        1. Simple deployment: since it is a complete structure, it can be directly deployed on a server

        2. Single technology: the project does not require a complex technology stack, and a set of familiar technology stacks can be developed

        3. Low labor cost: a single programmer can complete the entire process from business interface to database

shortcoming

        1. The system starts slowly. A process contains all the business logic and involves too many startup modules, which leads to a long period of system startup and restart;

        2. The system has poor isolation and usability of errors, and an error in any module may cause the entire system to go down;
        3. Poor scalability: the expansion of the system can only expand the capacity of this application, and cannot be scaled in combination with the characteristics of business modules .        

        4. The online problem repair cycle is long: Any online problem repair requires a comprehensive upgrade of the entire application system.
        5. Poor level of cross-language

        6. Not conducive to security management, all developers have full code
 

Second, microservices

1. Advantages of microservice architecture
        1. Ease of development and maintenance
        A microservice only focuses on a specific business function, so its business is clear and the amount of code is small. Develop and maintain a single

        Microservices are relatively simple. The entire application is built from several microservices, so the entire application will remain under control

        state;

         2. The startup of a single microservice is faster,
        and the code volume of a single microservice is less, so the startup will be faster;

        3. Partial modification is easy to deploy.
        As long as there is a modification, the entire application must be redeployed. Microservices solve this problem. Generally speaking, for a

        To modify a microservice, you only need to redeploy the service;

        4. The technology stack is not limited
        In microservices, we can choose a technology stack reasonably based on the characteristics of the project business and the team

        5. Scale on demand

2. Disadvantages (challenges) of the microservice architecture
        1. There are too many services, resulting in intricate dependencies between services and difficult operation and maintenance

        2. Microservices magnify a series of problems in distributed architecture
                Distributed transactions (seata).
                How to deal with distributed locks (redisson),

                ·Service registration and discovery (nacos).
                ·Depending on service instability (sentinel), what should I do if the service avalanches?
        3. The complexity of operation and maintenance increases sharply. The large number of deployments and monitoring processes lead to an increase in the overall complexity of operation and maintenance.


 

Guess you like

Origin blog.csdn.net/weixin_53810346/article/details/125665918