Hussein Nasser
banner
hnasr.bsky.social
Hussein Nasser
@hnasr.bsky.social
kill -15 let the kernel send graceful shutdown allowing the process to cleanup.

kill -9 does a force kill of a process and doesn't get a chance for the process to gracefully exit.

Prepare for the -9s and hope for the -15s.
November 6, 2025 at 5:57 PM
WebSocket has their own Keep Alive mechanisms just like TCP, and it is called PING , PONG.

The main reason is to keep the connection alive, check if the other peer is still connected and I think you can send data inline as part of the PING or PONG (never tried it though).
November 2, 2025 at 11:13 PM
If have 3-5 years of experience in the backend and want to elevate your skills, consider grabbing the Advanced Backend engineering Bundle. It consists of three fundamental courses taken in this order for an effective learning roadmap.
November 1, 2025 at 6:11 PM
Page tables provide the mapping between virtual memory and physical memory for each process. This means it needs to be as efficient and as fast as possible. I explore the inner workings of page tables in this episode.

Watch it on YouTube
youtu.be/aJpcysMJkvk
October 31, 2025 at 2:06 PM
They finally posted the details

On October 19 2025 AWS experienced an outage that lasted over a day, we knew it was due to dynamodb DNS resolution failure but never knew what caused the failure.

youtu.be/LZm9nTwsGi8
October 31, 2025 at 4:33 AM
A Reverse proxy is both a backend and a frontend.

Clients connect to the reverse proxy as a backend and it turns around connects to the upstream backends acting as a frontend.

Note NGINX doesn’t using HTTP/2 on upstream backend, HAProxy does.
October 30, 2025 at 4:57 PM
We get fascinated by tools, fancy algorithms, complex data structures and techniques and new abstractions and forget to appreciate basics.

lets go back to the raw and absolute principles.

Breath of fresh air, at least for me

www.linkedin.com/pulse/what-m...
October 23, 2025 at 4:57 PM
These days we don't see close attention paid to protocol efficiency as it used it in early 2000s.

Take WebSockets, a protocol designed in 2010 perhaps earlier, it was optimized to keep the header size is small as possible.
October 19, 2025 at 10:13 PM
New Backend Engineering show Episode is live, title HTTP Graceful Shutdown

youtu.be/abUaM6iuElU
October 17, 2025 at 2:06 PM
Engineering efficient backends is interesting.

Engineering efficient real-time backends is a different beast.

I tackle and breakdown the challenges my new course, with examples.

Head to realtime.husseinnasser.com to grab the course
October 17, 2025 at 1:20 PM
Two ways to scale software:
October 9, 2025 at 4:57 PM
The elegant design of separating concerns in Apache Kafka creates tons of potential scalability improvements.

But also comes with tradeoffs.

Publisher, Consumer and a Broker
October 2, 2025 at 4:57 PM
m1- Fundamentals of Operating Systems
2- Fundamentals of Network Engineering
3- Fundamentals of Backend Engineering

OS Course coupon: OS-FALL25
www.udemy.com/course/funda...

Network Course: NT-FALL25
www.udemy.com/course/funda...

Backend Course: BK-FALL25
www.udemy.com/course/funda...
October 1, 2025 at 2:40 PM
Memorizing trick programming questions and answering interviews flawlessly as you may know isn’t productive.

Coming up with your own solution on the fly, no matter how inefficient or bad you think it is 100 times better.
September 28, 2025 at 10:13 PM
Postgres runs on port 5432, this is the responsibility of the Post master process.

However did you know that listening socket isn’t created until another process finish running first?

That is startup process (ST), responsible for WAL redo when the database crashes.
September 25, 2025 at 4:57 PM
Probably nothing symbolizes tradeoffs than RAID in software engineering

In RAID1 we wanted redundancy in case of disk failure

In RAID0 we wanted performance, so we would stripe the block and “smear” it across multiple devices
September 21, 2025 at 10:13 PM
Free performance for full table scans in Postgres 17

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.
September 18, 2025 at 4:57 PM
Uber reduced their database locks by 94% when they upgraded to MySQL 8.0, thanks to this performance rearchitecture.

Watch my full deep dive coverage here

Advanced MySQL Index Locking Explained

youtu.be/MK24y7AmKTc
September 14, 2025 at 10:13 PM
You level-up as a software engineer when you do things your own way and then naturally find a way to do them better.
September 11, 2025 at 4:57 PM
The Anatomy of a WebSockets frame

With a maximum header size of 14 bytes makes more efficient for bidirectional use cases (eg chatting, gaming) compared to using long polling which has the overhead of HTTP headers.

Of course being on top of TCP we suffer the head of line blocking.
September 4, 2025 at 4:57 PM
memory allocation is an interesting dilemma.

You can allocate exactly what you need making allocations compact and efficient. But once you start deallocating, you are left with too many tiny non-uniform gaps and fragments that cannot be reused effectively (left image).
September 2, 2025 at 4:48 PM
WebSockets, a protocol designed in 2010 perhaps earlier was optimized to keep the header size is small as possible. Which is something I like very much.

Instead of using a fixed size header for the payload length, the designer used a 7bit indicator to indicate how much bytes will be used.
September 1, 2025 at 8:01 AM
Sometimes we get torn in software decisions between lazy loading vs eager loading, both has their pros and cons.

But we forget that there is a third option:

To not load anything at all.

Do you absolutely need what you are loading?
August 31, 2025 at 10:13 PM
NGINX is a powerful proxy and lots of the Internet runs this powerhouse.

Like any technology it has its pros and cons, and in this course I walk you through the power of NGINX and shed light on its drawbacks.

Grab your copy at nginx.husseinnasser.com
August 29, 2025 at 9:29 AM
If you truly know what you need you will build a good product.

The challenge is not to stray out of that path.
August 24, 2025 at 10:13 PM