BetterDev #166 - Building resilient services at Prime Video with chaos engineering
Better Dev #166 Aug 24, 2020
Hi everyone, Welcome to issue #166. Let’s get straight to our links this time
Large-scale distributed software systems are composed of several individual sub-systems—such as CDNs, load balancers, and databases—and their interactions Chaos engineering introduce random failure in the system to uncover unforeseen turbulent events and find ways to deal with them. In this post, Prime Video presents a simple approach for fault injection in systems utilizing EC2 and ECS, and its integration with a load-testing suite to validate the countermeasures put in place to prevent dependency and resource exhaustion failures.
Quick tips to help you narrow down problems of either slow/blocked queries, missing indexes, or disk space.
A query took 2 mins to run now can complete in 42ms. A big number, big claim, take it with a grain of salt and put it into its context. The primary action is to hint Postgres Query Planner to take a different path instead of the default generated planner which is slow in this particular query. The lesson learned is that you need to monitor slow queries and see if it has a more efficient path.
In a distributed system we have a group of nodes that need to collaborate and send messages to each other. To achieve that they need to first answer a simple question: Who are my peers? A membership protocol helps each node in a system to maintain a list of nodes that are alive, notifying them when a new node joins the group, when someone intentionally leaves and when a node dies. SWIM, or Scalable Weakly-consistent Infection-style Process Group Membership Protocol, is one of these protocols.
NAT is used widely in home networks, or Cloud VPC(AWS, GCP, Azure) and many network deployments. Because we cannot have a public reachable IP for every device so all devices share a single IP address and rely on the router to translate the internet package back to the right device. So how do we establish a peer-to-peer connection between two machines that sit behind NATs?
Using a bunch of GCP Cloud SQL vulnerable to run a reverse shell. Writing file to /mysql/tmp
via a SQL injection issue, create custom plugin blob to run a reverse shell. The interesting fact is how they get escape out of the container that runs reverse shell by sniff metadata endpoint traffic and spoof response to include their SSH keys. This post just convinced me that we should use TLS everywhere no matter how locked down a network is.
Shopify is huge and they are pushing the edge of technologies, especially Ruby/Rails. They still strongly emphasize on monolith. In this post, they outline the process of rewrite the storefront, which is built based on Liquid theme. As always, the key to performance is handcrafted SQL statement, carefully avoid N+1 queries, caching. The interesting part is before building the new thing, they create a verifier mechanism. This mechanism compares the output of both implementations to make sure both systems behave identically.
A curated list of awesome System Designing articles, videos and resources for distributed computing, AKA Big Data. Whether you’re preparing for an interview or you want to design a distributed/microservice oriented application, this list will definitely help you achieve that.
a textbook that the author has been writing for CS427, their undergraduate course in cryptography. It’s free and is supported by the Oregon State University open textbook initiative. It has 120 exercises. You can download the draft pdf. It’s a bit math heavy but very close to what we used daily: padding, secret sharing, MAC, RSA, Digital Signatures.
A really great book(also free to read online) to discuss core/fundamental concepts of JavaScript such as global variable, shared mutable state, exploring promise. It’s written by the legacy author Dr. Axel Rauschmayer. You don’t need to read whole books but can focus on a few aspects you care about to improve your JS knowledge. Everyone has to write JavaScript at some points nowadays.
CRDTs are often praised as the “holy grail” for building collaborative applications because they don’t require a central authority to resolve sync conflicts. The answer is yes in this article, but note that common editing platforms like Google Docs, Zoho Writer, CKeditor, ProseMirror, Quill, CodeMirror - all of these work with OTs instead of CRDT for collaborative editing. The hacker news discussion is interesting as well. The xi-editor creator also said CRDT didn’t work out for xe-editor either
Code to read
🔩 A relentless key-value store for the browser. Data saved to ImmortalDB is redundantly stored in Cookies, IndexedDB, and LocalStorage, and relentlessly self heals if any data therein is deleted or corrupted.
JavaScriptprovides a program and musical notation that you can use to easily connect and control sounds in a very human way. Super useful if you want to learn how to do audio programming in Go. If you want to get some background on audio processing with Go, check out this Audio From Scratch with Go too.
GoVideo
But what about the code that only exists because somebody wanted to write it? Code created just to make people smile, laugh, maybe even dance? Maybe even code that does nothing at all, created just to see if it was possible?
Kenichi Shibata and Adam Stewart explain their experience with the adoption of microservices in the creation of Comparison as a Service, one of the core pillars of the user journey today. They also go through PaaS and the necessity of building platforms in order to scale microservices efficiently.
Tools
a web based data science tool that works on top of your filesystem allowing you to use your editor of choice
You can view this issue in web browser.
If you have any suggestion/feedback, do tell me by replying to this email. I read them all.
No longer want to receive these emails? Unsubscribe
Older messages
BetterDev #165 - How to build a custom keyboard
Monday, August 17, 2020
Better Dev #165 Aug 18, 2020 Hi everyone, Welcome to issue #165. Covid-19 may gives us more time, especially for one have no kids yet :-), so this week I include a link on how to build your own
BetterDev #164 - How to secure anything
Monday, August 10, 2020
Better Dev #164 Aug 10, 2020 Hi everyone, Welcome to issue #164. This week we got some hard lession from Capital One Breach that results in $80 million fine. We include some links to the tools that
BetterDev #163 - 90 Lines of code to convert your face movement into keyboard commands
Monday, August 3, 2020
Better Dev #163 Aug 03, 2020 Hi everyone. This week sponsor is FusionAuth. Sponsor helps keep this newsletter up and running. Check them out, FusionAuth is a rock solid authentication option. Don't
BetterDev #162 - Debugging Incidents in Google's Distributed Systems
Tuesday, July 28, 2020
Better Dev #162 Jul 27, 2020 Hi everyone, Welcome to issue #162. If you like this newsletter, please help spread the words out. Thank you. Debugging Incidents in Google's Distributed Systems How
BetterDev #161 - Why is processing a sorted array faster than processing an unsorted array?
Tuesday, July 21, 2020
Better Dev #161 Jul 20, 2020 Hi everyone, Welcome to issue #161. This week is a busy week for me so this is a short issue and have no description for link. They are great anyway, check them all out :-)
You Might Also Like
Spyglass Dispatch: The Xitter Bail Out • OpenAI Tender • Grokking Grok • Smartphone Sales • Fischer Random Chess • Scott Bessent for Treasury
Wednesday, November 27, 2024
The Xitter Bail Out • OpenAI Tender • Grokking Grok • Smartphone Sales • Fischer Random Chess • Scott Bessent for Treasury The Spyglass Dispatch is a free newsletter sent out daily on weekdays. Feel
The Long Road Home: A Story of Loss, Learning, and Renaissance - PART 4
Wednesday, November 27, 2024
Top Tech Content sent at Noon! How the world collects web data Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, November 27, 2024? The HackerNoon
Top Tech Deals 🏷️ PS5 Slim, 4K TVs, 10th Gen iPad, and More!
Wednesday, November 27, 2024
The Black Friday madness is here! How-To Geek Logo November 27, 2024 Top Tech Deals: PS5 Slim, 4K TVs, 10th Gen iPad, and More! The Black Friday madness is here! Black Friday sales are here, and we
The 165+ best Black Friday deals
Wednesday, November 27, 2024
Windows Super God Mode; Bluesky starter packs; Tech gifts under $100 -- ZDNET ZDNET Tech Today - US November 27, 2024 Black Friday 2024 live blog Best Black Friday deals 2024: 165+ sales live now
⚙️ Neuralink's new trial
Wednesday, November 27, 2024
Plus: Zoom is becoming an AI-first company
Matrix Botnet Exploits IoT Devices in Widespread DDoS Botnet Campaign
Wednesday, November 27, 2024
THN Daily Updates Newsletter cover The AI Value Playbook ($35.99) FREE for a Limited Time Business leaders are challenged by the speed of AI innovation and how to navigate disruption and uncertainty.
The Sequence Chat: Why are Foundation Models so Hard to Explain and What are we Doing About it?
Wednesday, November 27, 2024
Addressing some of the interpretability challenges of foundation models and the emerging fields of mechanistic interpretability and behavioral probing. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
Overcoming Perfectionism: How to Break Free from the Enemy of Progress
Wednesday, November 27, 2024
Discover how perfectionism hinders progress and learn practical strategies to overcome the fear of imperfection, boost productivity, and achieve your goals without getting stuck in the pursuit of
🖤 Laravel Black Friday Deals!
Wednesday, November 27, 2024
The biggest deals of the year Laravel Black Friday Deals View in browser Laravel News Editor Note: We are sending this outside the regular Sunday newsletter schedule because some of these specials end
BetterDev #271 - Memory: The Forgotten History and Why did Windows 95 setup use three operating systems?
Wednesday, November 27, 2024
Better Dev #271 Nov 26, 2024 Hi all, Welcome to thanksgiving issue of BetterDev. Hope everyone had a safe and warm thanksgiving. It's getting so cold these days. If you are in warzone such as