best option for newLISP-webserver?

Started by HPW, October 03, 2004, 11:24:56 AM

Previous topic - Next topic

HPW

After the discussion on mod_lisp and fast-CGI etc. I am interested in the

best option to run a newLISP enabled web-server under windows.



I have the newLISP httpd example runnig the wiki-example.



But is httpd the right solution when access increase?

(I have not test it. Can it be simulated with another newLISP)

Is apache under windows a serious solution with newLISP-CGI?

Could apache with mod_lisp run newLISP under windows?



Could a load-balancer be done with newLISP to redirect a lot

of traffic to muliple instances of newLISP-httpd running on the

same and/or multiple mashines.



There will come the question: Why windows and not linux?

I am thinking to use some special librarys which I currently

only have on windows! (And of cource I am not fit on linux) ;-(
Hans-Peter

Lutz

#1
In the Linux/UNIX world of course it's Apache, and that is where I have tuned the cgi.lsp file. But cgi.lsp is so small, that it should be easy to adapt it to other platforms. The only platform specific things are really the environment variables. cgi.lsp uses very few of them.



I did a little bit reasearch on mod_lisp and the pointers people posted about FastCGI. It seems to me that mod_lisp from http://www.fractalconcept.com">http://www.fractalconcept.com is perfectly usable with newLISP, but a little newLISP server would have to be written to take requests from mod_lisp, load CGI files written in newLISP etc..



The target would be to develop a newlisp server for mod_lisp, which can handle newLISP CGI files without changes, except for including a different cgi.lsp. This newLISP server would always run and communicate with mod_lisp via sockets and a simple API as described by fractalconcept.com.



If nobody else does it, I will do it, but not at this moment. I am also not sure if I am the right person to do it, as I am not really experienced with high performance web serving enviroments and would not have the possibility to stress test a mod_lisp/newLISP combination.



I believe for normal to medium volume of max a few thousand hits per hour, normal CGI with newLISP and a MS-IIS or Apache server should be completely Ok performance wise. In experiments years ago I could saturate  a T1 line in this mode serving simple static pages, but today that is hardly called 'high performance'.



In HPWs case the first thing to find out, would be the volume you are expecting and what kind of pages yoy are serving (static, db access etc.).



Lutz

HPW

#2
Hello Lutz,



Thanks for the info.



>I am also not sure if I am the right person to do it,



I am sure, that I am not the right person to do it, because my experience are far less on this point. :-(



>I will do it, but not at this moment.



Good to know!



>the volume you are expecting



No idea in the moment. I am thinking of a online-version of an desktop-app, which is currently under development.



>what kind of pages yoy are serving (static, db access etc.).



Could be a mix of static/dynamic HTML and flash content.
Hans-Peter

Lutz

#3
I did a quick test of mod Perl CGI versus simple stdio based newLISP CGI:



http://nuevatec.com/Environment.cgi">http://nuevatec.com/Environment.cgi => 13 ms/page Apache + mod Perl compiled in

http://nuevatec.com/environment.cgi">http://nuevatec.com/environment.cgi => 16 ms/page Apache simple newLISP CGI



I measured this accessing the URL's 100 times in a row



Both scripts are very similar printing a table of the environment strings (but sorted in newLISP version).



So even doing simple stdio based CGI, newLISP is almost as fast as using Apache with a compiled in Perl module.



Lutz

HPW

#4
Thanks for the speed-insights with CGI.



Could you also measure a pure newLISP httpd solution without apache?



And I still ask myself about a newLISP based solution, where newLISP can keep running. Similar to the TK-client.

Then it could load data-tabel once and could hold state-data about a client-session between calls (require session-id etc)



So back to a part of my first question:

Could a load-balancer be done with newLISP to redirect a lot

of traffic to muliple instances of newLISP-httpd running on the

same and/or multiple mashines.



With something like a session-id the balancer have to be able to put the next call to the right process/mashine etc.



Any thoughts?
Hans-Peter

Lutz

#5
>>>

Could you also measure a pure newLISP httpd solution without apache?

>>>

newLISP httpd does about the same speed as apache on a single page, but when doing the same stresstest as in my previous post, then Apache is many times faster because it is a multithreaded webserverr, newLISP httpd is only single threaded and lacks many other things you could want in a production webserver.



>>>

And I still ask myself about a newLISP based solution, where newLISP can keep running.

>>>



This would be a mod_lisp solution as described in my previous post, Apache+mod_lisp would talk to a permanent loaded newLISP(s)



>>>

Could a load-balancer be done with newLISP to redirect a lot

of traffic to muliple instances of newLISP-httpd running on the

same and/or multiple mashines.

>>>



Yes, that could be done. Such a loadbalancer should also be multi-threaded, if not, you just move the bottle-neck from newLISP httpd to the load-balancer. But you would not be able to write a multi-threaded load balancer on Win32. newLISP has threads only on Linux/UNIX. You could program with non-blocking/polling I/O instead, but doing it with threads is easier.



There ar free load balancers on the net. Again, I think you are best off, just  installing Apache, it runs nicely with newLISP CGI, is secure and has all the sepcial features you might suddenly want. It is also available on Win32.



Lutz

HPW

#6
>This would be a mod_lisp solution as described in my previous post,

>Apache+mod_lisp would talk to a permanent loaded newLISP(s)



Is there a solution with permanent running newLISP for the MS Windows Server 2003 possible?



I read here on the forum that some user run MS server with newLISP CGI's,

but is there a option to do this in the mod_lisp way.

(By the way: As far as I know, mod_lisp runs only with apache 1.3.X and not 2.0.X)



Why do I ask again: Taking a look at web-hosting offers, you always get webspace/servers running apache/unix/linux

or intel-boxes running MS Windows Server 2003.
Hans-Peter

Lutz

#7
Probably it's possible but you would have to write the mod_lisp way yourself. But again, what are is your volume, that you really need this. A good multi-threaded webserver together with normal newLISP CGI will handle a lot of volume, almost as fast as mod_perl.



I know that people here on the board do newLISP CGI on Win32 boxes, but I know to little about the IIS environment to really tell. One of the users runs an ISP in OHIO the other one a company internal site in the same state.



On the other side if you run anything MS you will get pulled into .NET and related technologies in the long run. MS just makes it always harder to use anything non-MS. If you go with a Linux or FreeBSD server solution, you have zillions of good free technologies to choose from.



Lutz