Show in graph

Software → Software Design

Shared Library

A versioned code package reused by multiple applications or services to provide common implementation behavior.

Shared Library

A Shared Library is a versioned code package consumed by multiple applications or services. It is useful for stable, low-variability concerns such as protocol clients, data types, validation helpers, telemetry instrumentation, or security primitives.

Unlike a shared service, a shared library runs inside each consuming process. This avoids a network dependency but couples consumers to package versions, runtime compatibility, and release practices.

Use it when

  • The capability is deterministic and does not need centralized state.
  • Local execution is important for latency or availability.
  • Consumers can upgrade independently.

Be cautious when

  • Business rules change frequently across teams.
  • Consumers need different behavior.
  • A library would expose internal domain models.
  • Coordinated upgrades would become mandatory.