Some imp concept

TCP vs UDP Protocol
TCP:
1)relaiable:Ensure data is recieved correctly and in order
2)Conncection-oriented:Connection is established before communication
3)Error checking and acknowledgement:No data loss
4)slower
5)used in web services(http/https),email,file transer

UDP:
1)faster
2)Connectionless
3)No error checking
4)used in gamming,live streaming,video calls,DNS

Main Difference in One Line:

  • TCP = Reliable, but slower. (Used when accuracy is important)
  • UDP = Fast, but unreliable. (Used when speed matters more than accuracy
What is DNS and how DNS works?
In short,DNS is a phonebook for the internet.It maps website name to IP adress of web server.
Working:
1)Entering website name
2)Browser check Local cache
3)OS system cache check
4)DNS resolver (also called DNS lookup):From the ISP of he internet.IF not fouund,it perform step by
step lookup to four dns resolver
5)Name server:Direct it to correct TLD server.Total 13 nameserver worldwide managed by different organization
6)TLD server:for eg:".com" TLD server
7)Authoriative Nameserver:It have the actual IP of the web server we are searching.
# after returning,cach is stored in DNS resolver and in the sysem and browser for faster lookup..

DNS Records - A, AAA, CNAME, TXT, NS, MX
A Record (Address Record) :maps the ipv4 adess
AAAA Record:maps the ipv6 adress
CNAME Record (Canonical Name):It creates an alias by pointing one domain to another.
eg:blog.example.com → example.com
useul or redirecting subdomains
TXT Record (Text Record):
Stores any text-based information related to the domain.
Common uses:
  • SPF (Sender Policy Framework) – Helps prevent email spoofing.
  • DKIM (DomainKeys Identified Mail) – Email authentication.
  • Verification codes for services like Google
NS Record(name server):specifiy which nameserver is responsible for domain
eg:example.com → ns1.provider.com
→ ns2.provider.com
MX record:Directs emails to the correct mail server for a domain.


Comments

Popular posts from this blog

HTMLCoding day1

dokcer