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

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
主站蜘蛛池模板: 周至县| 万载县| 连城县| 隆子县| 皮山县| 靖远县| 利辛县| 庄河市| 桦甸市| 大同县| 沙洋县| 湘阴县| 胶南市| 泌阳县| 施秉县| 瑞昌市| 临漳县| 吐鲁番市| 唐河县| 新泰市| 房产| 边坝县| 阳谷县| 枣强县| 靖西县| 巩留县| 连城县| 都江堰市| 遂昌县| 循化| 梓潼县| 永丰县| 汶川县| 大埔县| 正宁县| 锡林浩特市| 沐川县| 乌恰县| 盈江县| 江西省| 滨州市|