Our Users Are Developers

Once a company grows past a single development team, someone has to build what everyone uses: where the code runs, how the services talk to each other, how a new version goes live. This is often treated as technical work in the background. But when the shared infrastructure doesn't serve the teams, every team pays for it in time: waiting, working around it, or running into a failure nobody noticed.

I mentored the team that built the shared infrastructure for six teams, which together built one system. Right at the start I defined the role for the team, first in a meeting and then in writing: "Our responsibility here is what they call the 'platform' in the industry, it means usually the infrastructure, deployment, integrations, notifications, etc. So in your designs please take into account that our users are actually other developers, other teams, and some inner functions in the company, and not the end user of the company".

Shared infrastructure is a product in every sense, and its customers are the other teams. If they don't understand how to use it, it doesn't work, even when the code is perfect.

One Team's Mistake Doesn't Stop Everyone

The first debate was about the file that decides how the whole system goes live: which services run, and with which settings. One of the engineers pointed out a real problem: if all the teams work on one file, one team's mistake blocks everyone's deployment. The usual solution is a separate file per team. But then there are six copies of the same settings, and every shared change has to go through six places. Over time the copies drift apart, and nobody knows anymore which one is right.

In the end we combined the two options. One main file stayed, shared, with all the settings, and every component in it is on by default. Next to it, each team has a small file of its own that only switches components on and off: a team working on one service switches on its service and what it needs, and switches off everything else. The automated tests run for each team with its own file.

That way one team's mistake stays with that team, and nobody has to maintain six versions of the same settings.

The Silent Failures

When one of the engineers connected the first product team, I asked her to use an existing mechanism that passes each service its settings file. She read the mechanism's code before using it, and found a problem: it would pass the same file to every service in the system. In other words, one team's database password would reach every other service. That is a security hole, and no test would have caught it, because all the services would have kept working as usual. She fixed the mechanism so each service gets only its own settings.

A few days later she found that one of the services "worked" only in the sense that it didn't crash. In practice it couldn't connect to the messaging system, because the messaging system required authentication and no service had the credentials. It just kept retrying in the background, quietly.

Shared infrastructure must not fail silently. What doesn't crash doesn't wake anyone up, until someone discovers the data never arrived, or a password reached a place it should never have reached. When something is wrong, the infrastructure has to crash or raise an alert, not carry on as if nothing happened.

A Written Agreement for the Other Teams

Within the first weeks, other teams started asking how to connect to the shared services. Product teams don't read the infrastructure's code. They read the message you write them.

Before we wrote to them, I asked the team what we were missing from each team. The answers were lists of questions. To get a service live, we needed to know how it is packaged, how to check that it is alive, and which settings it expects to receive. To connect it to the messaging system, we needed to know which messages it sends, and what each one looks like.

We could have sent those lists to every team and waited for answers. Instead we flipped the direction: we wrote one message that says what we give them. Where each service will find its settings file, how the file is structured, and which message formats the system supports. That way the decisions stayed with us, and every team knew exactly what to adapt to.

The same rule came back every time the team changed something that affected others. For example, when it turned out every developer needed a personal permission to download the services from the company's private registry, I wrote that we should tell them so in advance. At the same time, it must not become one more task for them: the developer only brings their own permission, and the infrastructure sets up everything else with it.

And when another team wasn't ready yet, with no final message format and no service sending the messages, one of the engineers asked whether to build a stand-in on our side in the meantime. I answered: "yes, but let's communicate it to them and tell them this is a blocker for us". A stand-in nobody knows about stays forever.

What's Under the Infrastructure Moves Too

During those three months, some of the components the infrastructure relied on changed, regardless of anything we did. Versions of ready-made components we used stopped being available, and the team had to move to older versions. When we added a second server for running tests, the public service the components are downloaded from started blocking us: eight runs failed within three minutes. When I saw a workaround the team had built to deal with one of the problems, I said it was better to build the component ourselves and keep it on our side.

None of this was our code, and all of it was our problem. Whoever builds shared infrastructure has to plan time for maintaining things they didn't write.

Takeaways

  1. Write to the other teams how to use the infrastructure, before you polish it. One clear message is worth more than perfect code nobody understands.
  2. Shared settings, and small exceptions per team. That way one team's mistake doesn't stop everyone.
  3. Don't let failures be silent. Read the existing code, not just the change, and make sure every failure raises an alert.
  4. Plan time to maintain what you didn't write. The infrastructure under your infrastructure doesn't stand still.

Infrastructure work is customer work. The customers just happen to write code themselves.