Chapter 1 - Reliable, Maintainable and Scalable Applications Flashcards
What would we use typically to store data so that one application or another can find it again later?
A database
What would we typically use to remember the result of an expensive operation so we could speed up reads?
A cache
What would we build to allow efficient searching by keyword or filtering
A search index
What would we use (one example) to send a message to another process in a way that allows that message to be processed asynchronously
Sream processing
What kind of processing would typically describe periodically crunching large amounts of accumulated data?
Batch processing
Does a one size fits all approach typically work well today when designing applications
It depends but in generally no. There are many different types of databases, search index and caching tools and knowing which ones to choose and how to combine them is critical when designing most modern applications today.
When you combine several tools in a service and hide the details behind a common Application Programming Interface, what have you done?
You’ve essentially created your own special purpose data system from smaller more general purpose components. You need to think pretty hard about the guarantees it can make and then tradeoffs of how you combine these tools.
Sum up the meaning of ‘Reliability’
The system should continue to work correctly (performing the correct function at the desired level of performance) even in the face of adversity (hardware or software faults, and even human error).
Sum up the meaning of ‘Scalability’
As the system grows (in data volume, traffic volume, or complexity), there should be reasonable ways of dealing with that growth.
Sum up the meaning of ‘Maintainability’
Over time, many different people will work on the system (engineering and operations, both maintaining current behaviour and adapting the system to new use cases), and they should all be able to work on it productively.
Give 4 reasonable expectations of Reliability
The application performs the function that the user expected.
It can tolerate the user making mistakes or using the software in unexpected ways.
Its performance is good enough for the required use case, under the expected load and data volume.
The system prevents any unauthorised access and abuse.
Is it a reasonable expectation to make a system fault tolerant of every eventuality.
No, there are some faults which a system could never be expected to recover from reasonably. If the world ended, you would have to host the system in space. We have to think about the types of faults we want our system to tolerate.
What’s the difference between a fault and a failure
A fault is one component of the system deviating from expected behaviour whereas a failure is the entire system not performing as expected. We can’t prevent all faults but we can design fault tolerant mechanisms that stop faults from becoming failures.
What are some ways we could deal with hardware faults?
Redundancy of components and infrastructure
Using software systems that can tolerate the loss of an entire machine (Kubernetes for example)
What are some examples of Software faults?
A bug in the software
A runaway process that uses up shared resources (CPU time, memory, disk space, network bandwidth).
Cascading failures (a fault in one component triggers a fault in another component which triggers a fault in another component).