I took a computer class and when the intstructor was talking about the internet, he said that the domain names you type in are the real and that every domain name has a number
IPv4 addresses are four bytes long, meaning there are a maximum of 2[sup]32[/sup] = 4,294,967,296 addresses. However, not all of those are useable.
For what it’s worth, the vast majority of those addresses don’t have domain names associated with them; they are used for plain old client computers which are connected to the internet but don’t run any server software. On the other hand, many large web servers host hundreds or even thousands of domains on the same IP address.
In addition, domain names for high-traffic sites may resolve to different IPs for load balancing purposes. Some domain servers will try to provide an IP for the closest mirror server (network-wise). Others will cycle through a list at random.
Sure – although it’s fair to say, too, that often load balancing is handled “on the back end” by a virtual IP that manages connections to multiple actual machines. All depends on the requirements of the app, whether you need to preserve session state, etc.
And it’s fair to point out that once you leave the world of web services behind, there are even more wrinkles. An SMTP server trying to send mail to BrickerRocks.com will be querying DNS for the MX record for that domain and the IP address for the MX server.
I didn’t see this answered and maybe it is obvious, but each possible domain name doesn’t necessarily have an IP associated with it. A basic domain name can be up to 255 characters and it can consist of the English letters a-z, digits 0-9, a dash, and a period – 38 choices. So just considering domain names that are 255 characters long, there are roughly 38[sup]255[/sup] possibilities[sup]*[/sup]. Compare that with friedo’s 2[sup]32[/sup] = 4,294,967,296 IP addresses.
As an aside: How do you represent the total number of possibilities? It would be the sum of 38[sup]n[/sup] where n is between 4 and 255.
The actual value is less since there are rules that restrict which characters can be used in various positions. On the other hand, there are standards in progress to support international characters instead of just English letters, so in these cases the actual value is greater.