The Backend Engineering Show with Hussein Nasser

The Backend Engineering Show with Hussein Nasser

By Hussein NasserTechnology
Download on the App Store

The Backend Engineering Show with Hussein Nasser episodes

  • 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/

    38 min
  • 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


    21 min
  • 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/[email protected]/?s=09

    17 min
  • They made Python faster with this compiler option

    Fundamentals of Operating Systems Course

    https://oscourse.win
    Looks like fedora is compiling cpython with the -o3 flag, which does aggressive function inlining among other optimizations.
    This seems to improve python benchmarks performance by at most 1.16x at a cost of an extra 3MB in binary size (text segment). Although it does seem to slow down some benchmarks as well though not significantly.
    O1 - local register allocation, subexpression elimination
    O2 - Function inlining only small functions
    O3 - Agressive inlining, SMID
    0:00 Intro
    1:00 Fedora Linux gets Fast Python
    5:40 What is Compiling?
    9:00 Compiling with No Optimization
    12:10 Compiling with -O1
    15:30 Compiling with -O2
    20:00 Compiling with -O3
    23:20 Showing Numbers
    Backend Troubleshooting Course
    https://performance.husseinnasser.com

    30 min
  • How Apache Kafka got faster by switching ext4 to XFS

    https://oscourse.win


    Allegro improved their Kafka produce tail latency by over 80% when they switched from ext4 to xfs. What I enjoyed most about this article is the detailed analysis and tweaking the team made to ext4 before considering switching to xfs. This is a classic case of how a good tech blog looks like in my opinion. 


    0:00 Intro

    0:30 Summary

    2:35 How Kafka Works?

    5:00 Producers Writes are Slow

    7:10 Tracing Kafka Protocol 

    12:00 Tracing Kernel System Calls

    16:00 Journaled File Systems

    21:00 Improving ext4

    26:00 Switching to XFS



    Blog

    https://blog.allegro.tech/2024/03/kafka-performance-analysis.html



    34 min
  • Google Patches Linux kernel with 40% TCP performance

    Get my backend course https://backend.win


    Google submitted a patch to Linux Kernel 6.8 to improve TCP performance by 40%, this is done via rearranging the tcp structures for better cpu cache lines, I explore this here.

    0:00 Intro
    0:30 Google improves Linux Kernel TCP by 40%
    1:40 How CPU Cache Line Works
    6:45 Reviewing the Google Patch
    https://www.phoronix.com/news/Linux-6.8-Networking
    https://lore.kernel.org/netdev/[email protected]/
    Discovering Backend Bottlenecks: Unlocking Peak Performance
    https://performance.husseinnasser.com

    15 min
  • Database Torn pages

    0:00 Intro

    2:00 File System Block vs Database Pages

    4:00 Torn pages or partial page

    7:40 How Oracle Solves torn pages

    8:40 MySQL InnoDB Doublewrite buffer

    10:45 Postgres Full page writes



    16 min
  • Cloudflare Open sources Pingora (NGINX replacement)

    Get my backend course https://backend.win


    Cloudflare has announced they are opening sources Pingora as a networking framework! Big news, let us discuss 


    0:00 Intro

    0:30 Reasons why Cloudflare built Pingora?

    3:00 It is a framework! 

    7:30 What in Pingora?

    11:50 Security in Pingora

    13:45 Multi-threading in Pingora

    21:00 Customization vs Configuration

    25:00 Summary




    ⁠https://blog.cloudflare.com/pingora-open-source/?utm_campaign=cf_blog&utm_content=20240228&utm_medium=organic_social&utm_source=twitter⁠


    32 min
  • The Internals of MongoDB

    https://backend.win

    https://databases.win


    I’m a big believer that database systems share similar core fundamentals at their storage layer and understanding them allows one to compare different DBMS objectively. For example, How documents are stored in MongoDB is no different from how MySQL or PostgreSQL store rows. 

    Everything goes to pages of fixed size and those pages are flushed to disk. 


    Each database define page size differently based on their workload, for example MongoDB default page size is 32KB, MySQL InnoDB is 16KB and PostgreSQL is 8KB.


    The trick is to fetch what you need from disk efficiently with as fewer I/Os as possible, the rest is API.  


    In this video I discuss the evolution of MongoDB internal architecture on how documents are stored and retrieved focusing on the index storage representation. I assume the reader is well versed with fundamentals of database engineering such as indexes, B+Trees, data files, WAL etc, you may pick up my database course to learn the skills.

    Let us get started.

    45 min

About The Backend Engineering Show with Hussein Nasser

From the publisher's feed

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.

More shows like The Backend Engineering Show with Hussein Nasser

Freakonomics Radio by Freakonomics Radio + Stitcher

Freakonomics Radio

31,929 Listeners

Software Engineering Radio - the podcast for professional software developers by team@se-radio.net (SE-Radio Team)

Software Engineering Radio - the podcast for professional software developers

274 Listeners

Risky Business by Risky Business Media

Risky Business

373 Listeners

Science Vs by Spotify Studios

Science Vs

12,159 Listeners

Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

Syntax - Tasty Web Development Treats

987 Listeners

Darknet Diaries by Jack Rhysider

Darknet Diaries

8,070 Listeners

Practical AI by Daniel Whitenack and Chris Benson

Practical AI

210 Listeners

Within Reason by Alex J O'Connor

Within Reason

1,626 Listeners

All-In with Chamath, Jason, Sacks & Friedberg by All-In Podcast, LLC

All-In with Chamath, Jason, Sacks & Friedberg

10,106 Listeners

Dwarkesh Podcast by Dwarkesh Patel

Dwarkesh Podcast

550 Listeners

Big Technology Podcast by Alex Kantrowitz

Big Technology Podcast

513 Listeners

Hard Fork by The New York Times

Hard Fork

5,565 Listeners

The AI Daily Brief: Artificial Intelligence News and Analysis by Nathaniel Whittemore

The AI Daily Brief: Artificial Intelligence News and Analysis

671 Listeners

Prof G Markets by Vox Media Podcast Network

Prof G Markets

1,439 Listeners

The Pragmatic Engineer by Gergely Orosz

The Pragmatic Engineer

74 Listeners