DNS (Domain Name System) provides us a way to give names to ip addresses. For example, if you have a DatabaseDatabase
Databases are computer systems designed for storing data.

This note serves as a link to connect database-related notes.

[[Optimistic Locking]]/[[Pessimistic Locking]]

Status: #🌱...
running on a host in your local network behind the ip (Host B), you can name it "db" by adding a line in the hosts file on your host (Host A):

# appends to a file every line you make (icluding \n) until you interrupt
cat >> /etc/hosts db

Whatever we put inside /etc/hosts file will be taken for granted, and is the source of truth for that host - If we run hostname on host B, we will see that the actual name of the host is host-2, but host A doesn't care. You can even use this approach to fool system A that system B is Google.

Whenever you try to reach db, the host A will look at its hosts file, find the record that says db points to, and reach to that IP address. If it can't find the requested Domain NameDomain Name
While our local network hosts can be referenced with names such as db, on the internet, hosts use a special Domain Name format: www.google.com.

The purpose of this format is to group similar thing...
, it will ask DNS server for help. This process is known as DNS ResolutionDNS Resolution
[[DNS]] Resolution is a process in which [[Domain Name]] are converted to IP addresses of the hosts they point to.

The process of resolution is handled by multiple DNS servers which forward the re...

Within a small network, you can get away with specifying the names and the ip addresses of other hosts in the hosts file. As the system grows, this will grow harder to maintain as the files will grow bigger, and as one of the server IPs changes, you'd have to update all of the hosts. The solution to this is to centrally manage DNS entries in a DNS ServerDNS Server
DNS Server is a server who's primary purpose is the DNS resolution. It holds a [[Database]] of IP addresses and Domain Names, and is able to communicate with other DNS Servers to help with the quer...

Status: #🌲 References: -