Comments on this process

J

Jan Faerber

Davmagic said:
I would appreciate any comments on this HTTP Server Request-Reply
Process, which I have included on this page of mine for newbees, to help
explain the process... keep in mind it is simplified for general
understanding: http://davmagic.com/PAGES38.html#ex10

In many ways I am still a newbee - the httpd.config is so huge...

-) 'the process that takes place (in a few seconds) when you request a
webpage'
with a good connection => 'in a split of a second'

-) the pic - it shows what it shows. I guess MS-Paint?
I had the same problems with it ... those wrinkles in the white.

-) It is already very detailed. But I miss the proxy server.
 
J

Jan Faerber

-) 'if the Server is "down" or if the Webpage cannot be found, or if any
other errors are found, the Server sends an Error message back to the
Client's Browser...'
All in all correct but if the server is down it cannot send an error message
back :)
 
T

Toby Inkster

Davmagic said:

It's somewhat misleading. The diagramme makes it look like the domain name
server contacts the web host.

It's more like this:
http://examples.tobyinkster.co.uk/http-plus-dns

With the caveat that the client and the client's DNS server might cache
DNS results and the client might cache web pages.

As to the text... step 3:
| If the URL is not Cached, the Webpage Request is passed via HTTP
| (Hypertext Transfer Protocol) to a local Domain Name Server

No, it isn't. It uses DNS (port 53) to retrieve the domain name -- nothing
to do with HTTP (port 80).

Steps 5 and 6 aren't chronologically correct. Should be:

5. host passes page to client
6. client caches page
7. client interprets client-side scripts and renders page

You may want to mention that the entire process happens for each element
of the page -- each image, external style sheet, external javascript file,
etc
 
A

Art Sackett

Davmagic .Com said:
I would appreciate any comments on this HTTP Server Request-Reply
Process, which I have included on this page of mine for newbees, to help
explain the process... keep in mind it is simplified for general
understanding: http://davmagic.com/PAGES38.html#ex10

Item 3 is terribly geborken. The request is not forwarded to a DNS
server, and DNS servers don't speak HTTP at all. HTTP is conducted over
TCP/IP rather than UDP -- UDP is much faster than TCP/IP, but, by
design, it's not as reliable.

You undoubtedly already know how the process works, but for those who
don't:

If the client (in this case probably a web browser) doesn't already
know the IP address of the remote host, e.g. davmagic.com, on the first
request for a resource from that host it will consult DNS (Domain Name
Service) to discover it (66.175.21.39). Then it initiates an HTTP
connection to that remote host over TCP/IP, and, if HTTP/1.1 is in use,
tells the remote server, essentially, "I'm looking for davmagic.com".
Regardless of the HTTP version in use, it then says, "I'm requesting
the resource /foo/bar/html". Most web browsers will also tell the
server what kinds of files it knows how to deal with, its name and
version, which character encodings it can deal with, and maybe which
(human) language it prefers, and possibly that it would like to keep
the connection open for future requests that will come along shortly.
The client might also return a cookie, if one exists and rightfully
should be sent to that domain and path, regardless of whether or not
the server is going to do anything with it. (The client cannot know if
the server is going to actually bother to use the cookie... that's just
how it works.) There may be some other stuff sent along that is usually
ignored by the server -- some browsers even send along the monitor's
currently configured display size in pixels.

On all subsequent connections, the client already knows the IP address
of the remote host, so it skips the DNS lookup. All DNS lookups come
with a "time to live" after which clients are supposed to check for
fresher information, so if that time passes while the information is
still in the browser's pea brain, the browser, if it's behaving
correctly, will do another lookup if it needs to talk to that host
again.

The "I'm looking for davmagic.com" part is what allows us to use
name-based virtual hosting. The actual header sent by the client is
"HTTP_HOST: davmagic.com" Without it, we'd end up seeing whatever's
configured on the server as the default domain, which is almost never
the one we want because it probably is that of the web hosting provider
or one of his earliest clients.

The headers that tell the server the server that we'd like to keep the
connection open for future requests looks like:

HTTP_CONNECTION = keep-alive
HTTP_KEEP_ALIVE = 300

.... where the '300' is how long, in seconds, we'd like to keep the
connection open. This one can cause problems for servers that see a lot
of traffic, so the server is free to select a shorter interval in order
to free up the connection socket sooner. Keep-alive speeds things up by
getting us around the need to build a new connection for every request,
but it can also slow things down on a very busy server. Maybe someday
the whole thing will get a much-needed rethink. I'm not holding my
breath!

You might consider making the DNS server a terminal node connected to
the "PC or WebTV" to more accurately reflect reality.
 
D

Davmagic .Com

From: (e-mail address removed)
(Toby Inkster)
It's somewhat misleading. The diagramme
makes it look like the domain name server
contacts the web host.
It's more like this:
http://examples.tobyinkster.co.uk/http-plus-dns

This I did not realize.... I'll have to "redraw" my diagram...
With the caveat that the client and the
client's DNS server might cache DNS
results and the client might cache web
pages.

I'll rewrite the steps that you indicated after that...

Thanks...

BTW I can't quite read the name of the second DNS that you show... I
assume it is a "higher-up" level DNS?

