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

  • Database Background writing
    Background writing is a process that writes dirty pages in shared buffer to the disk (well goes to the OS file cache then get flushed to disk by the OS) I go into this process in this video
    10 min
  • The Cost of Memory Fragmentation

    Fragmentation is a very interesting topic to me, especially when it comes to memory.

    While virtually memory does solve external fragmentation (you can still allocate logically contiguous memory in non-contiguous physical memory) it does however introduce performance delays as we jump all over the physical memory to read what appears to us for example as contiguous array in virtual memory.
    You see, DDR RAM consists of banks, rows and columns. Each row has around 1024 columns and each column has 64 bits which makes a row around 8kib. The cost of accessing the RAM is the cost of “opening” a row and all its columns (around 50-100 ns) once the row is opened all the columns are opened and the 8 kib is cached in the row buffer in the RAM.
    The CPU can ask for an address and transfer 64 bytes at a time (called bursts) so if the CPU (or the MMU to be exact) asks for the next 64 bytes next to it, it comes at no cost because the entire row is cached in the RAM. However if the CPU sends a different address in a different row the old row must be closed and a new row should be opened taking an additional 50 ns hit. So spatial access of bytes ensures efficiency,
    So fragmentation does hurt performance if the data you are accessing are not contiguous in physical memory (of course it doesn’t matter if it is contiguous in virtual memory). This kind of remind me of the old days of HDD and how the disk needle physically travels across the disk to read one file which prompted the need of “defragmentation” , although RAM access (and SSD NAND for that matter) isn’t as bad.
    Moreover, virtual memory introduces internal fragmentation because of the use of fixed-size blocks (called pages and often 4kib in size), and those are mapped to frames in physical memory.
    So if you want to allocate a 32bit integer (4 bytes) you get a 4 kib worth of memory, leaving a whopping 4092 allocated for the process but unused, which cannot be used by the OS. These little pockets of memory can add up as many processes. Another reason developers should take care when allocating memory for efficiency.

    40 min
  • Why create Index blocks writes

    Fundamentals of Database Engineering udemy course (link redirects to udemy with coupon)

    https://database.husseinnasser.com
    Why create Index blocks writes
    In this video I explore how create index, why does it block writes and how create index concurrently work and allow writes.
    0:00 Intro
    1:28 How Create Index works
    4:45 Create Index blocking Writes
    5:00 Create Index Concurrently

    14 min
  • The Problems of an HTTP/3 Backend

    HTTP/3 is getting popular in the cloud scene but before you migrate to HTTP/3 consider its cost. I explore it here.

    0:00 Intro HTTP/3 is getting popular
    3:40 HTTP/1.1 Cost
    5:18 HTTP/2 Cost
    6:30 HTTP/3 Cost
    https://blog.apnic.net/2023/09/25/why-http-3-is-eating-the-world/

    14 min
  • Encrypted Client Hello - The Pros & Cons


    The Encrypted Client Hello or ECH is a new RFC that encrypts the TLS client hello to hide sensitive information like the SNI. In this video I go through pros and cons of this new rfc.
    0:00 Intro
    2:00 SNI
    4:00 Client Hello
    8:40 Encrypted Client Hello
    11:30 Inner Client Hello Encryption
    18:00 Client-Facing Outer SNI
    21:20 Decrypting Inner Client Hello
    23:30 Disadvantages
    26:00 Censorship vs Privacy ECH
    https://blog.cloudflare.com/announcing-encrypted-client-hello/
    https://chromestatus.com/feature/6196703843581952

    34 min
  • The Journey of a Request to the Backend

    From the frontend through the kernel to the backend process
    When we send a request to a backend most of us focus on the processing aspect of the request which is really just the last step.

    There is so much more happening before a request is ready to be processed, most of this step happens in the Kernel. I break this into 6 steps, each step can theoretically be executed by a dedicated thread or process. Pretty much all backends, web servers, proxies, frameworks and even databases have to do all these steps and they all do choose to do it differently.


    Grab my backend performance course https://performance.husseinnasser.com


    0:00 Intro

    3:50 What is a Request?

    10:14 Step 1 - Accept 

    21:30 Step 2 - Read

    29:30 Step 3 - Decrypt

    34:00 Step 4 - Parse

    40:36 Step 5 - Decode

    43:14 Step 6 - Process



    Medium article

    https://medium.com/@hnasr/the-journey-of-a-request-to-the-backend-c3de704de223


    53 min
  • They Enabled Postgres Partitioning and their Backend fell apart
    In a wonderful blog, Kyle explores the pains he faced managing a Postgres instance for a startup he works for and how enabling partitioning sigintfically created wait events causing the backend and subsequently NGINX to through 500 errors.
    We discuss this in this video/podcast
    https://www.kylehailey.com/post/postgres-partition-pains-lockmanager-waits
    34 min
  • WebTransport - A Backend Game Changer

    WebTransport is a cutting-edge protocol framework designed to support multiplexed and secure transport over HTTP/2 and HTTP/3. It brings together the best of web and transport technologies, providing an all-in-one solution for real-time, bidirectional communication on the web.

    Watch full episode (subscribers only) https://spotifyanchor-web.app.link/e/cTSGkq5XuAb


    16 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