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

Behavioral Patterns

In software development, behavioral design patterns focus on the communication and interaction between objects. Interaction and communication includes responsibility assignment, the encapsulation of behaviors, and the delegation of requests. With the microservice architecture, behavioral patterns focus on the communication between microservices and the interaction of services with orchestration tools.

For instance, let's consider the execution of a microservice that checks a user's quota daily. It can be implemented by an infinite loop that includes 24 hours of sleep and the execution of the quota check. Although it works, it consumes additional resources during sleep and creates an inefficient architecture. With the behavioral pattern of the "scheduled job pattern," orchestration tools could handle the scheduling of the microservice and ensure that it runs every 24 hours.

In Kubernetes, containers are encapsulated inside pods, which are the primary interest of behavioral patterns. Behavioral patterns are focused on the interaction and communication of the Kubernetes resources, namely pods, with the Kubernetes services. Communication and interaction within the controller system could include the distribution of pods to nodes, the scheduling of pods, or metadata distribution by the Kubernetes master and node components.
The following behavioral patterns are covered in the following sections:

  • The job pattern
  • The scheduled job pattern
  • The daemon service pattern
  • The singleton service pattern
  • The introspective pattern
主站蜘蛛池模板: 卓资县| 盐津县| 宁德市| 苏尼特左旗| 伊吾县| 武汉市| 稷山县| 东阳市| 娱乐| 永修县| 桓仁| 兖州市| 水富县| 东莞市| 白银市| 双辽市| 利川市| 华池县| 辽阳县| 新龙县| 丰宁| 吉木乃县| 吉林省| 利辛县| 宣城市| 承德县| 朝阳市| 嘉鱼县| 海宁市| 民勤县| 宣汉县| 陆丰市| 阿坝县| 漳州市| 五指山市| 水富县| 资中县| 渭南市| 桑日县| 达尔| 吉木萨尔县|