HOME

TheInfoList



OR:

In
systems design Systems design interfaces, and data for an electronic control system to satisfy specified requirements. System design could be seen as the application of system theory to product development. There is some overlap with the disciplines of system an ...
, a fail-fast system is one which immediately reports at its interface any condition that is likely to indicate a failure. Fail-fast systems are usually designed to stop normal operation rather than attempt to continue a possibly flawed process. Such designs often check the system's state at several points in an operation, so any failures can be detected early. The responsibility of a fail-fast module is detecting errors, then letting the next-highest level of the system handle them.


Hardware and software

Fail-fast systems or modules are desirable in several circumstances: * Fail-fast architectures are based on an error handling policy where any detected error or non-contemplated state makes the system fail (fast). In some sense the error handling policy is the opposite of that used in a
fault-tolerant system Fault tolerance is the property that enables a system to continue operating properly in the event of the failure of one or more faults within some of its components. If its operating quality decreases at all, the decrease is proportional to the ...
. In a fault-tolerant system a error handling policy is established to have redundant components and move computation requests to alive components when some component fails. Paradoxically fail-fast systems make fault-tolerant systems more resilient. We can have 10 redundant servers for a given database, but if the shared configuration for the 10 servers is updated with wrong authentication data for clients, all of them will "redundantly fail". In that sense, a fail-fast system will get sure that all the 10 redundant servers fail as soon as possible to make the DevOps react fast. * Fail-fast components are often used in situations where failure in one component might not be visible until it leads to failure in another component as a consequence of lazy initialization. e.g. "The system that is "doomed" to fail because a file-system path is wrongly setup, does it not fail at startup because the file-system path is not checked at startup. Only when a client-request arrives the system fails, at random, later on. * Finding the cause of a failure is easier in a fail-fast system, because the system reports the failure with as much information as possible as close to the time of failure as possible. In a fault-tolerant system, the failure might go undetected, whereas in a system that is neither fault-tolerant nor fail-fast the failure might be temporarily hidden until it causes some seemingly unrelated problem later. * A fail-fast system that is designed to halt as well as report the error on failure is less likely to erroneously perform an irreversible or costly operation. Developers also refer to code as fail-fast if it tries to fail as soon as possible at variable or object initialization. In
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of " objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
, a fail-fast-designed object initializes the internal state of the object in the constructor, launching an exception if something is wrong (rather than allowing non-initialized or partially initialized objects that will fail later due to a wrong "setter"). The object can then be made
immutable In object-oriented computer programming, object-oriented and Functional programming, functional programming, an immutable object (unchangeable object) is an object (computer science), object whose state cannot be modified after it is created.Goet ...
if no more changes to the internal state are expected. In functions, fail-fast code will check input parameters in the
precondition In computer programming, a precondition is a condition or predicate that must always be true just prior to the execution of some section of code or before an operation in a formal specification. If a precondition is violated, the effect of th ...
. In client-server architectures, fail-fast will check the client request just upon arrival, before processing or redirecting it to other internal components, returning an error if the request fails (incorrect parameters, ...). Fail-fast-designed code decreases the internal
software entropy Software entropy is the idea that software eventually rots as it is changed if sufficient care is not taken to maintain coherence with product design and established design principles. The common usage is only tangentially related to entropy as de ...
, and reduces debugging effort.


Examples

* A fail-fast application/system checks that all input/output resources needed for future computations are ready before any computation request arrives. * A fail-fast application/system checks that all inmutable initial configuration is correct at startup. * A fail-fast function is a function that checks all input that to the function in a
Precondition In computer programming, a precondition is a condition or predicate that must always be true just prior to the execution of some section of code or before an operation in a formal specification. If a precondition is violated, the effect of th ...
before proceeding with any computation or business logic in such function. * A fail-fast function will normally throws a runtime exception, when some abnormal computation, is found making the system fail if no "catch" has been contemplated by any other, vs returning some error-value without making any (optimistic) assumption about the correct management of the raised error. * From the field of
software engineering Software engineering is a systematic engineering approach to software development. A software engineer is a person who applies the principles of software engineering to design, develop, maintain, test, and evaluate computer software. The term ' ...
, a Fail Fast Iterator is an
iterator In computer programming, an iterator is an object that enables a programmer to traverse a container, particularly lists. Various types of iterators are often provided via a container's interface. Though the interface and semantics of a given ite ...
that attempts to raise an error if the sequence of elements processed by the iterator is changed during
iteration Iteration is the repetition of a process in order to generate a (possibly unbounded) sequence of outcomes. Each repetition of the process is a single iteration, and the outcome of each iteration is then the starting point of the next iteration. ...
. * Given an initial state in a state machine, a fail-fast system will check such state and fail fast. * Given an state-change in a state machine, the fail-fast system will halt the machine if the state-change is forbidden. It could be the case that the forbidden state-change is due to a wrong external input. In that case the fail-fast system will stop processing the request as soon as the wrong input is detected (vs. delegating to the state-machine implementation).


Business

The term has been widely employed as a metaphor in business, dating back to at least 2001, meaning that businesses should undertake bold experiments to determine the long-term viability of a product or strategy, rather than proceeding cautiously and investing years in a doomed approach. It became adopted as a kind of "mantra" within
startup A startup or start-up is a company or project undertaken by an entrepreneur to seek, develop, and validate a scalable business model. While entrepreneurship refers to all new businesses, including self-employment and businesses that never intend t ...
culture, i.e. "Fail fast, fail often."


See also

*
Accelerationism Accelerationism is a range of Marxist and reactionary ideas in critical and social theory that call for the drastic intensification of capitalist growth, technological change and other social processes in order to destabilize existing systems ...
*
Crash-only software Crash-only software refers to computer programs that handle failures by simply restarting, without attempting any sophisticated recovery. Correctly written components of crash-only software can microreboot to a known-good state without the help ...
* Design by contract *
Failing badly Failing badly and failing well are concepts in systems security and network security (and engineering in general) describing how a system reacts to failure. The terms have been popularized by Bruce Schneier, a cryptographer and security consulta ...
vs. failing well *
Fail-safe In engineering, a fail-safe is a design feature or practice that in the event of a specific type of failure, inherently responds in a way that will cause minimal or no harm to other equipment, to the environment or to people. Unlike inherent safe ...
*
Fail-stop {{Unreferenced, date=June 2019, bot=noref (GreenC bot) A fail-stop subset of a computer language is one that has the same semantics as the original, except in the case where an exceptional condition arises. The fail-stop subset must report an exce ...
*
Fail-silent system A fail-silent system is a type of system that either provides the correct service Service may refer to: Activities * Administrative service, a required part of the workload of university faculty * Civil service, the body of employees of a gover ...


References


External links

* {{cite document , citeseerx = 10.1.1.110.9127 , title = Why Do Computers Stop And What Can Be Done About It? , authorlink = Jim Gray (computer scientist) , first = Jim , last = Gray , year = 1985 , postscript = , introducing 'Fail Fast'
"Fail Fast" Article by Jim Shore explaining using 'Fail Fast' concept in software development
(from 'columns for IEEE software' edited by Martin Fowler) Engineering failures Programming principles