Grokking Operating Systems and Networking for Backend Engineers
0% completed
How Your Service Resolves a Name
Checkout's configuration has one line for its database: DATABASE_HOST=db. When Checkout starts, its Postgres driver opens a TCP connection to that host on port 5432. TCP works only with IP addresses, however, so something must first turn the two letters db into an address such as 10.0.1.10.
On a test server, that step took 2.5 ms. In that time, the process read four configuration files, added a domain to the name, and sent two questions to a DNS server. None of this work appears in Checkout's code or in its logs, and each part of it can make a request slow or send it to the wrong machine
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%