Web Design, Magic, Painting, Junking, More
http://www.davmagic.com/
Paint A House
http://www.paintahouse.com/
NOTE: This emailbox is CLOSED do NOT reply!!!
 
D

Davmagic .Com

From: (e-mail address removed)
(Art Sackett)
Item 3 is terribly geborken. The request is
not forwarded to a DNS server, and DNS
servers don't speak HTTP at all. HTTP is
conducted over TCP/IP rather than UDP --
UDP is much faster than TCP/IP, but, by
design, it's not as reliable.
<snip message>

Well that is very interesting, and I should definately buy you a
drink...

Toby Inkster also informed me of more valuable info...

I just redesigned the diagram and rewrote the steps to conform to all of
this new info... it probably is still not exactly correct, but more so
now that I know what's really going on...

Please take a look and advise...

Web Design, Magic, Painting, Junking, More
http://www.davmagic.com/
Paint A House
http://www.paintahouse.com/
NOTE: This emailbox is CLOSED do NOT reply!!!
 
S

Sybren Stuvel

Art Sackett enlightened us with:
Then it initiates an HTTP connection to that remote host over
TCP/IP, and, if HTTP/1.1 is in use, tells the remote server,
essentially, "I'm looking for davmagic.com". Regardless of the HTTP
version in use, it then says, "I'm requesting the resource
/foo/bar/html".

Well, that would be the other way around - it first says "I'm
requesting the resource /foo/bar/html", and _then_ it tells the server
"Oh, I want that from the site called davmagic.com".

Sybren
 
M

Mitja

BTW I can't quite read the name of the second DNS that you show... I
assume it is a "higher-up" level DNS?
Webmaster's DNS server. The server which the webmaster has chosen to host
his DNS entry. Might be a measly one hosting just a few entries or a huge
DNS server, it doesnt matter. Sometimes the chain of DNS requests can be
longer. Sometimes it may all end after a single request (i.e. client's DNS
server is webmaster's DNS server).
 
T

Toby Inkster

Davmagic said:
BTW I can't quite read the name of the second DNS that you show... I
assume it is a "higher-up" level DNS?

It says "webmaster's DNS server" -- that is, the authoritative name server
for that particular domain name. Of course, it may need to consult a
higher up DNS to find out which server *is* the authoritative name server.

DNS is pretty simple when you consider a single server in isolation.
Problem is that you can't consider a single server in isolation. Thus DNS
is nasty and complicated.
 
A

Art Sackett

Sybren Stuvel said:
Well, that would be the other way around - it first says "I'm
requesting the resource /foo/bar/html", and _then_ it tells the server
"Oh, I want that from the site called davmagic.com".

Oops... you're right, as the resource is identified in the GET (or
POST, or HEAD, whatever) header, which the RFC says must come first.

I'll share that drink with you, but bring your own glass. :)
 
A

Art Sackett

Davmagic .Com said:
I just redesigned the diagram and rewrote the steps to conform to all of
this new info... it probably is still not exactly correct, but more so
now that I know what's really going on...

Well, I'm a mite uncomfy with the term "Webpage Request" in item 2, but
at a high enough level, the rest looks okay.

I wonder if a more accurate phrasing might be something like:

"2. If the URL is not found in the browser cache, the User Agent
queries a Domain Name Server to discover the IP address of
the web server hosting the requested domain."

Still not quite accurate, but at a high enough level it gets the point
across. Kinda sorta.

If you're really curious to know about how HTTP/1.1 works, you can take
a look at http://www.rfc.net/rfc2616.html -- but it won't give you any
detail at all about DNS, which can get kinda hairy even on a good day.
For a list of links to DNS-related RFC's: http://www.dns.net/dnsrd/rfc/

Out here in the real world, DNS is not as hard as it sounds. But then,
out here in the real world, there are far more than enough geborken
records to prove that it's still beyond some folks. Heck, the reverse
for my gateway is broken because either my ISP or their upstream has
problems getting their collective head wrapped around it. Oh well...

If you want to get really crazy about DNS, and actually resolve over
100 top-level names, give a look at http://www.open-rsc.org/ A bunch of
stinking radicals who feel compelled to question authority... my kind
of people!
 
T

Toby Inkster

Sybren said:
Well, that would be the other way around - it first says "I'm
requesting the resource /foo/bar/html", and _then_ it

.... usually ...
tells the server
"Oh, I want that from the site called davmagic.com".

But not in some HTTP 1.0 browsers.
 
J

Jan Faerber

Jan said:
-) It is already very detailed. But I miss the proxy server.

In a recent newsletter of a provider <URL: http://www.sil.at/ > here in
Austria / Vienna
they pronounce that they will shut down their proxy server proxy.sil.at
on 1st of June 2005 because of the use of higher bandwidth and the use
of webpages with dynamically generated content. Their customers which
still use the proxy should change their browser settings before 1st of
June.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Any Comments Here ? 20
Question on strange file types 2
What Kind of File is this? 2
OT Opera 7.54 Buggy 39
OT Drop Down Scripts 34
To Preload pages 1
OT MS releases new set top receiver 14
CSS2 Way Too Complicated 27

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top