Home
Categories
EXPLORE
True Crime
Comedy
Society & Culture
Business
Sports
Technology
Health & Fitness
About Us
Contact Us
Copyright
© 2024 PodJoint
Podjoint Logo
US
00:00 / 00:00
Sign in

or

Don't have an account?
Sign up
Forgot password
https://is1-ssl.mzstatic.com/image/thumb/Podcasts125/v4/5a/91/a7/5a91a797-33f3-42da-f0ce-856459c2f40f/mza_17737999263508040852.jpg/600x600bb.jpg
The Backend Engineering Show with Hussein Nasser
Hussein Nasser
534 episodes
17 hours ago
Welcome to the Backend Engineering Show podcast with your host Hussein Nasser. If you like software engineering you’ve come to the right place. I discuss all sorts of software engineering technologies and news with specific focus on the backend. All opinions are my own. Most of my content in the podcast is an audio version of videos I post on my youtube channel here http://www.youtube.com/c/HusseinNasser-software-engineering Buy me a coffee https://www.buymeacoffee.com/hnasr 🧑‍🏫 Courses I Teach https://husseinnasser.com/courses
Show more...
Technology
RSS
All content for The Backend Engineering Show with Hussein Nasser is the property of Hussein Nasser and is served directly from their servers with no modification, redirects, or rehosting. The podcast is not affiliated with or endorsed by Podjoint in any way.
Welcome to the Backend Engineering Show podcast with your host Hussein Nasser. If you like software engineering you’ve come to the right place. I discuss all sorts of software engineering technologies and news with specific focus on the backend. All opinions are my own. Most of my content in the podcast is an audio version of videos I post on my youtube channel here http://www.youtube.com/c/HusseinNasser-software-engineering Buy me a coffee https://www.buymeacoffee.com/hnasr 🧑‍🏫 Courses I Teach https://husseinnasser.com/courses
Show more...
Technology
Episodes (20/534)
The Backend Engineering Show with Hussein Nasser
Amazon US-EAST-1 Outage in Details

On October 19 2025 AWS experienced an outage that lasted over a day, 10 days later we finally got the root cause analysis and we know exactly what caused the DNS to fail0:00 Summary 5:30 How did Dynamo lost its DNS?13:41 EC2 Errors 16:16 Network Load Balancer ErrorsRCA here https://aws.amazon.com/message/101925/

Show more...
2 days ago
24 minutes 26 seconds

The Backend Engineering Show with Hussein Nasser
Graceful shutdown in HTTP


There are cases where the backend may need to close the connection to prevent unexpected situations, prevent bad actors or simply just free up resources. Closing a connection gracefully allows clients and backends to clean up and finish any pending requests. 


In this episode of the backend engineering show I discuss graceful connections in both HTTP/1.1 via the connection header and HTTP/2 via the GOAWAY frame. 


  • 0:00 Intro
  • 4:58 Why shutdown connection? 
  • 6:46 HTTP/1.1 Graceful shutdown
  • 12:26 Cost of HTTP/2 
  • 17:40 HTTP/2 GoAWAY frame
  • 23:40 Summary


Links

https://www.youtube.com/watch?v=fVKPrDrEwTI&t=1s 

https://chromium.googlesource.com/chromium/src/net/%2B/master/socket/client_socket_pool_manager.cc#76

https://issues.chromium.org/issues/40555364

https://issues.chromium.org/issues/40501721


Show more...
2 weeks ago
25 minutes 49 seconds

The Backend Engineering Show with Hussein Nasser
Postgres 18 gets Async IO

Postgres 18 has been released with many exciting features such as UUIDv7, Over explain module, composite index skip scans, and the most anticipated asynchronous IO with worker and io_uring mode which I uncover in this show. Hope you enjoy it



0:00 Intro

1:30 Synchronous vs Asynchronous calls

3:00 Synchronous IO

6:30 Asynchronous IO

10:00 Postgres 17 synchronous io

17:20 The challenge of Async IO in Postgres 18

20:00 io_method worker23:00

io_method io_uring

29:30 io_method sync

31:08 Async IO isn’t done! 3

1:30 Support for backend writers

