Ley de Conway

Hipótesis del espejo

Escrito por Darjus Kazakevic · revisado el

The architecture you get copies how your teams communicate.

Melvin Conway made this observation in 1968. It describes; it does not advise. Teams that talk all day produce tightly coupled parts, because coordinating is cheap for them. Teams that rarely talk produce a hard interface between their parts, because agreeing on anything more is expensive. This happens whether anyone plans it or not.

That is why architecture debates so often become org-chart debates. A boundary that cuts across how people really communicate must be defended in code review forever, and it usually loses. The law turns “why does this boundary keep eroding?” into a question with an answer.

En esencia — An organization that designs a system produces a design whose structure copies its own communication structure.

Cuándo recurrir a él

Recurre a él cuando

  • A module boundary keeps eroding however often review defends it
  • Before you draw service boundaries or reorganize teams
  • To explain why two systems integrate badly: check who talks to whom

Reconsidéralo cuando

  • As a fix by itself: the law predicts structure, it prescribes nothing
  • One small team that talks all day; it predicts no hard boundaries
  • To blame people for a design; the structure drives it, not individuals

Conceptos clave

Communication structure
Who actually talks to whom, often and cheaply. This is not always the org chart: two teams that share a standup communicate like one team.
Mirroring
The effect the law predicts: module boundaries end up where team boundaries are. Inside a team, code grows coupled. Between teams, interfaces stay narrow because each change needs a conversation.
Ownership decides the seam
A module that several teams can change cheaply has no negotiated interface. A module with one owning team gets one, because everyone else must ask first.

Reglas de diseño

Read the org chart before the diagram
Before you defend a boundary, check whether it matches who actually talks to whom. A boundary that cuts through people who coordinate daily erodes, whatever review says.
Give every shared module one owning team
A module that several teams can edit cheaply has no negotiated interface, so it grows imports in every direction. One owner makes everyone else ask, and asking keeps the interface narrow.
Draw service boundaries along team lines
Do not split one service across two teams, or one team across five unrelated services. One team for each service, or for a small group of services, keeps each interface a real agreement.

Errores habituales

  • A microservice boundary drawn through the middle of one team. The team changes both sides together, and the network hop buys nothing.
  • A “shared” library edited by five teams. Two quarters later it imports from all of them.
  • Reorganizing teams without moving code ownership. The old structure stays in the code.