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

  • Your SSD lies but that's ok | Postgres fsync

    fsync is a linux system call that flushes all pages and metadata for a given file to the disk. It is indeed an expensive operation but required for durability especially for database systems. Regular writes that make it to the disk controller are often placed in the SSD local cache to accumulate more writes before getting flushed to the NAND cells.

    However when the disk controller receives this flush command it is required to immediately persist all of the data to the NAND cells.
    Some SSDs however don't do that because they don't trust the host and no-op the fsync. In this video I explain this in details and go through details on how postgres provide so many options to fine tune fsync
    0:00 Intro
    1:00 A Write doesn’t write
    2:00 File System Page Cache
    6:00 Fsync
    7:30 SSD Cache
    9:20 SSD ignores the flush
    9:30 15 Year old Firefox fsync bug
    12:30 What happens if SSD loses power
    15:00 What options does Postgres exposes?
    15:30 open_sync (O_SYNC)
    16:15 open_datasync (O_DSYNC)
    17:10 O_DIRECT
    19:00 fsync
    20:50 fdatasync
    21:13 fsync = off
    23:30 Don’t make your API simple
    26:00 Database on metal?

    31 min
  • The problem with software engineering

    ego is the main problem to a defective software product. the ego of the engineer or the tech lead seeps into the quality of the product.

    Fundamentals of Backend Engineering Design patterns udemy course (link redirects to udemy with coupon)
    https://backend.husseinnasser.com

    18 min
  • 2x Faster Reads and Writes with this MongoDB feature | Clustered Collections


    Fundamentals of Database Engineering udemy course (link redirects to udemy with coupon)
    https://database.husseinnasser.com


    In version 5.3, MongoDB introduced a feature called clustered collection which stores documents in the _id index as oppose to the hidden wiredTiger hidden index. This eliminates an entire b+tree seek for reads using the _id index and also removes the additional write to the hidden index speeding both reads and writes. 


    However like we know in software engineering, everything has a cost. This feature does come with a few that one must be aware of before using it. In this video I discuss the following 


    • How Original MongoDB Collections Work
    • How Clustered Collections Work
    • Benefits of Clustered Collections
    • Limitations of Clustered Collections
    •  



      28 min
    • Prime Video Swaps Microservices for Monolith: 90% Cost Reduction

      Prime video engineering team has posted a blog detailing how they moved their live stream monitoring service from microservices to a monolith reducing their cost by 90%, let us discuss this

      0:00 Intro
      2:00 Overview
      10:35 Distributed System Overhead
      21:30 From Microservices to Monolith
      29:00 Scaling the Monolith
      32:30 Takeaways
      https://www.primevideotech.com/video-streaming/scaling-up-the-prime-video-audio-video-monitoring-service-and-reducing-costs-by-90
      Fundamentals of Backend Engineering Design patterns udemy course (link redirects to udemy with coupon)
      https://backend.husseinnasser.com

      36 min
    • A Deep Dive in How Slow SELECT * is

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

      https://database.husseinnasser.com
      In a row-store database engine, rows are stored in units called pages. Each page has a fixed header and contains multiple rows, with each row having a record header followed by its respective columns. When the database fetches a page and places it in the shared buffer pool, we gain access to all rows and columns within that page. So, the question arises: if we have all the columns readily available in memory, why would SELECT * be slow and costly? Is it really as slow as people claim it to be? And if so why is it so? In this post, we will explore these questions and more.
      0:00 Intro
      1:49 Database Page Layout
      5:00 How SELECT Works
      10:49 No Index-Only Scans
      18:00 Deserialization Cost
      21:00 Not All Columns are Inline
      28:00 Network Cost
      36:00 Client Deserialization
      https://medium.com/@hnasr/how-slow-is-select-8d4308ca1f0c

      40 min
    • AWS Serverless Lambda Supports Response Streaming


      Lambda now supports Response payload streaming, now you can flush changes to the network socket as soon as it is available and it will be written to the client socket. I think this is a game changing feature



      0:00 Intro

      1:00 Traditional Lambda

      3:00 Server Sent Events & Chunk-Encoding

      5:00 What happens to clients?

      6:00 Supported Regions

      7:00 My thoughts


      Fundamentals of Backend Engineering Design patterns udemy course (link redirects to udemy with coupon)

      https://backend.husseinnasser.com


      14 min
    • The Cloudflare mTLS vulnerability - A Deep Dive Analysis

      Cloudflare released a blog detailing a vulnerability that has been in their system for nearly two years. it is related to mTLS or mutual TLS and specifically client certificate revocation. I explore this in details

      0:00 Intro
      3:00 The Vulnerability
      7:00 What happened?
      8:50 Certificate Revocation
      12:30 Rejecting certain endpoints
      17:00 Certificate Authentication
      20:30 Certificate serial number
      24:00 Session Resumption (PSK)
      35:00 The bug
      37:00 How they addressed the problem
      Fundamentals of Backend Engineering Design patterns udemy course (link redirects to udemy with coupon)
      https://backend.husseinnasser.com

      44 min
    • The Virgin Media ISP outage - What happened?

      BGP (Border gateway protocol) withdrawals caused the Virgin media ISP customers to lose their Internet connection. I go into details on this video.

      0:00 Intro
      2:00 What happened?
      4:11 How BGP works?
      11:50 Version media withdrawals
      15:00 Deep dive
      Fundamentals of Backend Engineering Design patterns udemy course (link redirects to udemy with coupon)
      https://backend.husseinnasser.com

      24 min
    • GitHub SSH key is Leaked - How bad is this?

      GitHub Accidentally Exposed their SSH RSA Private key, this is the message you will get .

      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
      @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
      IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
      Someone could be eavesdropping on you right now (man-in-the-middle attack)!
      It is also possible that a host key has just been changed.
      The fingerprint for the RSA key sent by the remote host is
      SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s.
      Please contact your system administrator.
      Add correct host key in ~/.ssh/known_hosts to get rid of this message.
      Host key for github.com has changed and you have requested strict checking.
      Host key verification failed.
      In this video I discuss how bad is this,.
      0:00 Intro
      1:10 What happened?
      3:00 SSH vs TLS Authentication
      6:00 SSH Connect
      7:45 How bad is the github leak?
      15:00 What should you do?
      18:50 Is ECDSA immune?
      https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/

      22 min
    • Cookie Hijacking - How Linus Tech Tips got Hacked

      How Linus Tech Tips channel got Hacked



      In this short video we explain how was it possible for Linux to get hacked with cookies hijacking.

      0:00 Intro
      0:47 TLDR what happened
      5:10 Cookies in Chrome
      7:30 Cookies Hijacking
      8:46 Session Tokens (Access/Refresh)
      10:00 Remedies


      14 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