32:36 Improve worker io_method

33:00 direct io support

37:00 Summary

Show more...
1 month ago
41 minutes 12 seconds

The Backend Engineering Show with Hussein Nasser
Kernel level TLS

Fundamentals of Operating Systems Course https://oscourse.winktls is brilliant.TLS encryption/decryption often happens in userland. While TCP lives in the kernel. With ktls, userland can hand the keys to the kernel and the kernel does crypto. When calling write, the kernel encrypts the packet and send it to the NIC.When calling read, the kernel decrypts the packet and handed it to the userspace. This mode still taxes the host’s CPU of course, so there is another mode where the kernel offloads the crypto to the NIC device! Host CPU becomes free. Incoming packets to the NIC are decrypted in device before they are DMAed to the kernel. outgoing packets are encrypted before they leave the NIC to the network.ktls still need handshake to happen in userspace. There is also enabling zerocopy in some cases (now that kernel has context) Deserves a video. So much good stuff.0:00 Intro2:00 Userspace SSL Libraries 3:00 ktls 6:00 Kernel Encrypts/Decrypts (TLS_SW)8:20 NIC offload mode (TLS_HW)10:15 NIC does it all (TLS_HW_RECORD)12:00 Write TX Example13:50 Read RX Example17:00 Zero copy (sendfile)https://docs.kernel.org/networking/tls-offload.html

Show more...
4 months ago
22 minutes 55 seconds

The Backend Engineering Show with Hussein Nasser
The beauty of the CPU

If you are bored of contemporary topics of AI and need a breather, I invite you to join me to explore a mundane, fundamental and earthy topic.


The CPU.

A reading of my substack article https://hnasr.substack.com/p/the-beauty-of-the-cpu

Show more...
5 months ago
9 minutes 38 seconds

The Backend Engineering Show with Hussein Nasser
Sequential Scans in Postgres just got faster

This new PostgreSQL 17 feature is game changer. They know can combine IOs when performing sequential scan.

Grab my database course

https://courses.husseinnasser.com


Show more...
6 months ago
27 minutes 36 seconds

The Backend Engineering Show with Hussein Nasser
Does discipline work?

No technical video today, just talking about the idea of discipline and consistency.

Show more...
6 months ago
10 minutes 6 seconds

The Backend Engineering Show with Hussein Nasser
Socket management and Kernel Data structures

Fundamentals of Operating Systems Course

This video is an overview of how the operating system kernel does socket management and the different data structures it utilizes to achieve that.

timestamps

0:00 Intro

1:38 Socket vs Connections

7:50 SYN and Accept Queue

18:56 Socket Sharding

23:14 Receive and Send buffers

27:00 Summary

Show more...
7 months ago
31 minutes 26 seconds

The Backend Engineering Show with Hussein Nasser
The genius of long polling

Polling is the ability to interrogate a backend to see if a piece of information is ready. It can introduce a chatty system and as a result long polling was born. In this video I explain the beauty of this design pattern and how we can push it to its limit. 0:00 Intro 0:45 Polling 2:30 Problem with Polling 3:50 Long Polling 8:18 Timeouts 10:00 Long Polling Benefits 12:00 Make requests into Long Polling 17:36 Request Resumption 21:40 Summary

Show more...
11 months ago
28 minutes 57 seconds

The Backend Engineering Show with Hussein Nasser
Six stages of a good software engineer


You get better as a software engineer when you go through these stages.


0:00 Intro 

1:15 Understand a technology

7:07 Articulate how it works

15:30 Understand its’ limitations

19:48 Try to build something better

27:45 Realize what you built also has limitations

32:48 Appreciate the original tech as is




  1. Understand a technology 

 We use technologies all the time without knowing how it works. And it is ok not knowing how things work if interests isn’t there. But when there is interest to understand how something works, pursue it. It feels good when you understand how something works because you work better with it, you swim with the tide instead of against it. 


When I learned how TCP/IP work..  you would appreciate every connection request, how you read requests. You will ask questions,


 what is my code doing here? 

When exactly I’m creating connections?

When am I reading from the connection? 

Is it safe to share connections?



  1. Articulate how it works

