For example, many architects favor not being locked into a database vendor or cloud provider. However, how likely is a switch really? Maybe 5%, or even lower? How much will it cost you to bring that switching cost down from let's say $50,000 (for a semi-manual migration) to near zero? Likely a lot more than the $2,500 ($50,000 x 5%) you can expect... See more
The interesting function therefore is the red line, the one that adds the up-front invest to the potential liability. That's your total cost and the thing you should be minimizing. In most cases, with increasing up-front invest, you'll move towards an optimum range. Additional investment into reducing lock-in actually leads to higher total cost. The reason is simple: the returns on investment diminish, especially for switches that carry a small probability. If we make our architecture ever-so-flexible, we are likely stuck in this zone of over-investment. The Yagni (you ain't gonna need it) folks may aim for the other end of the spectrum - as so often, the trick is to find the happy medium.
TAO: Facebook’s Distributed Data Store for the Social Graph