instruction: Explain the difference between TCP and UDP.

output: TCP (Transmission Control Protocol) is connection-oriented, meaning it establishes a reliable connection before transmitting data. It ensures error checking, guarantees delivery, and maintains order of packets. UDP (User Datagram Protocol) is connectionless, sending packets without guaranteeing delivery or order, making it faster but less reliable. TCP is used for applications like web browsing and email, while UDP is common in streaming, gaming, and VoIP.


instruction: What is DNS and how does it work?

output: DNS (Domain Name System) translates human-readable domain names like example.com into IP addresses that computers use to locate each other on a network. When you type a domain into your browser, your computer queries a DNS server to find the corresponding IP address. The browser then uses that IP to connect to the correct web server.


instruction: List three key features of REST APIs.

output:
1. Stateless communication: Each request contains all the information needed to process it, without relying on stored context on the server.
2. Resource-based: Resources are identified by URLs, and operations are performed using standard HTTP methods like GET, POST, PUT, DELETE.
3. Uniform interface: The API follows consistent conventions, making it easier for developers to understand and use.


instruction: How does a CDN improve website performance?

output: A Content Delivery Network (CDN) stores cached copies of website content on multiple servers distributed globally. When a user accesses the website, the CDN delivers content from the nearest server location, reducing latency, improving load times, and decreasing the load on the origin server.


instruction: Explain the difference between horizontal and vertical scaling in cloud computing.

output: Horizontal scaling involves adding more machines or instances to handle increased load, while vertical scaling involves upgrading the resources (CPU, RAM) of an existing machine. Horizontal scaling offers better fault tolerance and is more flexible, while vertical scaling is simpler but has hardware limits.