First, I've taken the gross impropriety of fwding this to the list because there are folks there much more knowledgeable than me.
Second, this isn't particularly in response to your email, which describes a useful virtual hosting option for AOLserver, but rather describes why, today, I am reading about reverse proxies with Apache 2.0.
I can think of a dozen different ways (maybe not soo many) to implement name based virtual hosting, and the choice really comes down to who you are and what you are trying to do. Maybe you have and or want ....
1. One machine and many completely different websites run
for completely different users (requires high security
isolation from server instance to another)
2. One machine and machine completely different websites
run for the same user (security not as important)
3. One machine and many different websites but not completely
independent websites? (may want to share code, db, and
some images)
4. Variations of 1-3 above but where you want high uptime
for all servers and don't want one coming down to affect
others?
5. You're need to add/remove sites at runtime.6. You want high uptime and so you have more than one
machine at maybe more than one geographical location and you
want all these to be running the same dynamic website.7. You want a reverse proxy to stitch together many
independent technologies (tomcat, jboss, aolserver,
apache, zeus/nuke,
snmp management, bob's special little webserver)
that each provide an html stream in their own
process all under the same port 80 url)
(nsvhr does this well.)Okay, a baker's 1/2 dozen of reasons for virtual hosting.
Unless you need to share db or session information, or unless you have very small machines, I don't don't see AOLserver as the best way to provide most of these solutions. Though I've tried hard in the past to make it do so....
But between SQUID and Apache as reverse proxies and the Linux Virtual Server project, I think there are some great, almost industry standard ways to provide a lot of virtual hosting solutions. And with that comes documentation and books and developers that already grok this.
Having said that, I've never used SQUID to do this, I've only done the most rudimentary work with Apache. And when I last checked on the LVS, it seemed wonderful, but I needed more of a cookbook, more of a put together solution than what was provided then.
My version of nsvhr/nsunix was great for the speed and efficiencies and the stability and the ability to manage virtual hosts at runtime, but nsunix doesn't scale beyond one machine, and nsvhr doesn't allow cooperating websites to share db/code/session information. So I'm pretty much done with it. It did a great job at being a reverse proxy and letting me stitch together aolservers, apaches, and specialized little webservers. Fast and relatively stable (modulo goddamned problems that IE's notion of TCP would introduce.)
My understanding of virtual hosting ala aolserver 4 is that it is like Apache's -- many completely independent websites all with one single point of failure. Good for use of resources; maybe bad for uptime and maybe management. Maybe bad for security too.
It seems as thogh Tomasz's option tries to provide for more complex websites that may want to share data. That's good!
I think it's good to provide the Apache level -- It's good because Apache does it and so it becomes a burden/faq not to provide it. But that maybe the only reason. Or maybe my coffee is just too cold and bitter this morning. Like my heart.
I think it's more interesting to provide for the ability to create more interesting/sophisticated websites ala datasharing and reverse proxying and the load and geographical scaling (6 & 7) above. (CS/Engineer speaking now.)
More interesting, but does anyone need it? (mba speaking now) (btw if the answer is yes and you have fund$ my email address is [EMAIL PROTECTED])
I dunno (dominant (?) personality taking over once more)
Fantasy time:
I would love to know more (that means "get my hands in a gpl like way") of how AOL itself provides for high uptime with their AOLserver instances. What monitoring code, what reverse proxy code, what heartbeat code, what restart code is around and might be useful by the community.
Failing that, if I had to do my nsvhr/nsunix work again, I would hope my car would stall on the tracks and the Southern Pacific would help me out right now. Or I would try to work with the Linux Virtual Server project.
Because that project apparently aims to be the industry standard (i.e. a
large user base, some commercial support across hw and docs) for
providing 6-7 in terms of
a) monitoring systems
b) heartbeats
c) restarts
d) failovers
e) reverse proxying at several levels, from the
Apache/SQUID/nsvhr-nssock method of just piping each byte through
an intermediate proxy, to a much more interesting and scalable
across many machines method of screwing around with the underlying
TCP packets' routing so that on a network wide basis,
webserver responses respond directly to the client browser and no
longer need to get piped back through the intermediate proxy.
(That's sort of like the nsunix trick, done through routing,
and so applicable to very large sites.)
What is the old saying about slicker than shit through a goose?
I mean, um, that's really cool. If it really works, I know, I just
know that we would all be walking around with groupies on our
elbows.I'd love to see various AOLserver modules, documentation, admin pages, dbs set up to cooperate well with the Linux Virtual Server. We'll never displace Apache, but if we had a highly available, highly scalable server, I think we could get some interesting press and projects coming our way.
Jerry
Tomasz Kosiak wrote:
You may take a look at my proposal to the virtual hosting solution. So far this is only proposal and I dont't know if it would be incorporated into core. I've got working copy of 3.5.1 with those patches, indeed I reviewed them one more time and going to preprare a distro including them. You can take a look at older AOLserver version that we use in production for over a year (at http://miniacs.zjednoczenie.com/snapshot.html). I'm totaly dedicated to have my modification included into core. Now they are kept as separate patches which are applied to standard AOLserver distribution.
Yesterday I've fixed also additional modules to work with my proposal. They expose new commands or options to handle AOLserver urlspace in single server.
ns_register_filter ?-vserver vserver? when method url adp ?arg? ns_register_proc ?-noinherit? ?-vserver vserver? method url proc ?arg? ns_register_adp ?-noinherit? ?-vserver vserver? method url adp ?arg? ns_register_proxy ?-noinherit? ?-vserver vserver? method url proxyURL ?arg? ns_url2file ?-vserver vserver? url ns_url2file_map ?-noinherit? ?-vserver vserver? url path ?arg? ns_url2file_map ?-vserver vserver? url
ns_register_adp is already included in AS 4.x - it works like ns_register_proc but for adp srcipts.
ns_register_proxy is to allow to proxy part of or whore urlspace to another httpserver using nsvhr mechanisms. With ns_vserver command it is a generalised nsvhr command implemented by Jerry Asher.
ns_url2file_* allows to file and handle directory aliases. It is based on example from old AOLserver C manual and expose TCL interface to it: http://www.tcl.tk/man/aolserver3.0/c-app2.htm
You can map individual url to file with
ns_url2file_map -noinherit url file arg
or alias url prefix to directory with
ns_url2file_map urlprefix dir arg
With ns_url2file_arg url you can retrive the argument.
Of course these command are vserver-aware and accept -vserver switch.
--tkosiak
Here is response from Nathan Folkman appropos my proposal:
Thanks! I'll put it on the Core Team agenda for next week's meeting. This week's meeting is already booked with bug scrubbing. I'll keep you posted.
- Nathan
---------- Forwarded message ---------- Date: Mon, 3 Mar 2003 18:46:15 +0100 (CET) From: Tomasz Kosiak To: Nathan Folkman Subject: vservers
I've got a implementation of virtual host support for AOLserver. When compared with AS 4.x vservers it is complementary approach. It allows to define separate filter/urlspace in one AS 4.x server. It means that tcl code base and conn threads are shared in my approach.
Some time ago I've presented this to Jim Davidson. He has said that he will present it to AOLserver Core Team. I wonder if you reveived my proposal (copy is in attachement).
What do you think about it?
--tkosiak
I. To remove yourself from this list:
Send a message to "[EMAIL PROTECTED]" with the following text in the BODY of your message:
signoff aolserver
II. For a complete list of listserv options please visit:
http://listserv.aol.com/
III. For more AOLserver information please visit:
http://www.aolserver.com/
