18
Robust & Anti Fragile Design Lior Harel, Kenshoo

Robust & anti fragile

Embed Size (px)

Citation preview

Robust & Anti Fragile Design

Lior Harel, Kenshoo

What’s a Bad Design?

1. Rigid2. Fragile3. Immobility

What’s a Good Design

1. Flexible 2. Robust 3. Reusable

Robustness Principle“Be Conservative in what you do, be liberal in what you accept from others”

Postel’s law - Jon Postel (God of the Internet)

For Example

def add_numbers(numbers):

"""

takes in a simple array of numbers. It will then iterate

over each number,

while doing so it adds the numbers together, finally it

returns the result.

"""

sum = 0

for number in numbers:

sum += number

return sum

Linux/Unix Philosophy ● Robustness results from transparency and simplicity● Rule of Composition - Small, modular programs

Python Zen Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those!

Agile…

Increase rate of change

But… Is Robust the Opposite of Fragile?

Anti Fragile“Anti fragile is beyond resilience or robustness. The resilient resists shocks and stays the same; the antifragile gets better”

A book by Nassim Taleb

Definitions● Fragile - (of an object) easily broken or damaged Merriam-Webster

● Resilient - The capacity of a system, enterprise, or a person to maintain its

core purpose and integrity in the face of dramatically changed

circumstances.

● Robust - A system or entity that has been hardened so that it is not easily

broken, while lacking the recovery abilities of a resilient system.

● Antifragile - "Beyond resilience or robustness. The resilient resists shocks

and stays the same; the antifragile gets better." Antifragile

Black Swan1. The event is a surprise (to the observer).

2. The event has a major effect.

3. After the first recorded instance of the event, it is

rationalized by hindsight, as if it could have been

expected; that is, the relevant data were available but

unaccounted for in risk mitigation programs. The same

is true for the personal perception by individuals

Currency Rates Black Swan in Kenshoo

Resilient Systems

● Cloud - Auto scaling● Mobile - No Network

Micro Services

(SRP anyone?)

Anti Fragile How To ● Create fault tolerant applications

● Regularly induce failures to reduce uncertainty

Netflix Simian ArmyChaos Monkey, a tool that randomly disables our production instances to make sure we can survive this common type of failure without any customer impact

Chaos Gorilla is similar to Chaos Monkey, but simulates an outage of an entire Amazon availability zone.

Thank You...