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

Sidecar Pattern

Modern software applications often require external functionalities such as monitoring, logging, configuration, and networking. When these functionalities are tightly integrated into the application, they can run as a single process. However,
this violates the isolation principle and creates an opportunity for a single point of failure. With this idea, containers in cloud-native applications are expected to follow the Unix philosophy:

  • Containers should have one task
  • Containers should work together
  • Containers should handle text streams
The single point of failure (SPOF) is a component within a system where its failure can cause all systems to fail. To have reliable and scalable cloud-native applications, SPOFs are undesirable, and system designs should be checked for their existence.

The Unix philosophy focuses on designing a small operating system with a clean service interface. To have such a system, simple, precise, clear, and modular software development should be undertaken, taking into consideration the developers and maintainers. Besides, the philosophy emphasizes that you should compose subsystems instead of creating a big, monolithic design.

With this idea, it is a conventional approach to separate the main application and run a couple of sidecars attached, which are provided for extra functionality. The main advantages of using a sidecar are as follows:

  • They have independent programming languages and runtime dependencies
  • They monitor the main application closely and minimize latency
  • They extend black box applications

In the following activity, a web-based game will be installed in Kubernetes. As expected, there should be at least one container running the web server. However, there is an additional requirement of continuous source code synchronization.
With the Unix philosophy, it is expected to make containers with only one primary task. They should also work independently and together to achieve the necessary requirements. Finally, these containers should update their statuses, informing the console as log lines. All three of these points are covered in the following activity.

主站蜘蛛池模板: 英超| 垫江县| 中卫市| 博爱县| 蓬溪县| 株洲市| 济阳县| 扎鲁特旗| 原平市| 西昌市| 临沂市| 浮山县| 正宁县| 万宁市| 福清市| 锡林浩特市| 抚州市| 荣成市| 普安县| 玉环县| 吉隆县| 昌黎县| 本溪市| 博爱县| 新田县| 礼泉县| 安庆市| 石棉县| 木里| 灵宝市| 沾化县| 康乐县| 连南| 吐鲁番市| 浦江县| 资溪县| 陆川县| 德格县| 宜城市| 沾化县| 东乌珠穆沁旗|