Lecture 3 Application Layerss
Lecture 3 Application Layerss
1. HTTP conections
2.HTTP methods
3. URI
4. XML
5. DNS
2.2
Server: mobile network
Always-on host national or global ISP
Permanent IP address
often in data centers, for scaling
Clients: local or
Contact, communicate with server regional
ISP
enterprise
network
request file
RTT time to
transmit
file
time time 2.8
Time needed to transfer data including text file and ten figures from
HTML at the server to a client
Non-persistent
2 RTT (Connection time) + 2 * 10 RTT+ files transfer time= 22RTT+ files transfer time
Persistent
2 RTT (Connection time) + 10 RTT+ files transfer time = 12RTT+ files transfer time
2.9
• GET − Provides a read only access to a resource.
2.13
• scheme://authority/path1/path2?query#fragment-id
2.14
https://AIU.edu/tests/test1/?tag=computernetwork#part2
Query FragmentID
1 GET
Retrieve information from the given server using a given URI. Requests using GET should only retrieve
data and should have no other effect on the data.
2 POST
Send data to the server, for example, customer information, file upload.
3 PUT
Change (update) the current representations of the target resource with the uploaded content.
4 DELETE
Removes all current representations of the target resource given by a URI.
.
2.18
Request to get hello.html file
HTTP/1.1 200 OK
<html>
<body>
<h1>Hello, World!
</h1>
</body>
</html>
• GET /hello.htm HTTP/1.1
Hello.html file
<html>
<body>
<h1>Hello, World!
</h1>
</body>
</html>
2.19
• HTML can represent data to be displayed without formatting or
data types.
• {
• "id":16214,
• "name":“Ahmed",
• “level":4
• }
HTTP Method GET
URI http://AIU.edu/FCSE/students
URI http://AIU.edu/FCSE/students/16442
URI http://http://AIU.edu/FCSE/students164522
URI http://http://AIU.edu/FCSE/students16232
URI http://http://AIU.edu/FCSE/students16224
Blink chrome
https://www.AIU.edu/index.php/en/
Ip=
DNS 002.012.002…
Blink chrome
Q: How to map between IP address and name, and vice versa ?
st
Client wants IP address for www.amazon.com; approximation:
1
client queries root server to find .com DNS server
client queries .com DNS server to get amazon.com DNS server
client queries amazon.com DNS server to get IP address for www.amazon.com
Root servers, or DNS root servers, are 13 logical root name “servers”
name servers that are responsible for the worldwide each “server” replicated
functionality of the DNS as well as the many times (~200 servers in US)
entire Internet.
When writing the name of web site a query is sent to resolve the IP address of the
specific name.
First, your computer will see if the website is cached in your system by your OS or
browser.
If it’s not, the query will head to a local DNS recursive server.
2. when host makes DNS query, it is sent to its local DNS server
• Local DNS server returns reply, answering:
• from its local cache of recent name-to-address translation pairs (possibly out of
date!)
• forwarding request into DNS hierarchy for resolution
• each ISP has local DNS name server; to find yours:
• Windows: >ipconfig /all.
A recursive server is usually operated by your internet service provider (ISP) or wireless
carrier.
If the website isn’t cached in this server (usually by another user who has visited the
website), then the query heads to a root server.
root DNS server
Example: host at engineering.nyu.edu
wants IP address for gaia.cs.umass.edu 2
3
TLD DNS server
Iterated query: 1 4
7 6
Recursive query: 1 TLD DNS server
puts burden of name 8
resolution on requesting host at local DNS server
4
engineering.nyu.edu dns.nyu.edu 5
contacted name gaia.cs.umass.edu
server
heavy load at upper authoritative DNS server
levels of hierarchy? dns.cs.umass.edu
Caching DNS Information
once (any) name server learns mapping, it caches mapping,
and immediately returns a cached mapping in response to
a query
• caching improves response time
• cache entries timeout (disappear) after some time (TTL)
• TLD servers typically cached in local name servers
cached entries may be out-of-date
• if named host changes IP address, may not be known Internet-
wide until all TTLs expire!
• best-effort name-to-address translation!