LOAD-BEARINGfree
High-level designTier 14 · unit 6 of 12 · 13 min read

Lock-in and exit cost as a design input

"Avoid vendor lock-in" is advice with no operational content. Everything you adopt locks you in to some degree, including the open-source database you chose specifically because it would not. Lock-in is not a state you can avoid; it is a cost you can measure, and the mark of a senior decision is that the number was written down at adoption time rather than discovered at renewal.

The spectrum, cheapest exit to most expensive

  • Compute. VMs and containers running your code. Genuinely cheap to move — this is the layer everyone worries about and it is the layer that matters least.
  • Managed open source. Managed Postgres, managed Kafka. The API is portable, so your application barely notices; what does not port is the operational surface — backups, failover, tuning, the runbooks your team wrote. Weeks, not quarters.
  • Proprietary services with an open shape. Object storage, queues, load balancers. Different API, same concept, and 5.04's anti-corruption layer makes the swap a bounded project.
  • Proprietary data stores with no equivalent. A vendor's serverless database, a proprietary query engine, a managed workflow product with its own execution semantics. Here the data model itself may not have a destination, and "migrate" means "redesign". Expensive, and the expense is invisible until you try.
  • Data gravity. The real one, and the one that appears on no architecture diagram. Egress charges on hundreds of terabytes, plus the wall-clock time to physically move it, plus running both copies during the overlap. Lesson 14.02 said cost is an architecture constraint; this is the sharpest instance of it.
  • Organisational. Your team's expertise, your infrastructure-as-code, your on-call tooling, your accumulated compliance evidence. Leaving means retraining people and re-certifying an estate. Consistently the most underestimated line on the list, because it does not look like technology.

The question worth asking instead

Not "will this lock us in", which always answers yes. Rather: what would it cost, in weeks and in rupees, to leave — and is that acceptable for this particular component?

Ask it at adoption, while you still have leverage, alternatives and clarity. Write the estimate in the decision record next to the reasons you chose the thing. Two years later, in a renewal conversation, that number is the difference between a negotiation and an acceptance — and a credible exit is one of the very few places where an architecture decision shows up directly in commercial terms.

An acceptable exit cost is not the same as a low one. "Three months and ₹40 lakh, and we would only ever do it under duress" is a perfectly good answer for a database you are otherwise delighted with. The failure is not high cost; it is not knowing.

Where abstraction pays, and where it is theatre

Lesson 5.04 gave you the mechanism, and the discipline is knowing when to spend it. Contain the vendor at boundaries where the exit cost is high and the surface is narrow — the payment provider, the notification gateway, the auth provider. That is a small adapter protecting a large expense.

Do not build a portability layer over everything. Writing an abstraction across three clouds' SDKs so that you could move means you pay indirection, lost vendor features and maintenance every single day, in exchange for an option you will exercise on perhaps one project in twenty. Worse, the lowest common denominator of three providers is a worse platform than any one of them, and you have committed to it permanently to preserve a choice you will most likely never make.

Which leads to a conclusion that is more useful than it sounds: deliberate lock-in at a known price is a legitimate and often correct decision. Use the managed service, use its good parts properly, and know what leaving would cost. That is a strictly better position than a half-hearted abstraction that neither performs well nor actually enables the exit.

Multi-cloud, honestly

As an availability strategy it is usually theatre. You have acquired two control planes, two security models, two sets of on-call knowledge and twice the configuration surface — and configuration is what causes most correlated failures, so the risk you were buying insurance against is the one you made worse. Lesson 14.01 made the same argument about multi-region: the cost is continuous and the benefit is occasional.

As a negotiating position, or where a regulator or a customer contract requires it, it can be entirely real. The distinction is whether anyone can name the failure it is meant to survive.

The trap

The abstraction layer built for a migration that never happens. It is the most respectable-looking waste in architecture: every reviewer nods, nobody can argue against portability, and it charges rent forever — indirection on every call, features you cannot use because the other provider lacks them, and a translation layer that must be maintained by people who will never see it pay off. Prefer to keep the vendor's edges contained at one narrow boundary and the exit cost measured and current. A number in a document costs nothing to carry; an unused abstraction costs something every day.