Designing for Scale, Part 1: When the Rewrite Is the Right Thing to Do

Imagine for a moment that you have inherited a legacy software system. The system has been passed around multiple teams over a long period of time, each adding their own modifications. You were not part of the team that built the system, you don’t entirely understand what it is intended to do, and you cannot comprehend the implementation. You know that it has some serious flaws, but it is stable and has been running without incident for a long time.
Now, imagine that system suffers a catastrophic failure.