This one is not easy, you might think you understand something until you try to explain how it works. If you find yourself using jargon you probably don’t understand and you just try to impress others. Have you seen people who want to talk about something to show they understand it? It’s the opposite. Try to truly articlate how it works, you will really understand it , back to 1.


I thought I understand how backend reads requests until I tried to speak to it. 


  1. Understand the technology limitations


Once 1,2 are done you will truly understand the tech, now you are confidant, you are excited about the tech and you will truly see when you can use the tech to its full potential and also know the weak points of the tech where it breaks, this happens a lot with TCP/IP. We know tcps limitations. 


  1. Try to build something better

This one is optional and can be skipped, but attempting to design or building something better then the tech because you know the limitations will truly reveal how you became better. But the challenge here is the ego, you might understand the limitations but you problem is thinking that what you will build is flawless. This step must be proceed with caution. 


  1. Realize what you build also has limitation

Dust settles.. this step hurts, and you may take a while to realize it, but whatever you build will have flaws… and when you realize this it is when you get better as an engineer. 


  1. Appreciate the tech as is

This is when you are back full circle you are back to the first stage, look at the technology and understand it but don’t judge it.. just know the limitations and its strength and flow with it. Stop fighting and instead build around a tech, does that mean you shouldn’t build anything new, of course not. Go build, but don’t stress around making something better to defeat existing tech. But actually build it for building it.


Show more...
1 year ago
39 minutes 27 seconds

The Backend Engineering Show with Hussein Nasser
This new Linux patch can speed up Reading Requests

Fundamentals of Operating Systems Course https://oscourse.win Very clever! We often call read/rcv system call to read requests from a connection, this copies data from kernel receive buffer to user space which has a cost. This new patch changes this to allow zero copy with notification. “Reading' data out of a socket instead becomes a “notification” mechanism, where the kernel tells userspace where the data is.” This kernel patch enables zero copy from the receive queue. https://lore.kernel.org/io-uring/ZwW7_cRr_UpbEC-X@LQ3V64L9R2/T/ 0:00 Intro 1:30 patch summary 7:00 Normal Connection Read (Kernel Copy) 12:40 Zero copy Read 15:30 Performance

Show more...
1 year ago
18 minutes 12 seconds

The Backend Engineering Show with Hussein Nasser
Cloudflare's 150ms global cache purge | Deep Dive

Cloudflare built a global cache purge system that runs under 150 ms.


This is how they did it.


Using RockDB to maintain local CDN cache, and a peer-to-peer data center distributed system and clever engineering, they went from 1.5 second purge, down to 150 ms.


However, this isn’t full picture, because that 150 ms is just actually the P50. In this video I explore Clouldflare CDN work, how the old core-based centralized quicksilver, lazy purge work compared to the new coreless, decentralized active purge. In it I explore the pros and cons of both systems and give you my thoughts of this system.


0:00 Intro

4:25 From Core Base Lazy Purge to Coreless Active

12:50 CDN Basics

16:00 TTL Freshness

17:50 Purge

20:00 Core-Based Purge

24:00 Flexible Purges

26:36 Lazy Purge

30:00 Old Purge System Limitations

36:00 Coreless / Active Purge

39:00 LSM vs BTree

45:30 LSM Performance issues

48:00 How Active Purge Works

50:30 My thoughts about the new system

58:30 Summary


Cloudflare blog

https://blog.cloudflare.com/instant-purge/



Mentioned Videos


Cloudflare blog

https://blog.cloudflare.com/instant-purge/



Percentile Tail Latency Explained (95%, 99%) Monitor Backend performance with this metric

https://www.youtube.com/watch?v=3JdQOExKtUY


How Discord Stores Trillions of Messages | Deep Dive

https://www.youtube.com/watch?v=xynXjChKkJc


Fundamentals of Operating Systems Course

https://os.husseinnasser.com


Backend Troubleshooting Course

https://performance.husseinnasser.com

Show more...
1 year ago
1 hour 2 minutes 21 seconds

The Backend Engineering Show with Hussein Nasser
MySQL is having a bumpy journey

