How to save your systems from collapsing- Graceful Degradation [Technique Tuesdays]
A design principle to help you build software systems that are robust to shocks.
Hey, it’s your favorite cult leader here 🐱👤
On Tuesdays, I will cover problem-solving techniques that show up in software engineering, computer science, and Leetcode Style Questions📚📚📝📝.
To get access to all my articles and support my crippling chocolate milk addiction, consider subscribing if you haven’t already!
p.s. you can learn more about the paid plan here.
Recently our cult hit a very important milestone.
AI Made Simple, the sister publication to Tech Made Simple, reached 25 recommenders (25 publications recommending it). The newest inclusion into it was The AIEdge Newsletter, one of the best resources online for learning about MLOps and ML Engineering at scale. Damien has deep experience in leading Machine Learning Teams across various industry leaders- including Meta. His endorsement certainly means a lot. If you’d like to join the party and stay on top of AI, make sure you bring your grandma and sign up for AI Made Simple here (it’s free!!)
In Damien’s honor, I figured we will be covering an extremely important design principle that can help you design systems that stand extreme shocks. Graceful degradation is the ability of a computer, machine, electronic system or network to maintain limited functionality even when a large portion of it has been destroyed or rendered inoperative. The purpose of graceful degradation is to prevent catastrophic failure. In today’s edition of Tech Made Simple, we will be covering how you can implement it to ensure that your software systems stays running when things get funky.
Key Highlights
What is Graceful Degradation- As mentioned earlier, it is the principle of designing software/applications where the core operations stay active when large parts of the system go down. Take web-dev for instance. Ideally, you want to design apps that can take advantage of the new features of browsers while also working with older browsers. Remember, your website/loses a lot of money if it goes down permanently. So staying active where possible is a huge priority.
80/20 Principle and Graceful Degradation- One of the best ways to integrate GD into software (and build systems in general) is through the use of the 80-20 principle- 80% of your results come from 20% of the actions. There are only a few key components of your system. By prioritizing backing those up, you can keep your systems active if some of those critical components blow up.
Use progressive enhancement and Graceful Degradation: Progressive enhancement is a related but different approach to graceful degradation. Mozilla’s website defines it as thw- design philosophy that provides a baseline of essential content and functionality to as many users as possible, while delivering the best possible experience only to users of the most modern browsers that can run all the required code. In a way, this is complementary to GD. You can extend this principle beyond web dev, and build your more fancy user experience features over a layer of your core features that are available to all.
Graceful Degradation and Netflix- Netflix devs are generally fans of this technique- citing it as one of the things that went well in their writeup- Lessons Netflix Learned from the AWS Outage. Here is how they implemented GD-
Fail Fast: Set aggressive timeouts such that failing components don’t make the entire system crawl to a halt.
Fallbacks: Each feature is designed to degrade or fall back to a lower quality representation. For example if we cannot generate personalized rows of movies for a user we will fall back to cached (stale) or un-personalized results.
Feature Removal: If a feature is non-critical then if it’s slow we may remove the feature from any given page to prevent it from impacting the member experience.
In that way, it goes well with their chaos engineering philosophy which I covered over here.
Ultimately, Graceful Degradation is as much about having empathy with your customers and identifying what truly matters as it is about programming and technical engineering. A hot take, yes. But one I will stand by. Would love to hear what you think.
That is it for this piece. I appreciate your time. As always, if you’re interested in reaching out to me or checking out my other work, links will be at the end of this email/post. If you like my writing, I would really appreciate an anonymous testimonial. You can drop it here. And if you found value in this write-up, I would appreciate you sharing it with more people. It is word-of-mouth referrals like yours that help me grow.
Upgrade your tech career with a premium subscription ‘Tech Made Simple’! Stay ahead of the curve in AI, software engineering, and tech industry with expert insights, tips, and resources. 20% off for new subscribers by clicking this link. Subscribe now and simplify your tech journey!
Using this discount will drop the prices-
800 INR (10 USD) → 640 INR (8 USD) per Month
8000 INR (100 USD) → 6400INR (80 USD) per year
Reach out to me
Use the links below to check out my other content, learn more about tutoring, reach out to me about projects, or just to say hi.
If you like my writing, I would really appreciate an anonymous testimonial. You can drop it here.
To help me understand you fill out this survey (anonymous)
Small Snippets about Tech, AI and Machine Learning over here
Check out my other articles on Medium. : https://rb.gy/zn1aiu
My YouTube: https://rb.gy/88iwdd
Reach out to me on LinkedIn. Let’s connect: https://rb.gy/m5ok2y
My Instagram: https://rb.gy/gmvuy9
My Twitter: https://twitter.com/Machine01776819