BetterDev #159 - Scaling Linux Services: Before accepting connections
Better Dev #159 Jul 06, 2020
Hi everyone, Welcome to issue #159. If you like this newsletter, please help forward this email to a friend, tweet, or shout from a rooftop. It goes a long way :-).
When writing services that accept TCP connections, we tend to think of our work as starting from the point where our service accepts a new client connection and finishing when we complete the request and close the socket. For services at scale, operations can happen at such a high rate that some of the default resource limits of the Linux kernel can break this abstraction and start causing impact to incoming connections outside of that connection lifecycle. This post focuses on some standard resource limitations that exist before the client socket is handed to the application.
Explain how IPTables, Chains and Rules work together.
Dig into container. Docker image are just tar file with some meta data. A container needs at least: network stack, file system, processes. So how can we re-create that, using simple bash commands?
In The Pragmatic Programmer, Andrew Hunt and David Thomas introduced the DRY (Don’t Repeat Yourself) principle But then Sandi Metz came along and said: Duplication is far cheaper than the wrong abstraction. So what should we do
B-Tree index is the default index. But you know we have no one size fit all data structure for fast look up. What if we just want an exact match? Well, a hash index might faster there.
I have been reviewing more JS code recently and saw this a lot. Here, Ben Nadel shows why they aren’t needed and when they are needed(In a comment though).
Hey email app is getting a lot of attention recently. Partly because it is created by DHH, creator of Ruby on Rails, who has a strong opinion on avoiding SPA JavaScript and focus a lot on Ruby. He used to avoid public cloud like AWS or GCP and belive it’s more cost effective on bare metal. But in one podcast I heard 2 years ago, he hinted that eventually the cloud will be cheaper enough and it makes sense to use cloud by then. Here, we will see their infrastructure, initially starting with GCP, then migrate to AWS EKS. They made use a lot of managed service
A guide to setup SSH authentication with certificates instead of pub key. Why? Certificate allow you to set expiration date, centralization control and revoke easily. With normal public key, once got in, users can added their own key and do whatever they want.
teaches how to use the command-line utility jq to filter and parse complex JSON files into flat CSV files. If you need a play ground for jq, check out jqplay.
The author wants it to be the best book in this field. It’s free to read online right now on Manning so check it out(You have to register for a free account to read though). It has 11 chapters so far. Learning about cryptography definetely help you along the way to understand thing like TLS, PGP etc
Code to read
As its name suggest, a Distributed SQL database, written for learning purpose: ACID, Raft-based, Pluggable storage engine with B+tree and log-structured backends and more
Rusta Bash testing framework, can be used to test scripts that contain dangerous commands like rm -rf /. No surprises, no pain.
Basha powerful and efficient open-source access control library for Golang projects. It provides support for enforcing authorization based on various access control models
GoRFC 4180 compliant CSV parsing and encoding. parses 2x times as fast as an unparallelized stream implementation 🚀
ElixirVideo
And since you are there, give a quick read of A plain english introduction to CAP Theorem too
Tools
Basically an improve version of diff with color. Make it easier to notice the diff in terminal
a Kafka CLI tool built in Go which gives you everything you need to manage, query Kafka, consume and publish message right from CLI without messaging with Java, bash script of Kafka cli tools.
Give a pid, plot memory usage of process, constantly get sample data to generate plot images.
a tool for running SQL queries on git repositories. It implements SQLite virtual tables and uses go-git. It’s meant for ad-hoc querying of git repositories on disk through a common interface (SQL), as an alternative to patching together various shell commands.
a server side, no-cookie, drop-in and privacy focused tracking solution for Go. Read the accompanied doc
A site to help you quickly see various cache header effect. Super useful when you setting these response header to pass to upstream server like Cloudflare, Fastly etc.
a web-based platform for website owners to log, visualize and analyze user behaviors like mouse trace data.
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?
Older messages
BetterDev #158 - Learning operating system development using Linux kernel and Raspberry Pi
Monday, June 29, 2020
Better Dev #158 Jun 29, 2020 Hi everyone, Welcome to issue #158. If you like this newsletter, please help forward this email to a friend, tweet, or shout from a rooftop. It goes a long way :-).
BetterDev #157
Monday, June 22, 2020
Better Dev #157 Jun 22, 2020 Hi everyone, Welcome to issue #157. Let's get straight to our links this week. Fast Subnet Matching Determining if a subnet contains a given IP is a fundamental
BetterDev #156 - How Controllers Maximize SSD Life
Monday, June 15, 2020
Better Dev #156 Jun 15, 2020 Hi everyone, Welcome to issue #156. Let's get straight to our links this week. How Controllers Maximize SSD Life MLC flash has a lifetime of only 10000 erase/write
BetterDev #155 - Papers with code and Preparing Applications for IPv6
Monday, June 8, 2020
Better Dev #155 Jun 8, 2020 This week, I want to share a quick shell trick to check if a port open or not without using any external tool like telnet or nc . And it's a one liner: echo > /dev/
BetterDev #154 - Everything you should know about certificates and PKI but are too afraid to ask
Monday, June 1, 2020
Better Dev #154 Jun 1, 2020 Hi everyone, Welcome to issue #154. Let's get straight to our link this week Everything you should know about certificates and PKI but are too afraid to ask X.509, ASN.1
You Might Also Like
JSK Daily for Nov 27, 2024
Wednesday, November 27, 2024
JSK Daily for Nov 27, 2024 View this email in your browser A community curated daily e-mail of JavaScript news JavaScript Certification Black Friday Offer – Up to 54% Off! Certificates.dev, the trusted
Ranked | The World's Biggest Importers of Goods 🌎
Wednesday, November 27, 2024
As Trump tariffs are anticipated to disrupt global trade and push up prices for consumers, we show the world's biggest importers of goods. View Online | Subscribe | Download Our App >> 📱Book
Daily Coding Problem: Problem #1621 [Easy]
Wednesday, November 27, 2024
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. A regular number in mathematics is defined as one which evenly divides some
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. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