Fundamentals of Database Engineering udemy course https://databases.win MySQL has been having bumpy journey since 2018 with the release of the version 8.0. Critical crashes that made to the final product, significant performance regressions, and tons of stability and bugs issues. In this video I explore what happened to MySql, are these issues getting fixed? And what is the current state of MySQL at the end of 2024. 0:00 Intro 2:00 MySQL 8.0 vs 5.7 Performance 11:00 Critical Crash in 8.0.38, 8.4.1 and 9.0.0 15:40 Is 8.4 better than 8.0.36? 16:30 More Features = More Bugs 22:30 Summary and my thoughts resources https://x.com/MarkCallaghanDB/status/1786428909376164263 https://www.percona.com/blog/do-not-upgrade-to-any-version-of-mysql-after-8-0-37/ http://smalldatum.blogspot.com/2024/09/mysql-innodb-vs-sysbench-on-large-server.html https://www.percona.com/blog/mysql-8-0-vs-5-7-are-the-newer-versions-more-problematic/

Show more...
1 year ago
28 minutes 34 seconds

The Backend Engineering Show with Hussein Nasser
How many kernel calls in NodeJS vs Bun vs Python vs native C

Fundamentals of Operating Systems Course https://oscourse.win In this video I use strace a performance tool that measures how many system calls does a process makes. We compare a simple task of reading from a file, and we run the program in different runtimes, namely nodejs, buns , python and native C. We discuss the cost of kernel mode switches, system calls and pe 0:00 Intro 5:00 Code Explanation 6:30 Python 9:30 NodeJS 12:30 BunJS 13:12 C 16:00 Summary

Show more...
1 year ago
20 minutes 41 seconds

The Backend Engineering Show with Hussein Nasser
When do you use threads?

Fundamentals of Operating Systems Course https://os.husseinnasser.com When do you use threads? I would say in scenarios where the task is either 1) IO blocking task 2) CPU heavy 3) Large volume of small tasks In any of the cases above, it is favorable to offload the task to a thread. 1) IO blocking task When you read from or write to disk, depending on how you do it and the kernel interface you used, the write might be blocking. This means the process that executes the IO will not be allowed to execute any more code until the write/read completes. That is why you see most logging operations are done on a secondary thread (like libuv that Node uses) this way the thread is blocked but the main process/thread can resume its work. If you can do file reads/writes asynchronously with say io_uring then you technically don't need threading. Now notice how I said file IO because it is different than socket IO which is always done asynchronously with epoll/select etc. 2) CPU heavy The second use case is when the task requires lots of CPU time, which then starves/blocks the rest of the process from doing its normal job. So offloading that task to a thread so that it runs on a different core can allow the main process to continue running on its the original core. 3) Large volume of small tasks The third use case is when you have large amount of small tasks and single process can't deliver as much throughput. An example would be accepting connections, a single process can only accept connections so fast, to increase the throughput in case where you have massive amount of clients connecting, you would spin multiple threads to accept those connections and of course read and process requests. Perhaps you would also enable port reuse so that you avoid accept mutex locking. Keep in mind threads come with challenges and problems so when it is not required. 0:00 Intro 1:40 What are threads? 7:10 IO blocking Tasks 17:30 CPU Intensive Tasks 22:00 Large volume of small tasks

Show more...
1 year ago
31 minutes 8 seconds

The Backend Engineering Show with Hussein Nasser
Frontend and Backends Timeouts


I am fascinated by how timeouts affect backend and frontend programming.

When a party is waiting on something you can place a timeout to break the wait. This is useful for freeing resources to more critical processes, detecting slow operations and even avoiding DOS attacks.

Contrary to common beliefs, timeouts are not exclusive to request processing, they can be applied to other parts of the frontend-backend communications. Let us explore this briefly.


0:00 Intro

2:30 Connection Timeout

5:00 Request Read timeout

10:00 Wait Timeout 

12:00 Usage Timeout

14:00 Response Timeout

16:00 Canceling a request

19:50 Proxies and timeouts

Show more...
1 year ago
25 minutes 23 seconds

The Backend Engineering Show with Hussein Nasser
Postgres is combining IO in version 17


Learn more about database and OS internals, check out my courses 

Fundamentals of database engineering https://databases.win 

