Discussing the Homa paper - Replacing TCP for the Datacenter | The Backend Engineering Show

  Рет қаралды 9,332

Hussein Nasser

Hussein Nasser

Күн бұрын

In this episode of the backend engineering show I go through and discuss the Homa Protocol paper which attempts to replace TCP as a protocol in the data centers. I learned a lot from this paper, I do have my criticisms of certain aspects of the paper.
It appears there is a path to replace TCP in the datacenter and professor John tries to explain this path.
Timestamps for topics discussed below:
0:00 Intro
3:00 The nature of networking data center
5:30 TCP Segments
7:30 There is no Request in TCP
12:00 What so unique about Data centers?
14:00 Message Throughput vs Data throughput
18:25 Congestion Control
22:38 Homa’s Congestion Control
25:00 Server Core Load Balancing
28:30 NIC offloading
30:00 Everything Wrong about TCP
37:00 Why not QUIC?
40:00 Limitation of Streaming
44:10 Load Balancing Stream Reading
47:15 Can we treat Segments as Messages?
51:00 Dispatching Messages is Easier
53:00 Connection Orientation
01:00:00 Sender Driven Congestion Control
01:03:00 In Order Packet Delivery
01:07:00 DCTCP
01:08:30 Homa is Message Based
01:11:00 Home is Connection Less
01:12:00 Receiver Driven Congestion Control
01:15:19 Out of Order Packets
01:16:20 Homa API is not Compatible with TCP
01:17:40 Will Homa come to HTTP?
01:18:45 Conclusion
Referenced materials mentioned in the episode
Overview paper
web.stanford.edu/~ouster/cgi-...
Homa 2018 paper (Details)
people.csail.mit.edu/alizadeh...
NIC Offloading in Linux
en.wikipedia.org/wiki/TCP_off...
Curl disabling Nigel Algo
github.com/curl/curl/commit/4...
Fundamentals of Networking for Effective Backends udemy course (link redirects to udemy with coupon)
network.husseinnasser.com
Fundamentals of Database Engineering udemy course (link redirects to udemy with coupon)
database.husseinnasser.com
Introduction to NGINX (link redirects to udemy with coupon)
nginx.husseinnasser.com
Python on the Backend (link redirects to udemy with coupon)
python.husseinnasser.com
Become a Member on KZfaq
/ @hnasr
Arabic Software Engineering Channel
/ @husseinnasser
🔥 Members Only Content
• Members-only videos
🏭 Backend Engineering Videos in Order
backend.husseinnasser.com
💾 Database Engineering Videos
• Database Engineering
🎙️Listen to the Backend Engineering Podcast
husseinnasser.com/podcast
Gears and tools used on the Channel (affiliates)
🖼️ Slides and Thumbnail Design
Canva
partner.canva.com/c/2766475/6...
Stay Awesome,
Hussein

