I Bet Nobody Has Ever Explained the Networking Topics Like This Before — Transcript
Full transcript
- 0:00I still remember how confusing
- 0:01networking felt when I first started
- 0:03working with distributed applications.
- 0:05You could have an application that was
- 0:07working perfectly. The database was
- 0:09running, the credentials were correct,
- 0:11and yet the application simply could not
- 0:14connect to it. The frustrating part was
- 0:16that the error message often did not
- 0:18tell you what was actually happening
- 0:20underneath.
- 0:21You were just staring at something like
- 0:22a connection timeout and wondering,
- 0:25"Okay, but where exactly did this
- 0:27request disappear?"
- 0:29That is really what makes networking
- 0:30difficult for developers.
- 0:32The thing that finally made networking
- 0:34click for me was realizing that I did
- 0:36not need to memorize 20 different
- 0:38definitions. I just needed to follow a
- 0:41request and understand why each piece of
- 0:43networking exists when I reach it.
- 0:46So, that is what we're going to do here.
- 0:48Let's say we're building a ride-sharing
- 0:50application called RideNow.
- 0:52A passenger opens the app, enters a
- 0:54destination, and taps request ride.
- 0:58Somewhere in the background, the system
- 1:00needs to find a nearby driver, send the
- 1:02request to that driver, and once the
- 1:04driver accepts, the passenger should be
- 1:06able to see the driver's location moving
- 1:08on the map.
- 1:09That sounds simple from the user's point
- 1:11of view. They tap a button, and a few
- 1:13seconds later they see a driver.
- 1:15But for that one experience to work, a
- 1:18lot has to happen across the network.
- 1:20So, let's follow that request from the
- 1:22passenger's phone all the way to the
- 1:24RideNow backend and understand why each
- 1:27networking concept is needed along the
- 1:29way.
- 1:30Number one, IP address. Let's start with
- 1:33a very basic question. When the
- 1:35passenger's phone wants to communicate
- 1:37with another machine, how does the
- 1:39network know where that machine is?
- 1:41Every device communicating over an IP
- 1:44network needs an IP address. You can
- 1:46think of it like a postal address. If I
- 1:49want to send something to your house, I
- 1:50need to know where your house is.
- 1:53In the same way, when the RideNow
- 1:55application wants to send data to
- 1:56another machine, the network needs an
- 1:58address that tells it where that machine
- 2:00can be reached.
- 2:02There are two versions of IP that you
- 2:04will come across most often, IPv4 and
- 2:07IPv6.
- 2:09IPv4 is the older and still extremely
- 2:11common version.
- 2:13It uses a 32-bit address space, which
- 2:15gives us roughly 4 billion possible
- 2:18addresses. That sounds like a huge
- 2:20number, but once you consider phones,
- 2:23laptops, servers, cloud resources, IoT
- 2:26devices, and everything else connected
- 2:28to the internet, we eventually started
- 2:30running out of IPv4 addresses.
- 2:33That is one of the main reasons IPv6 was
- 2:36introduced.
- 2:37IPv6 uses a much larger 128-bit address
- 2:41space, giving us an enormous number of
- 2:43possible addresses.
- 2:45In practical terms, IPv6 gives the
- 2:48internet a vastly larger pool of
- 2:50addresses than IPv4.
- 2:52You do not need to memorize the actual
- 2:54numbers here. The important difference
- 2:56is simply this.
- 2:57IPv4 has a much smaller address space,
- 3:00while IPv6 was designed with a
- 3:02dramatically larger address space to
- 3:05support the continued growth of
- 3:06connected devices.
- 3:08And IPv6 is not just about having more
- 3:10addresses. It also changes some aspects
- 3:13of how addressing and network
- 3:14configuration work.
- 3:16But from a developer's perspective, the
- 3:18most important thing to remember is that
- 3:20both IPv4 and IPv6 solve the same
- 3:24fundamental problem.
- 3:25They provide addressing so devices can
- 3:27communicate across an IP network.
- 3:30There is another important thing to
- 3:32understand about IP addresses.
- 3:34An IP address is not necessarily a
- 3:36permanent identity for a device.
- 3:39Your phone can have one address when it
- 3:41is connected to your home Wi-Fi and
- 3:43another when it switches to mobile data.
- 3:45A server can also have multiple
- 3:47addresses depending on how it is
- 3:49connected to a network.
- 3:51So, it is better to think of IP address
- 3:53as a location where a device can
- 3:55currently be reached rather than as the
- 3:57permanent identity of that device.
- 4:00Now, our passenger's phone has an IP
- 4:02address, but we need to understand
- 4:04something else.
- 4:05Is that address reachable from anywhere
- 4:07on the internet or is it only useful
- 4:09inside the passenger's local network?
- 4:12And that's where private and public IP
- 4:14addresses come in.
- 4:16When the passenger connects to their
- 4:17home Wi-Fi, the phone normally receives
- 4:20a private IP address.
- 4:22That address works inside the local
- 4:24network, but another device somewhere on
- 4:26the internet cannot simply use that
- 4:28address to connect directly to the
- 4:30phone.
- 4:31A public IP is different because it can
- 4:33be reached across the internet.
- 4:36This distinction becomes really
- 4:37important when we build Ride Now.
- 4:39We might have some parts of the system
- 4:41that need to receive traffic from the
- 4:43internet, while other parts, such as our
- 4:45databases, should only be reachable from
- 4:47inside our private environment. So, the
- 4:50passenger's phone is inside one network,
- 4:52while the Ride Now infrastructure is
- 4:54somewhere else.
- 4:56But, how does the phone actually find
- 4:58the Ride Now server?
- 4:59The passenger doesn't know its IP
- 5:01address, and they certainly shouldn't
- 5:02have to type one.
- 5:04They just open Ride Now using its name.
- 5:07And that's where DNS comes in.
- 5:09DNS, or Domain Name System, translates a
- 5:12host name into an IP address that the
- 5:14network can use.
- 5:16So, when Ride Now needs to connect to
- 5:18its back end, DNS helps the application
- 5:21discover where that back end can be
- 5:22reached.
- 5:23This lookup isn't necessarily performed
- 5:25from scratch every time.
- 5:27DNS responses can be cached, and those
- 5:30cached results have a lifetime
- 5:32controlled by something called TTL.
- 5:35A host name can also point to multiple
- 5:37IP addresses, which becomes useful when
- 5:39an application needs to handle traffic
- 5:41across multiple machines.
- 5:43So, DNS has helped our phone find the
- 5:45machine it needs to communicate with.
- 5:48But, knowing which machine we want isn't
- 5:50quite enough.
- 5:51That machine could be running several
- 5:53different services at the same time.
- 5:55Maybe there's a web application, a
- 5:57database, and some other service running
- 5:59there.
- 6:00So, how does the network know which
- 6:02application we're actually trying to
- 6:04reach?
- 6:05That's where ports come in.
- 6:07An IP address identifies the machine,
- 6:09while a port identifies the application
- 6:12or service we want to communicate with
- 6:14on that machine.
- 6:15A single server can run many different
- 6:17network services at the same time.
- 6:20They can all use the same machine
- 6:21because the network can distinguish
- 6:23between them using different ports.
- 6:25This is something developers run into
- 6:27quite often.
- 6:28You can have an application that is
- 6:30running perfectly, but another machine
- 6:32still cannot connect to it.
- 6:34One reason could be that the application
- 6:36is listening only on localhost instead
- 6:38of accepting connections from the
- 6:40network.
- 6:41So, there's an important difference
- 6:42between an application being up and an
- 6:45application actually being reachable
- 6:47over the network.
- 6:48Now, our request has a destination
- 6:50machine and a destination service.
- 6:53But, before the request can leave the
- 6:55passenger's local network, there's
- 6:56another piece of networking happening
- 6:58underneath all of this.
- 7:00Inside a local network, devices don't
- 7:02communicate using IP addresses alone.
- 7:05That's where MAC addresses come in.
- 7:08A MAC address is associated with a
- 7:09network interface and is mainly used for
- 7:12communication within the local network.
- 7:15So, when the passenger's phone sends
- 7:16data through Wi-Fi, the local network
- 7:19needs to know which network interface
- 7:21should receive that data.
- 7:23This is where it helps to separate IP
- 7:24addresses and MAC addresses in your
- 7:26head.
- 7:27An IP address is the logical address
- 7:29used for communication across networks.
- 7:32A MAC address is associated with the
- 7:34network interface and is used for
- 7:36communication on the local network.
- 7:39The phone knows the destination IP, but
- 7:41it may not know the MAC address
- 7:43associated with that destination yet.
- 7:45So, how does it find it?
- 7:47That's exactly where ARP comes in.
- 7:50ARP, or Address Resolution Protocol,
- 7:53helps a device discover the MAC address
- 7:55associated with an IP address on the
- 7:57local network. The phone can essentially
- 8:00ask the local network, "Who has this IP
- 8:02address?"
- 8:03The device that owns that address can
- 8:05respond with its MAC address, and the
- 8:07phone can then use that information to
- 8:09communicate across the local network.
- 8:12The result can also be cached, so the
- 8:14device doesn't have to ask the same
- 8:15question every time.
- 8:17You probably won't think about ARP when
- 8:19you're building a ride-now feature, but
- 8:21when you're debugging a lower-level
- 8:23networking problem, understanding the
- 8:25relationship between IP addresses and
- 8:27MAC addresses can be very useful.
- 8:30Now, the phone knows how to communicate
- 8:31on its local network, but ride now isn't
- 8:34sitting inside the passenger's house.
- 8:36The request has to travel across several
- 8:38different networks before it reaches the
- 8:40ride-now infrastructure,
- 8:42and that's where routing comes in.
- 8:45As the request travels across the
- 8:46network, routers look at the destination
- 8:49and decide where the traffic should go
- 8:50next. The passenger's phone doesn't need
- 8:53to know the complete path from their
- 8:54house to the ride-now infrastructure.
- 8:57Each router along the way makes a
- 8:59decision about the next step and
- 9:00forwards the traffic toward the
- 9:02destination.
- 9:03This is why the path between a client
- 9:05and a server can involve many different
- 9:07networks.
- 9:08It also explains why you can sometimes
- 9:10have a perfectly healthy application and
- 9:12still experience latency or packet loss
- 9:15somewhere between the client and the
- 9:16server.
- 9:17But now, we have another problem.
- 9:20Our passenger's phone is using a private
- 9:22IP address, but it needs to communicate
- 9:24with something outside that private
- 9:26network. So, how does that private
- 9:28address communicate with the public
- 9:30internet? That's where NAT comes in.
- 9:33NAT, or Network Address Translation,
- 9:36allows a private address to be
- 9:38translated into a public address when
- 9:40traffic leaves the private network. The
- 9:42home router keeps track of that
- 9:44connection, so that when the response
- 9:45comes back, it knows which device inside
- 9:48the private network should receive it.
- 9:50That's why multiple devices in your home
- 9:52can access the internet at the same time
- 9:55while sharing the same public
- 9:56connection. The same idea is also useful
- 9:59in cloud environments. You might have
- 10:01private servers that need outbound
- 10:03internet access for things like updates
- 10:05or external services, but you don't want
- 10:08those servers to be directly reachable
- 10:10from the internet.
- 10:11NAT allows that outbound communication
- 10:14without necessarily exposing those
- 10:15private machines to incoming
- 10:17connections.
- 10:18So, our request can now move between
- 10:21networks.
- 10:22But let's say Ride Now is becoming a
- 10:24serious production system. We don't want
- 10:26every machine in our environment sitting
- 10:28in one large network where everything
- 10:30can communicate with everything else.
- 10:33We need some boundaries. And that's
- 10:35where subnetting comes in. Subnetting
- 10:38allows us to divide a larger network
- 10:40into smaller network segments.
- 10:42For Ride Now, we might have one area for
- 10:44services that need to receive external
- 10:46traffic, another area for application
- 10:49services, and another area where
- 10:51databases and other sensitive systems
- 10:53are kept. The idea is not simply to
- 10:55organize things neatly. These boundaries
- 10:58also allow us to control how traffic
- 11:00moves between different parts of the
- 11:02system. For example, the database might
- 11:05only need to accept traffic from the
- 11:06application services. It doesn't need to
- 11:09be directly reachable from the public
- 11:11internet. So, subnetting gives us a way
- 11:13to create these network boundaries.
- 11:16But whenever a new machine joins one of
- 11:17these networks, it still needs to know
- 11:19something very basic. What IP address
- 11:23should it use? What is its gateway?
- 11:25Which DNS server should it use? We could
- 11:28configure all of that manually, but
- 11:30imagine doing that for hundreds or
- 11:32thousands of machines.
- 11:34That's where DHCP comes in.
- 11:37DHCP, or Dynamic Host Configuration
- 11:40Protocol, allows devices to receive
- 11:43their network configuration
- 11:44automatically.
- 11:45You've probably used DHCP without even
- 11:48realizing it. When you connect your
- 11:50phone or laptop to Wi-Fi, you don't
- 11:52manually enter all the network
- 11:54information. The network provides the
- 11:56configuration your device needs.
- 11:58The same basic idea can be used when
- 12:00machines join larger networks.
- 12:03DHCP can provide the device with an IP
- 12:06address, along with information such as
- 12:08the network configuration, gateway, and
- 12:10DNS server it should use. So, now our
- 12:13device has the information it needs to
- 12:15communicate on the network. But, simply
- 12:17being able to reach another machine
- 12:19isn't enough. When the passenger taps
- 12:21request ride, we need to make sure that
- 12:24the data arrives reliably and in the
- 12:26correct order. And that's where TCP
- 12:28comes in. TCP provides reliable, ordered
- 12:32communication between two endpoints.
- 12:35If some data is lost while traveling
- 12:36across the network, TCP can detect that
- 12:39and arrange for it to be transmitted
- 12:41again. It also handles things like flow
- 12:43control and congestion control, so that
- 12:45a sender doesn't overwhelm the receiver
- 12:48or the network.
- 12:49For something important like a ride now
- 12:51ride request, that reliability matters.
- 12:54We don't want the passenger to tap
- 12:56request ride, the request to lose some
- 12:58data along the way, and the system to
- 13:00simply continue as though everything was
- 13:02fine. TCP gives applications a reliable
- 13:05communication channel to work with. But,
- 13:07before TCP can start transferring
- 13:09application data, the two sides first
- 13:12need to establish a connection. And
- 13:14that's where the TCP three-way handshake
- 13:16comes in. When the passenger's phone
- 13:18wants to establish a TCP connection with
- 13:20the ride now server, the client starts
- 13:23the connection, the server responds, and
- 13:25the client confirms that it is ready to
- 13:27communicate. Once that process is
- 13:29complete, the connection is established
- 13:31and application data can start flowing.
- 13:34That initial setup does have some
- 13:36overhead, which is why applications
- 13:38often reuse existing connections instead
- 13:40of creating a completely new connection
- 13:42for every small request. For Ride Now,
- 13:45that can make a noticeable difference
- 13:47because the passenger might make many
- 13:49requests while using the application.
- 13:51So now we have a reliable connection
- 13:53between the passenger and Ride Now.
- 13:56But there's another problem. We're
- 13:57dealing with account information,
- 13:59location data, and potentially
- 14:01payment-related information. We don't
- 14:04want that information traveling across
- 14:05the network in a way that someone could
- 14:07simply read.
- 14:08That's why we need HTTPS and TLS.
- 14:12HTTPS gives us secure HTTP communication
- 14:16by using TLS.
- 14:18TLS provides encryption so that someone
- 14:20intercepting the traffic cannot simply
- 14:22read the data. It also provides
- 14:24integrity, which helps detect if the
- 14:26data has been modified, and
- 14:28authentication through certificates so
- 14:30the client can verify the server it is
- 14:32communicating with.
- 14:34So before Ride Now starts exchanging
- 14:36sensitive application data, the
- 14:38connection is secured. In a production
- 14:41environment, TLS doesn't necessarily
- 14:43have to be handled directly by the
- 14:45application itself. It can be terminated
- 14:47by infrastructure in front of the
- 14:49application, and depending on the
- 14:51architecture, traffic can then be
- 14:53encrypted again before it reaches
- 14:55internal services.
- 14:56The important thing is that HTTPS gives
- 14:59our application a secure way to
- 15:01communicate.
- 15:02Now that we have a secure connection,
- 15:04we're finally ready to talk about the
- 15:06actual application request.
- 15:08That's where HTTP comes in. The
- 15:11passenger taps request ride. The Ride
- 15:14Now application sends an HTTP request to
- 15:16the back end.
- 15:18That request contains information about
- 15:20what the passenger is asking for, along
- 15:22with headers and any required data. The
- 15:24back-end receives the request, validates
- 15:27the passenger, checks the ride details,
- 15:29looks for an available driver, and sends
- 15:32an HTTP response back. This request and
- 15:35response model is what developers work
- 15:37with every day when building APIs and
- 15:39web applications.
- 15:41At this point, our simple ride now
- 15:43application works. But let's say it
- 15:45becomes extremely popular. Now thousands
- 15:49or even millions of passengers are
- 15:50requesting rides at the same time. One
- 15:53application server obviously isn't going
- 15:55to be enough.
- 15:56We need a way to distribute those
- 15:58requests across multiple servers, and
- 16:01that's where a load balancer becomes
- 16:02useful. We can run multiple application
- 16:05servers and place a load balancer in
- 16:07front of them. Now the passenger's
- 16:09request doesn't need to know which
- 16:10particular server will handle it. The
- 16:13load balancer receives the traffic and
- 16:15chooses a healthy back-end server to
- 16:17process the request.
- 16:18This gives us scalability because we can
- 16:21add more servers as traffic increases.
- 16:23It also improves availability because if
- 16:26one server becomes unhealthy, the load
- 16:28balancer can stop sending traffic to it
- 16:30while the other servers continue
- 16:32handling requests.
- 16:33So, the load balancer gives us a
- 16:35controlled entry point into the
- 16:37application. But in a real production
- 16:39system, we often want that entry point
- 16:41to do more than simply choose a server.
- 16:44We might want to handle TLS, route
- 16:46different types of requests, cache
- 16:48certain responses, compress data, or
- 16:51hide the internal structure of our
- 16:53services.
- 16:54And that's where a reverse proxy comes
- 16:56in. A reverse proxy sits between the
- 16:59client and the back-end services and
- 17:01acts as an intermediary. For Ride Now,
- 17:04the passenger doesn't need to know
- 17:05whether a particular request eventually
- 17:07goes to the passenger service, driver
- 17:10service, trip service, or some other
- 17:12internal component.
- 17:14The reverse proxy can receive the
- 17:15request and decide where it should go.
- 17:18It can also handle things such as TLS
- 17:20termination, caching, compression,
- 17:23routing, and other concerns that we may
- 17:25not want every individual application
- 17:27service to handle.
- 17:29This is why you'll often see load
- 17:30balancers and reverse proxies used
- 17:32together in real architectures.
- 17:35Their responsibilities can overlap
- 17:36depending on the technologies and
- 17:38architecture being used.
- 17:40But now we have another important
- 17:42question.
- 17:43Just because we have a path to our
- 17:44services doesn't mean we should allow
- 17:46every kind of traffic to reach them.
- 17:49We need to control who can communicate
- 17:51with what. And that's where firewalls
- 17:53come in. A firewall controls which
- 17:56network traffic is allowed and which
- 17:58traffic should be blocked. For example,
- 18:00the passenger should be able to reach
- 18:02the public part of Ride Now, but they
- 18:04should not be able to connect directly
- 18:06to the database.
- 18:07The application services might be
- 18:09allowed to communicate with the database
- 18:11while connections coming directly from
- 18:12the public internet are blocked.
- 18:15In cloud environments, you can implement
- 18:17these kinds of controls through security
- 18:19groups and network access rules. And in
- 18:21container environments, you can also
- 18:23have policies controlling which
- 18:25workloads are allowed to communicate
- 18:26with each other.
- 18:27This is also important when you're
- 18:29debugging. If a connection is timing
- 18:31out, the problem might not be your
- 18:33application code at all. A network rule
- 18:35somewhere between the two systems could
- 18:37simply be dropping the traffic. So, when
- 18:40an application says, "I can't connect,"
- 18:43you shouldn't immediately assume the
- 18:44application itself is broken. There
- 18:46could be a network boundary preventing
- 18:48that connection.
- 18:50Now, let's continue our Ride Now story.
- 18:52The passenger has requested a ride, the
- 18:54driver has accepted it, and the
- 18:56passenger is watching the driver's
- 18:58location move on the map.
- 19:00At this point, we have a different
- 19:01problem. The passenger doesn't want to
- 19:03keep asking the server every few
- 19:05seconds, "Where is the driver now?"
- 19:08We want the server to be able to send an
- 19:09update whenever the driver's location
- 19:11changes. And that's where WebSockets
- 19:14become useful.
- 19:16A normal HTTP interaction is generally
- 19:18based around a request and a response.
- 19:21The client asks for something and the
- 19:23server sends a response.
- 19:25But in our ride-now example, we want
- 19:27something more interactive.
- 19:29Once the driver accepts the ride, the
- 19:31passenger wants to see the driver's
- 19:33location update continuously.
- 19:35If the phone had to keep sending
- 19:37requests asking for the latest location,
- 19:39we'd create a lot of unnecessary
- 19:41traffic, especially when there hasn't
- 19:43been much change.
- 19:44WebSockets provide a persistent two-way
- 19:47communication channel between the client
- 19:49and the server.
- 19:50Once that connection is established, the
- 19:52server can send updates to the passenger
- 19:54without waiting for another request. So,
- 19:57as the driver moves, ride-now can
- 19:59receive the new location and push that
- 20:01information through the WebSocket
- 20:03connection to the passenger's phone.
- 20:05That's a good example of why you should
- 20:06understand the problem before choosing
- 20:08the technology.
- 20:10We didn't choose WebSockets simply
- 20:12because they are popular. We need them
- 20:14because the server needs to continuously
- 20:16send updates to the client.
- 20:18But WebSockets still use a reliable
- 20:20communication model underneath. And not
- 20:23every type of network communication
- 20:24needs that level of reliability.
- 20:27Sometimes getting the latest information
- 20:29quickly matters more than making sure
- 20:31every single piece of data arrives. And
- 20:34that's where UDP comes in.
- 20:36UDP takes a very different approach from
- 20:38TCP. It does not provide the same
- 20:41guarantees around delivery and ordering,
- 20:43which means it has less overhead and can
- 20:46be useful when low latency matters more
- 20:48than guaranteed delivery.
- 20:50You'll see UDP used in areas such as
- 20:52gaming, real-time media, and some types
- 20:55of streaming communication.
- 20:57DNS can also use UDP for many queries
- 21:00because the messages are usually small
- 21:02and don't always require the overhead of
- 21:04establishing a full TCP connection.
- 21:07For our Ride Now example, the important
- 21:09thing is not to think of UDP as better
- 21:11than TCP. They solve different problems.
- 21:15For a ride request, reliable delivery is
- 21:17important, so TCP makes sense.
- 21:21For certain types of real-time
- 21:22communication, receiving the newest
- 21:24information quickly can matter more than
- 21:26retransmitting every piece of missing
- 21:28data.
- 21:29And by now, we've covered quite a few
- 21:31different parts of networking. We've
- 21:33talked about IP addresses, DNS, ports,
- 21:37MAC addresses, ARP, routing, NAT,
- 21:41subnets, DHCP, TCP, TLS, HTTP, load
- 21:47balancers, reverse proxies, firewalls,
- 21:50WebSockets, and UDP.
- 21:53So, how do we put all of these pieces
- 21:55into one mental model?
- 21:57That's where the OSI model helps. The
- 22:00OSI model gives us a conceptual way to
- 22:02divide networking into seven layers,
- 22:05starting from the physical network and
- 22:07moving all the way up to the application
- 22:08layer.
- 22:10You don't need to memorize those seven
- 22:11layers just so you can repeat them in an
- 22:13interview. The real value is that the
- 22:15model gives you a way to think about
- 22:17where a networking problem might be
- 22:19happening.
- 22:20Let's say Ride Now suddenly cannot
- 22:22connect to another service.
- 22:24Instead of simply saying the network is
- 22:26broken, we can start asking better
- 22:28questions.
- 22:30Is the local network working?
- 22:32Can we reach the destination network?
- 22:34Can the transport connection be
- 22:35established? Is the secure connection
- 22:38working?
- 22:39Is the application request actually
- 22:41reaching the service?
- 22:43That way, we can narrow down the problem
- 22:45instead of treating networking as one
- 22:47giant mystery. And that's the whole
- 22:49idea.
- 22:50So, let's quickly follow that Ride Now
- 22:52request one more time.
- 22:54The passenger's phone first gets its IP
- 22:56address, whether that's IPv4 or IPv6,
- 23:00and that address tells the network where
- 23:02the device can be reached. Because the
- 23:04phone is inside a private network, it
- 23:06has a private IP, while communication
- 23:09with the internet happens through a
- 23:10public IP.
- 23:12The phone then uses DNS to turn the Ride
- 23:14Now host name into the IP address of the
- 23:17service it needs to reach.
- 23:19Once it knows the destination machine,
- 23:21ports tell the network which application
- 23:23or service on that machine should
- 23:25receive the traffic.
- 23:26Inside the local network, MAC addresses
- 23:29are used to identify network interfaces,
- 23:31and ARP helps the phone discover the MAC
- 23:33address it needs.
- 23:35From there, routing takes the traffic
- 23:37from one network to another until it
- 23:39reaches the Ride Now environment. NAT
- 23:42allows that private address from the
- 23:43passenger's network to communicate
- 23:45through a public connection.
- 23:47Inside Ride Now, subnetting separates
- 23:50different parts of the infrastructure
- 23:51into controlled network segments, while
- 23:54DHCP can automatically provide machines
- 23:57with the network configuration they
- 23:58need.
- 23:59Once the destination is reachable, TCP
- 24:02gives us reliable and ordered
- 24:04communication, and the TCP three-way
- 24:06handshake establishes that connection
- 24:08before the application starts sending
- 24:10data.
- 24:11TLS then secures that communication,
- 24:14giving us HTTPS,
- 24:16and HTTP carries the actual Ride Now
- 24:19request, such as the passenger asking
- 24:21for a ride.
- 24:23As Ride Now grows, the request reaches a
- 24:25load balancer, which distributes traffic
- 24:27across healthy application servers.
- 24:30A reverse proxy can then handle things
- 24:32like routing, TLS termination, caching,
- 24:35and other responsibilities before the
- 24:37request reaches the appropriate back-end
- 24:39service.
- 24:40Along the way, firewalls make sure that
- 24:43only the traffic we actually want is
- 24:45allowed to reach those services. The
- 24:47driver accepts the ride, and now the
- 24:49passenger needs real-time location
- 24:51updates.
- 24:52WebSockets give us a persistent two-way
- 24:55connection, so the server can push those
- 24:57updates to the phone.
- 24:58And when we have situations where low
- 25:00latency matters more than guaranteed
- 25:02delivery, UDP gives us a lighter
- 25:04alternative to TCP.
- 25:07Finally, the OSI model gives us a way to
- 25:09put all of these pieces into perspective
- 25:11and troubleshoot them layer by layer
- 25:13when something goes wrong.
- 25:15So, that's networking. It isn't really
- 25:1820 unrelated concepts. It's one request
- 25:21traveling through a system with each
- 25:23concept solving a different problem
- 25:25along the way.
- 25:26And once you can follow that journey
- 25:28from the IP address on the phone all the
- 25:30way to the application and back again,
- 25:32networking becomes much easier to
- 25:34understand.
About this transcript
This page contains the full transcript of I Bet Nobody Has Ever Explained the Networking Topics Like This Before by Cloud X Berry, generated from the public captions YouTube serves with the video. The transcript has 4,105 words across 730 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.