hnasr Profile Banner
Hussein Nasser Profile
Hussein Nasser

@hnasr

Followers
80K
Following
4K
Media
4K
Statuses
22K

Backend and Database Courses https://t.co/Qonec4YftL YouTube https://t.co/FfDg8cnVCI Author of https://t.co/PcX2tDsIxC Engineer @esri

California, USA
Joined July 2010
Don't wanna be here? Send us removal request.
@hnasr
Hussein Nasser
3 months
If you built tools, backends and apps on top of this great runtime, understanding how it works will make you appreciate it even more. Check out my new course Node Internals. Head to .More courses
Tweet media one
@hnasr
Hussein Nasser
4 months
My favorite thing about software engineering is making it transparent. Node is one of the most popular runtimes used on backend engineering yet I feel it is the least understood. I surely ran into this way at times. I spent 7 months working on a course to demystify NodeJS
Tweet media one
4
20
260
@hnasr
Hussein Nasser
1 day
UDP is a message protocol, whatever the user writes is treated as a unit. Problem is we are restricted by data link transmission unit (called MTU). IP which carries UDP can be fragmented, to break that large message into smallest MTU. You can also disable fragmentation but
Tweet media one
1
9
83
@hnasr
Hussein Nasser
2 days
A request is like an arrow. its maximum speed is as it leaves the bow, then it slows down due to air and gravity. A request is at its maximum speed as it leaves the frontend’s NIC, then starts to slow down as it travels through network devices, proxies, the backend kernel, and.
8
7
146
@hnasr
Hussein Nasser
3 days
Operating systems (their kernel specifically) orchestrate many processes, allow access to memory, disk, network and execute processes by scheduling them to the CPU. Sounds simple when we put it this way but this task is vast. Writing efficient programs depends on how much
Tweet media one
1
4
83
@hnasr
Hussein Nasser
3 days
Building a correct and performant transactional system requires deep knowledge in database fundamentals, application context and workflows. First correctness: It is the skill to scope operations into atomic transactions while managing concurrency of those operations to ensure a.
2
8
130
@hnasr
Hussein Nasser
4 days
Lets talk about TCP blackhole, a fascinating network phenomenon. You see, IP fragmentation was created to allow large packets to pass through middle routers with smaller MTU (maximum transmission unit) than the sender. This quickly created performance and security problems.
1
7
138
@hnasr
Hussein Nasser
5 days
Any code you write has a flaw, It might not be obvious today, but it will reveal itself one day. Google, Microsoft, Amazon and others all experienced severe outages during the pandemic. Because they didn’t anticipate the unique workload, they had to rewrite and redesign quite a.
1
16
151
@hnasr
Hussein Nasser
7 days
Windows Kernel vs Linux Kernel when the port is unreachable (but the host is). Notice that Windows will return the failure in 2 seconds, while Linux returns immediately. This is exacerbated when you have both IP protocol families. You can use curl, telnet, ssh all have the same
4
4
112
@hnasr
Hussein Nasser
7 days
The Anatomy of Node Packages.
1
7
147
@hnasr
Hussein Nasser
8 days
Whoever initiates TCP FIN leaves its socket in TIME_WAIT state for any pending packets to arrive from the remote. If you attempt reuse the same address/port the bind will fail. Unless the SO_REUSEADDR is set on the socket. curl doesn’t set SO_REUSEADDR by default, thus the
Tweet media one
1
2
49
@hnasr
Hussein Nasser
9 days
Sometimes you have to make pragmatic decisions to keep the software consistent and predictable. This one is an interesting discussion on an issue in curl project upon forcing reuse local address port reuse when the socket is in timewait state.
Tweet media one
2
5
45
@hnasr
Hussein Nasser
12 days
Microsoft IIS implementation of HTTP/2 is weird. Often when the backend accepts h2, it sends a SETTINGS frame telling the client the maximum number concurrent streams it supports. IIS doesn’t do that, which then Chrome interprets as the server supports unlimited concurrent.
8
9
130
@hnasr
Hussein Nasser
15 days
HTTP/1.1 protocol can mask inefficiently authored frontends. This is because of the browser connection pool limit (6-10 connections per domain). Once the backend advertises HTTP/2 or even 3, the floodgates opens and up to 200 requests can be sent concurrently. This can tax the.
1
7
96
@hnasr
Hussein Nasser
16 days
I enjoy reading public bug reports, especially if it relates to an error am looking up. some much good stuff, this one an h2 GO AWAY frame incompatible implementation between client and backend.
Tweet media one
0
2
30
@hnasr
Hussein Nasser
17 days
SQL update or delete statements are interesting. The row locks held by those queries in a transaction can cause blocking. In some systems (SQL Server) page locks can be taken instead, causing even more blocking. Switching the order of the statement so its closer to the.
5
9
115
@hnasr
Hussein Nasser
19 days
With the right index, MIN or MAX can be as cheap as a single IO (to the lowest or highest leaf btree page). Without an index, it can thrash your buffers and cpu. COUNT and AVG on the other hands are not as cheap.
0
7
92
@hnasr
Hussein Nasser
20 days
ktls is brilliant. TLS encryption/decryption often happens in userland. While TCP lives in the kernel. With ktls, userland can hand the keys to the kernel and the kernel does crypto. When calling write, the kernel encrypts the packet and send it to the NIC. When calling.
1
10
147
@hnasr
Hussein Nasser
22 days
An interesting case of the CORS. Backend returned the allow-origin header but so did the load balancer. Browser gets two headers with the same name, different values and throw this error. header contains multiple values but only one is allowed.
Tweet media one
4
9
205
@hnasr
Hussein Nasser
23 days
Best practices should have a “best by” date. They sometimes go bad, often in production. They are very useful but be willing to toss them at anytime and make your own best practices and forge your path. Because situations and tech change. and when you are on a new path, you.
0
4
99
@hnasr
Hussein Nasser
24 days
A client connects to a database server and sends a query. Before the query is scheduled, the client crashes. What can happen next?. A good conversational question for networking, backend and database implementation. To make it more interesting, add a load balancer between the.
2
5
178
@hnasr
Hussein Nasser
25 days
A key in Architecting efficient backends is networking. It is the bridge between frontend and the backend. Depending on the use case and the workflow, the engineer asks questions such as: What protocols should be used? What web servers, proxies, runtimes to deploy? What
Tweet media one
1
2
130