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
Import AI 399: 1,000 samples to make a reasoning model; DeepSeek proliferation; Apple's self-driving car simulator
Friday, February 14, 2025
What came before the golem? ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
Defining Your Paranoia Level: Navigating Change Without the Overkill
Friday, February 14, 2025
We've all been there: trying to learn something new, only to find our old habits holding us back. We discussed today how our gut feelings about solving problems can sometimes be our own worst enemy
5 ways AI can help with taxes 🪄
Friday, February 14, 2025
Remotely control an iPhone; 💸 50+ early Presidents' Day deals -- ZDNET ZDNET Tech Today - US February 10, 2025 5 ways AI can help you with your taxes (and what not to use it for) 5 ways AI can help
Recurring Automations + Secret Updates
Friday, February 14, 2025
Smarter automations, better templates, and hidden updates to explore 👀 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
The First Provable AI-Proof Game: Introducing Butterfly Wings 4
Friday, February 14, 2025
Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? undefined The Market Today #01 Instagram (Meta) 714.52 -0.32%
GCP Newsletter #437
Friday, February 14, 2025
Welcome to issue #437 February 10th, 2025 News BigQuery Cloud Marketplace Official Blog Partners BigQuery datasets now available on Google Cloud Marketplace - Google Cloud Marketplace now offers
Charted | The 1%'s Share of U.S. Wealth Over Time (1989-2024) 💰
Friday, February 14, 2025
Discover how the share of US wealth held by the top 1% has evolved from 1989 to 2024 in this infographic. View Online | Subscribe | Download Our App Download our app to see thousands of new charts from
The Great Social Media Diaspora & Tapestry is here
Friday, February 14, 2025
Apple introduces new app called 'Apple Invites', The Iconfactory launches Tapestry, beyond the traditional portfolio, and more in this week's issue of Creativerly. Creativerly The Great
Daily Coding Problem: Problem #1689 [Medium]
Friday, February 14, 2025
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. Given a linked list, sort it in O(n log n) time and constant space. For example,
📧 Stop Conflating CQRS and MediatR
Friday, February 14, 2025
Stop Conflating CQRS and MediatR Read on: my website / Read time: 4 minutes The .NET Weekly is brought to you by: Step right up to the Generative AI Use Cases Repository! See how MongoDB powers your