Fundamentals of operating systems https://oscourse.win



This new PostgreSQL 17 feature is game changer.


You see, postgres like most databases work with fixed size pages. Pretty much everything is in this format, indexes, table data, etc. Those pages are 8K in size, each page will have the rows, or index tuples and a fixed header. The pages are just bytes in files and they are read and cached in the buffer pool.


To read page 0, for example, you would call read on offset 0 for 8192 bytes, To read page 1 that is another read system call from offset 8193 for 8192, page 7 is offset 57,345 for 8192 and so on. 


If table is 100 pages stored a file, to do a full table scan, we would be making 100 system calls, each system call had an overhead (I talk about all of that in my OS course). 


The enhancement in Postgres 17 is to combine I/Os you can specify how much IO to combine, so technically while possible you can scan that entire table in one system call doesn’t mean its always a good idea of course and Ill talk about that. 


This also seems to included a vectorized I/O, with preadv system call which takes an array of offsets and lengths for random reads. 


The challenge will become how to not read too much, say I’m doing a seq scan to find something, I read page 0 and found it and quit I don’t need to read any more pages. With this feature I might read 10 pages in one I/O and pull all its content, put in shared buffers only to find my result in the first page (essentially wasting disk bandwidth, memory etc) 


It is going to be interesting to balance this out. 


Show more...
1 year ago
27 minutes 39 seconds

The Backend Engineering Show with Hussein Nasser
Windows vs Linux Kernel

Fundamentals of Operating Systems Course https://os.husseinnasser.com Why Windows Kernel connects slower than Linux I explore the behavior of TCP/IP stack in Windows kernel when it receives a RST from the backend server especially when the host is available but the port we are trying to connect to is not. This behavior is exacerbated by having both IPv6 and IPv4 and if the happy eye ball protocol is in place where IPv6 is favorable. 0:00 Intro 0:30 Fundamentals TCP/IP 3:00 Unreachable Port Behavior 6:00 Client Kernel Behavior (Linux vs Windows) 11:40 Slow TCP Connect on Windows 15:00 localhost, IPv6 and IPv4 20:00 Happy Eyeballs 28:00 Registry keys to change the behavior 31:00 Port Unreachable vs Host Unreachable https://daniel.haxx.se/blog/2024/08/14/slow-tcp-connect-on-windows/

Show more...
1 year ago
37 minutes 23 seconds

The Backend Engineering Show with Hussein Nasser
Running out of TCP ephemeral source ports


In this episode of the backend engineering show I describe an interesting bug I ran into where the web server ran out of ephemeral ports causing the system to halt. 


0:00 Intro

0:30 System architecture 

2:20 The behavior of the bug

4:00 Backend Troubleshooting

7:00 The cause

15:30 Ephemeral ports on loopback


Show more...
1 year ago
20 minutes 6 seconds

The Backend Engineering Show with Hussein Nasser
io uring gets even faster

Fundamentals of Operating Systems Course https://os.husseinnasser.com Linux I/O expert and subsystem maintainer Jens Axboe has submitted all of the IO_uring feature updates ahead of the imminent Linux 6.10 merge window. In this video I explore this with a focus on what zerocopy. 0:00 Intro 0:30 IO_uring gets faster 2:00 What is io_uring 7:00 How Normal Copying Work 12:00 How Zero Copy Works 13:50 ZeroCopy and TLS https://www.phoronix.com/news/Linux-6.10-IO_uring https://lore.kernel.org/io-uring/fef75ea0-11b4-4815-8c66-7b19555b279d@kernel.dk/?s=09

Show more...
1 year ago
16 minutes 35 seconds

The Backend Engineering Show with Hussein Nasser
Welcome to the Backend Engineering Show podcast with your host Hussein Nasser. If you like software engineering you’ve come to the right place. I discuss all sorts of software engineering technologies and news with specific focus on the backend. All opinions are my own. Most of my content in the podcast is an audio version of videos I post on my youtube channel here http://www.youtube.com/c/HusseinNasser-software-engineering Buy me a coffee https://www.buymeacoffee.com/hnasr 🧑‍🏫 Courses I Teach https://husseinnasser.com/courses