Table of Contents
Fetching ...

Patterns of Multi-Container Composition for Service Orchestration with Docker Compose

Kalvin Eng, Abram Hindle, Eleni Stroulia

TL;DR

This work addresses the lack of guidance for composing Docker Compose-driven multi-container service orchestrations by mining real-world patterns from self-hosted projects. It combines open coding across three usage dimensions (service, orchestration, repository) with frequent itemset mining to identify 14 recurring Docker Compose patterns, such as HTTP reverse proxies, database-plus-caching combinations, and YAML anchors for reuse. The authors provide a replication package with an open-coded dataset and analysis scripts, and demonstrate the patterns with concrete, real-world examples from the self-hosted ecosystem. The study offers practitioners a structured pattern taxonomy to simplify, standardize, and reuse Docker Compose configurations, while contributing empirical evidence to the broader literature on Infrastructure as Code patterns and software design patterns.

Abstract

Software design patterns present general code solutions to common software design problems. Modern software systems rely heavily on containers for running their constituent service components. Yet, despite the prevalence of ready-to-use Docker service images ready to participate in multi-container service compositions of applications, developers do not have much guidance on how to compose their own Docker service orchestrations. Thus in this work, we curate a dataset of successful projects that employ Docker Compose as an orchestration tool to run multiple service containers; then, we engage in qualitative and quantitative analysis of Docker Compose configurations. The collection of data and analysis enables the identification and naming of repeating multi-container composition patterns that are used in numerous successful open-source projects, much like software design patterns. These patterns highlight how software systems are orchestrated in the real-world and can give examples to anybody wishing to compose their own service orchestrations. These contributions also advance empirical research in software engineering patterns as evidence is provided about how Docker Compose is used.

Patterns of Multi-Container Composition for Service Orchestration with Docker Compose

TL;DR

This work addresses the lack of guidance for composing Docker Compose-driven multi-container service orchestrations by mining real-world patterns from self-hosted projects. It combines open coding across three usage dimensions (service, orchestration, repository) with frequent itemset mining to identify 14 recurring Docker Compose patterns, such as HTTP reverse proxies, database-plus-caching combinations, and YAML anchors for reuse. The authors provide a replication package with an open-coded dataset and analysis scripts, and demonstrate the patterns with concrete, real-world examples from the self-hosted ecosystem. The study offers practitioners a structured pattern taxonomy to simplify, standardize, and reuse Docker Compose configurations, while contributing empirical evidence to the broader literature on Infrastructure as Code patterns and software design patterns.

Abstract

Software design patterns present general code solutions to common software design problems. Modern software systems rely heavily on containers for running their constituent service components. Yet, despite the prevalence of ready-to-use Docker service images ready to participate in multi-container service compositions of applications, developers do not have much guidance on how to compose their own Docker service orchestrations. Thus in this work, we curate a dataset of successful projects that employ Docker Compose as an orchestration tool to run multiple service containers; then, we engage in qualitative and quantitative analysis of Docker Compose configurations. The collection of data and analysis enables the identification and naming of repeating multi-container composition patterns that are used in numerous successful open-source projects, much like software design patterns. These patterns highlight how software systems are orchestrated in the real-world and can give examples to anybody wishing to compose their own service orchestrations. These contributions also advance empirical research in software engineering patterns as evidence is provided about how Docker Compose is used.
Paper Structure (37 sections, 18 figures, 5 tables)

This paper contains 37 sections, 18 figures, 5 tables.

Figures (18)

  • Figure 1: Example of a Docker Compose file
  • Figure 2: Project Selection Process
  • Figure 3: Distribution of Stars
  • Figure 4: Open Coding Process Outline Inspired by seidel1998qualitative
  • Figure 5: Pattern of Automatic Docker Compose File Generation.
  • ...and 13 more figures