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 so...
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
--------
28:57
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
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?
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.
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.
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.
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.
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.
--------
39:27
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
--------
18:12
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
--------
1:02:21
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/
Sobre 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
Ouça The Backend Engineering Show with Hussein Nasser, The Instagram Stories - Social Media News e muitos outros podcasts de todo o mundo com o aplicativo o radio.net