Introduction
In this article, we will understand the concepts of designing a sytem. We will look at concepts of DNS servers, Content Delivery Networks, Load Balancers and Gateways, APIs, Databases, Security and many more. Then we'll see which AWS component is used to implement the concepts.
Basic System design Concepts and some AWS components
We will understand concepts of system design and AWS components that help implement these conceps using an example in this article.
To understand systems, lets see what happens when you type in 'www.abc.com', in your browser.
DNS Query
This is the process that your browser does to translate the domain name into IP address of the server.
To understand DNS we need to understand a bit about the internet naming system hierarchy.
The IP Address Distribution Hierarchy
To understand how an IP address gets to your home router, we follow a strict delegation hierarchy. IANA sits at the top, but the responsibility flows downward through regional, national, and local levels.
1. IANA (Internet Assigned Numbers Authority)
At the very top of the hierarchy sits IANA. It manages the global pool of IPv4 and IPv6 addresses. Instead of dealing with end-users or individual countries, IANA allocates large blocks of IP addresses to five Regional Internet Registries (RIRs).
2. RIRs (Regional Internet Registries)
These five non-profit organizations are responsible for managing and distributing IP addresses for specific large geographic regions of the world:
- AFRINIC (African Network Information Centre) β Serves Africa.
- ARIN (American Registry for Internet Numbers) β Serves Antarctica, Canada, parts of the Caribbean, and the United States.
- APNIC (Asia Pacific Network Information Centre) β Serves East Asia, South Asia, Southeast Asia, and Oceania.
- LACNIC (Latin America and Caribbean Network Information Centre) β Serves Central America, South America, and parts of the Caribbean.
- RIPE NCC (RΓ©seaux IP EuropΓ©ens Network Coordination Centre) β Serves Europe, Central Asia, Russia, and the Middle East.
3. NIRs (National Internet Registries) β Optional Layer
In some regions (especially within APNIC and LACNIC), RIRs allocate IP blocks to National Internet Registries. These are country-level organizations (like CNNIC in China or JPNIC in Japan) that handle allocations for their specific nation. If a country doesn't have an NIR, the hierarchy skips directly to the next level.
4. LIRs (Local Internet Registries)
RIRs (or NIRs) allocate smaller blocks of IP addresses to Local Internet Registries. These are typically large telecommunications companies, enterprise organizations, or academic institutions.
5. ISPs (Internet Service Providers)
Your local ISP acts either as an LIR itself or buys IP address space from a larger LIR. ISPs are divided into tiers:
- Tier 1 ISPs: Global networks that own the backbone of the internet.
- Tier 2 & 3 ISPs: Regional and local providers (like Comcast, Vodafone, or your local fiber provider).
6. The End User
Finally, your ISP uses technologies like DHCP (Dynamic Host Configuration Protocol) to assign a single IP address from their allocated pool to your home router or smartphone.
Source: ResearchGate
DNS process
Name resolution(conversion of human readable domain names into numeric IP addresses) is a hierarchical process
(Not to be confused with the Hierarchy discussed above though we will see how these hierarchis connect).
The following steps are taken during name resolution process:
- The browser checks its cache and sees whether it has the ip address of the domain stored. If yes then process stops here.
- If browser cache misses then the browser contacts the OS, the OS keeps its own independent cache. This cache is maintained through system resolver(eg systemd-resolved on Linux, the DNS client service on windows or mDNSREsponder/discoveryd on macOS). If cache hit, the answer is given to the browser and the process stops here
- If the OS cache misses, then a minimal DNS client called stu