comp.lang.ada
 help / color / mirror / Atom feed
From: "Björn Persson" <spam-away@nowhere.nil>
Subject: Re: AWS applications and domain hosting
Date: Sun, 26 Jun 2005 23:00:44 GMT
Date: 2005-06-26T23:00:44+00:00	[thread overview]
Message-ID: <wsGve.27972$d5.180747@newsb.telia.net> (raw)
In-Reply-To: <mailman.98.1119814183.17633.comp.lang.ada@ada-france.org>

Marius Amado Alves wrote:
> As others have told, yes, domain and hosting are formally separate. But 
> many hosts offer registration, e.g. Yahoo!, and often the package price 
> beats buying the two things separately.

You might want to make sure that it's you and not the hosting company 
who owns the domain, so that you can change the hosting solution without 
losing your domain name.

> I think that, unlike someone else said, a separate web server, or proxy 
> (Apache), is neither required nor useful. The host system only has to 
> open a port (?) to AWS sockets, right? And allow the AWS-based 
> executable to run with the right 
> parameters/permissions/ownership/priorities...

If we're talking web servers, we're talking HTTP. HTTP builds on TCP 
which builds on IP. TCP has the notion of ports. A port is a number that 
serves to keep separate connections distinct. Clients need to know which 
port the server is listening for connections on. HTTP normally uses port 80.

(TCP's "little sister" protocol UDP has an identical but separate set of 
ports.)

In Unixy operating systems, the kernel implements IP and TCP. 
Applications access the network through the sockets API. A program that 
wants to act as a web server opens a listening TCP socket on port 80. 
(This will fail if another process is already listening on port 80. Only 
one process at a time can use a given port number.) When traffic to port 
80 arrives, the TCP layer in the kernel sets up a connection. The 
program recieves a connection socket from its listening socket. Server 
and client can then start speaking HTTP.

To use port numbers below 1024 you must be root in Unixy systems. (There 
might be exceptions.) But programs shouldn't run as root if it can be 
avoided, because then they can do a lot of damage if anything goes 
wrong. The usual solution is to start the program as root, but as soon 
as it has opened its listening socket, the program switches to an 
unprivileged user account and runs as that user from then on. Anyway, 
you need root access to let your program use port 80.

According to what I've read about AWS, it implements HTTP and interfaces 
to the sockets API, so it doesn't need Apache. I can imagine that it 
might be useful to have a regular web server beside an AWS application, 
but then one of them will have to use a nonstandard port. Some kind of 
proxy could of course accept a connection on port 80, open another 
connection to an AWS application on another port, and forward traffic 
between them.

If your application isn't meant to be used by humans through web 
browsers, it may make more sense not to use port 80. IPP for example, 
the Internet printing protocol, is built on top of HTTP but has its own 
port � number 631.

-- 
Bj�rn Persson                              PGP key A88682FD
                    omb jor ers @sv ge.
                    r o.b n.p son eri nu



  parent reply	other threads:[~2005-06-26 23:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-26  9:36 AWS applications and domain hosting Martin Dowie
2005-06-26 10:51 ` Adrian Knoth
2005-06-26 12:36 ` Jacob Sparre Andersen
2005-06-26 13:18 ` Larry Kilgallen
2005-06-26 19:29 ` Marius Amado Alves
2005-06-26 22:46   ` Jacob Sparre Andersen
2005-06-30 20:00     ` Randy Brukardt
2005-06-30 20:45       ` Pascal Obry
2005-06-30 23:58         ` Jacob Sparre Andersen
2005-07-01  6:01           ` Pascal Obry
2005-07-02 20:28             ` Jacob Sparre Andersen
2005-07-02 21:50               ` Pascal Obry
     [not found]       ` <m23bqzcrew.fsf@hugin.crs4.it>
2005-07-01  1:45         ` Randy Brukardt
2005-06-26 23:00   ` Björn Persson [this message]
2005-06-26 23:45     ` Marius Amado Alves
2005-06-29  2:42     ` tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox