lundi 23 septembre 2019

Containerising application - design pattern

I am working on containerizing a bunch of applications that have the following structure at a high level:-

  1. Read from a DB/File system
  2. Extract the data or do some parsing (Business logic)
  3. Write back the crunched data to datastore.

Let name these 3 steps as s1, s2, and s3.

What is the best way to have a balance between code reuse and making the solution overly complexity? In other terms what is the best design pattern/practice to implement this kind of solutions that are industry-accepted?

Few approached that I could pen own are as follows:-

  1. Separate pods for each application with one container each, having s1, s2, and s3 as part of same code.
    • Benefits: Simple and compact code base. No interprocess/pod communication
    • Limitation: No Code reuse
  2. Separate pods for each application, with each pod having 3 container doing separate functionality as s1, s2, and s3.
    • Benefits: Code reuse.
    • Limitation: Interprocess communication may increase processing latency.
  3. Separate group of pods for s1, s2, and s3 says sg1, sg2, and sg3 respectively running independently. From an application perspective, we create a new pod that talks to the mentioned 3 pod groups to get work done.
    • Benefits: Code reuse.
    • Limitation: Interprocess communication may increase processing latency. Also, maintaining pod groups is an add-on overhead. Increase in complexity

Request to suggest any other alternative if suitable.

Aucun commentaire:

Enregistrer un commentaire