Пікірлер: 27
@hnasr
@hnasr 2 жыл бұрын
To learn more about networking fundamentals in order to understand papers like this one check out my udemy course Fundamentals of Networking for Effective Backends Head to network.husseinnasser.com for a discount coupon
@itztej195
@itztej195 2 жыл бұрын
*Hello sir please give opinion:* Which is the better protocol for chat application with voice chat? 1. WebRTC 2. Web sockets
@hnasr
@hnasr 2 жыл бұрын
@@itztej195 WebRTC is better for audio streaming since it uses UDP. The in order delivery of segments in TCP and retransmission (used by WebSockets) might cause noticeable lags.
@mushtaque87
@mushtaque87 Жыл бұрын
I am not able to subscribe to your channel from India .. My credit card is not getting accepted.. Any other payment options available . I tried UAE credit card also .. Do I have to enable International Payment in my credit card ? Is payment in youtube an international payment ?
@hnasr
@hnasr 2 жыл бұрын
Timestamps for topics discussed in the show 0:00 Intro 3:00 The nature of networking data center 5:30 TCP Segments 7:30 There is no Request in TCP 12:00 What so unique about Data centers? 14:00 Message Throughput vs Data throughput 18:25 Congestion Control 22:38 Homa’s Congestion Control 25:00 Server Core Load Balancing 28:30 NIC offloading 30:00 Everything Wrong about TCP 37:00 Why not QUIC? 40:00 Limitation of Streaming 44:10 Load Balancing Stream Reading 47:15 Can we treat Segments as Messages? 51:00 Dispatching Messages is Easier 53:00 Connection Orientation 1:00:00 Sender Driven Congestion Control 1:03:00 In Order Packet Delivery 1:07:00 DCTCP 1:08:30 Homa is Message Based 1:11:00 Home is Connection Less 1:12:00 Receiver Driven Congestion Control 1:15:19 Out of Order Packets 1:16:20 Homa API is not Compatible with TCP 1:17:40 Will Homa come to HTTP? 1:18:45 Conclusion
@otmanm4095
@otmanm4095 Жыл бұрын
The best source of information for back-end engineering and alike! THX sharing that!
@AdityaKumar-pj6zs
@AdityaKumar-pj6zs 2 жыл бұрын
Hussein, you are always updated with the latest tech and your videos are the best. Love you content.
@hnasr
@hnasr 2 жыл бұрын
appreciate you dear, I just cover the things that are interest me to be honest. There are plenty of latest tech that doesn't interest me one bit.
@user-xf5io2tf3v
@user-xf5io2tf3v 2 жыл бұрын
Thanks for the content!
@ahmetyasarozer
@ahmetyasarozer Жыл бұрын
Hello Hussein, The author says that TCP must use a flow-consistent routing. However, TCP practically runs over IP layer. IP packets can follow any path. That's why we have an interconnected routing system, where an IP packet can follow any hops during its travel. As a simple example, tracert command may provide different results for the same destination address. So, do you think it makes sense to treat TCP as a flow-consistent protocol? In-order packet delivery is not guaranteed by routers. Out-of-order segments are just combined in order by the TCP implementation in the host OS. That's also the reason why we all talk about ACKs, sequence numbers, retransmission, etc. What do you think?
@kwinzman
@kwinzman 2 жыл бұрын
My first reaction is we already have QUIC, why yet another protocol? Why compare to TCP and not something more modern like SCTP or QUIC? The paper doesn't pass the smell test.
@abbyck
@abbyck 2 жыл бұрын
37:00
@kwinzman
@kwinzman Жыл бұрын
@@abbyck Okay, Hussein tries to parse it and give the paper as much leeway and benefit of the doubt as possible. But not mentioning the state of the art and not contrasting your invention with it is still a huge red flag on the part of the original paper.
@clementcazaud8040
@clementcazaud8040 2 жыл бұрын
Think of OSI model... The layers 5 and 6 are (de facto) inappropriate conceptual abstractions... Would the layer 7 be inappropriate too? Couldn't layer 4 support by design all usecases categorized by RPIs mechanisms (sync/async, unidirectional/bidirectional, push/pull, cardinality*), message types (query/command/event/documents/streams), configurable message delivery guarantees and order, plus enveloped message metadata? There are already layer 7 protocols/frameworks supporting that kind of stuff... Why not put that in a layer 4 protocol instead which could then address better applications needs at its level?
@davidmcken
@davidmcken 2 жыл бұрын
"We don't think this general purpose protocol works for this specific use case so clearly the general purpose protocol is crap" - This is literally what I heard. They caveat "within the data center" allot but even there I can point out major exceptions. They point out working with google, who owns KZfaq, is Homa even remotely useful for any of the video processing? Would I use Homa for handling files for google drive? With the 64k limit imposed by IP, its not even good enough for sending a photo. Even for the replication between servers within a data center for redundancy I can't see this being useful. It solves one specific use case, I have an API that doesn't return very large responses and I want to boost my requests per second to the max. I'm honestly still confused as to why this can't be done with UDP, their whole argument of hot spots rings a bit hollow to me. In most OSes the OS only has to look as far as the port numbers to figure out which process to deliver the packet to, literally the same lookup can be used to figure out what thread to deliver a request to. This type of optimization is what most routers / firewalls do, a switch never looks past the layer 2 header, a router will not look past the layer 3 headers (if you have a firewall device then yes it will look at higher layers). With respect to the NIC offload they might be able to claim they never heard of QUIC but they can't say they never heard of Spectre and Meltdown which still have OS-level mitigations because the underlying issue is baked into the silicon. If a bug exists you have to try to protect against it from outside as the card is directly processing the packets coming in from the outside world. The whole DPU market might change that (kzfaq.info/get/bejne/iZ9ipcdy3K_Zfp8.html) but DPUs can also just as easily accelerate TCP. At that point you just have dedicated processors to handle the tasks of accepting and dispatching packets to the processors / threads (not all that different to pinning certain processes to specific cores, the process they are describing would be somewhere in the softirq handling on Linux systems). As for the switches / network exceeding the servers allot of that is coming from the highest density switches are avoiding doing the optical to digital translation and switching the light directly. Those places where it is still required they are only reading as far into the packet as required (its one major reason allot of the important fields are fixed, this makes the FPGAs / ASICs life very easy). As for the load balancing over multiple links its usually done via hashing to at least avoid the network device having to keep any type of state as there are quite a few applications that don't handle out-of-order packets correctly. If we restrict to within a datacenter as they do this is seldom the case, just look up ECMP (equal cost multi-path). On cisco kit its called per-packet load balancing vs per-flow and per-packet is usually much faster as once again it doesn't require the network device to have to look further into the packet to figure out which link it must use to send it.
@rohitbaisane6712
@rohitbaisane6712 2 жыл бұрын
Can you please create videos on stack and heap memory like why we need this concepts
@shiewhun1772
@shiewhun1772 2 жыл бұрын
Off the top of my head. The stack of a CPU is a memory space of a fixed size - so it is where the processor keeps data (data in this case = variables that have a certain fixed size and the compiler knows exactly how much memory they would take during execution). The stack is where all the variables declared in the currently running function are kept for easy access. Heap is also literally an area of memory where variables of, well, variable sizes e.g structs and dictionaries are kept. (Because things like structs and dictionaries could contain a bunch of strings, ints and etc and so be of a large and arbitrary size). So the heap is literally a part of memory (RAM) that stores data of that nature. (and then a pointer to that data stored in the heap is kept in the stack, so that the processor knows where to go get this data in the heap). I know I have done a bad job of explaining it. But do continue to search. When you understand the concept of "Stack overflow". You'll know you have done a pretty good job of understanding the stack and the heap. But as a rule of thump - The stack and heap are just parts of the memory (RAM) that are reserved for storing variables/data for the program currently in execution. - the stack hold variables of known sizes e.g strings, ints, floats (and pointers, because pointers are just addresses and as such have a fixed size) - the heap holds variables of arbitrary sizes (sizes usually larger than strings, ints and floats. e.g something like a struct or dictionary, and sometimes arrays). A side point here is the concept of a pointer. A pointer is an address. And is integral to the processor, because, you'll hear something called the "instruction register, or stack pointer" if you do a bit of undergraduate computer science. Pointers are addresses. And the Instruction Registers/Pointer, is the area in memory that contains the address of where the next instruction to be executed is in memory. (This is an important distinction between the stack and the stack pointer because an address ( contained in the stack pointer) is itself a piece of data, but it is a piece of data that tells the processor where another piece of data is in memory (the stack itself), so that the processor can then go retrieve it. Again, I have done a bad job of explaining, but I hope this will lead you down a rabbit hole where you'll learn something interesting.
@rohitbaisane6712
@rohitbaisane6712 2 жыл бұрын
@@shiewhun1772 thanku for explanation what I really want to ask is why we have concepts like lifetime and scope of Variables?
@shiewhun1772
@shiewhun1772 2 жыл бұрын
@@rohitbaisane6712 If I understand you clearly. You need a lifetime because you can't leave data laying around in the RAM forever, else your RAM will get filled up fast and you'll run out of space to run other programs. (the process of clearing out data that isn't useful anymore is called "garbage collection", you might have heard of this concept. - a related concept is called "memory leak". Remember when I said some data is stored in the heap and a pointer to that data is then put in the stack. "Memory leaks" happens when the garbage collector deletes from the stack the pointer/reference to some data in the heap but then omits to delete the actual data in the heap. Now on to scope. The idea of scope is (to my understanding) some data/variables are only necessary/useful to some particular functions. And so have to be "scoped" to that function. I.e have to be protected in a way that only the function that creates that data can access/edit it. This is important because if the data isn't "scoped" to the function that creates or needs it and is exposed to another function, then that other function can overwrite the data and this could cause problems. E..g. Imagine declaring some variable a = 4 (inside a function). It is important to keep a protected from being edited by another function because if another function comes along and reassigns a to 3. (say, a = 3 ). It could cause problems in the first function that declared a to be 4 and needs a to remain 4 throughout its operations.
@rohitbaisane6712
@rohitbaisane6712 2 жыл бұрын
@@shiewhun1772 got it. do you know any book where I can read about topics like this topics
@shiewhun1772
@shiewhun1772 2 жыл бұрын
@@rohitbaisane6712 If I were to pick a book, it'll be "Computing Systems: A Programmer's Perspective" But books are tedious. You'll learn faster watching videos and piecing things together. I learnt more from Hussein's channel and Computerphile and a guy called Ben Eater (Ben Eater has a playlist where he builds a computer from scratch with wireds and a circuit board. He literally programs hello world with wires and transistors (sort of)). Also, see if you can understand the idea of the Turing Machine (you'll know you understand it when you realize the computer is essentially the processor + RAM. Everything else is peripheral). A thing I picked from Hussein is, I don't usually google "What is blablabla" anymore. I now also tend to Google "WHY does blablabla exist"
@bravo-6900
@bravo-6900 2 жыл бұрын
Next vedio on ss7 practical attack please 🤣
@hazhohuman
@hazhohuman 2 жыл бұрын
I didn't watch all, but at first 10 minutes things get clear, and obviously TCP was and still wrong protocol for datacenters, the main reason is that within a datacenter the needed security checking is almost zero, and many other non-usful features, actions and validations that an internet/intranet out of a DC need, a DC doesn't need those
The Beauty of the Internet Protocol
26:03
Hussein Nasser
Рет қаралды 22 М.
Netdev 0x16 - Keynote: It's Time to Replace TCP in the Datacenter
1:19:06
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 72 МЛН
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,8 МЛН
Spot The Fake Animal For $10,000
00:40
MrBeast
Рет қаралды 195 МЛН
Certificates are Large and uncompressed, this RFC fixes it
33:18
Hussein Nasser
Рет қаралды 9 М.
Threads and Connections | The Backend Engineering Show
49:30
Hussein Nasser
Рет қаралды 63 М.
A Deep Dive in How Slow SELECT * is
39:24
Hussein Nasser
Рет қаралды 36 М.
Mutual TLS  | The Backend Engineering Show
50:16
Hussein Nasser
Рет қаралды 21 М.
Index Fill Factor | The Backend Engineering Show
33:48
Hussein Nasser
Рет қаралды 7 М.
The Tragedy of systemd
47:18
linux.conf.au
Рет қаралды 1,1 МЛН
How Discord Stores Trillions of Messages | Deep Dive
1:08:33
Hussein Nasser
Рет қаралды 174 М.
low battery 🪫
0:10
dednahype
Рет қаралды 1,7 МЛН
#samsung #retrophone #nostalgia #x100
0:14
mobijunk
Рет қаралды 14 МЛН
Какой ноутбук взять для учёбы? #msi #rtx4090 #laptop #юмор #игровой #apple #shorts
0:18
Vision Pro наконец-то доработали! Но не Apple!
0:40
ÉЖИ АКСЁНОВ
Рет қаралды 453 М.
Как бесплатно замутить iphone 15 pro max
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 8 МЛН