官术网_书友最值得收藏!

  • DevOps with Kubernetes
  • Hideto Saito Hui Chuan Chloe Lee Cheng Yang Wu
  • 350字
  • 2021-07-02 13:41:44

Microservices

Although microservices have the word micro in their name, they are actually pretty heavy compared to applications from the 1990s or early 2000s. They use full stack HTTP/SSL servers and contain entire MVC layers.

The microservices design has the following advantages:

  • Stateless: They don't store user sessions to the system, which helps to scale the application.
  • No shared data store: Microservices should have their own data stores, such as databases. They shouldn't share these with other applications. They help to encapsulate the backend database so that it is easier to refactor and update the database scheme within a single microservice.
  • Versioning and compatibility: Microservices may change and update the API, but they should define versions, such as /api/v1 and /api/v2, that have backward compatibility. This helps to decouple other microservices and applications.
  • Integrate CI/CD: The microservice should adopt the CI and CD process to eliminate management effort.

There are some frameworks that can help to build microservice-based applications, such as Spring Boot (https://projects.spring.io/spring-boot/) and Flask (http://flask.pocoo.org). However, there're a lot of HTTP-based frameworks, so developers can feel free to choose any preferred framework or programming language. This is the beauty of the microservice design.

The following diagram is a comparison between the monolithic application design and the microservices design. It indicates that a microservice design is the same as the monolithic design; they both contain an interface layer, a business logic layer, a model layer, and a data store. The difference is, however, that the application is constructed of multiple microservices. Different applications can share the same microservices:

The developer can add the necessary microservices and modify existing microservices with a rapid software delivery method that won't affect an existing application or service. This is an important breakthrough. It represents an entire software development environment and methodology that's widely accepted by developers.

Although CI and CD automation processes help to develop and deploy microservices, the number of resources, such as VMs, OS, libraries, disk volumes, and networks, can't compare with monolithic applications. There are some tools that can support these large automation environments on the cloud.

主站蜘蛛池模板: 达拉特旗| 呼伦贝尔市| 九龙县| 顺义区| 当阳市| 井陉县| 皮山县| 三台县| 柯坪县| 海门市| 虹口区| 南木林县| 建湖县| 辽阳县| 吉木乃县| 铜川市| 黑龙江省| 梅河口市| 海林市| 呼伦贝尔市| 天柱县| 襄城县| 岫岩| 海兴县| 县级市| 平山县| 夹江县| 皮山县| 仁怀市| 大庆市| 曲阜市| 镇沅| 定襄县| 合阳县| 视频| 大石桥市| 宾阳县| 寿宁县| 肥西县| 横峰县| 云安县|