Apache Server Nears 2.0 148
An Anonymous Coward writes: "The Apache httpd project has released a new beta of their apache 2.0 server (v32)". For those who have not been following the 2.0 development, this is the third beta that has been produced. The new version of Apache sports the new APR API and a new method for filtered I/O, and has been rewritten to make use of a hybrid thread/process model. With Covalent already selling a commercial version of 2.0, hopefully we will see a full release of the open source version in the near future.
Re:And...? (Score:1)
Re:And...? (Score:1)
http://rfc.net/rfc2324.html [rfc.net]
Apache 2.0 is supposed to be multiprotocol, no?
Re:And...? (Score:2)
Wouldn't you agree that it's a good thing to improve Apache's portability?
There's also a lot more to a web server than just serving files straight off the hard drive.
Re:And...? (Score:1)
While the server may be about as efficeient as you can get at serving up static pages, the web today revolves around serving up dynamic content. If the server can serve up PHP or Perl pages faster, more power to it.
--MonMotha
Re:And...? (Score:1)
cached content.. etc all in memory.
Things like this is why servers like aolserver and basically any J2EE(especially Resin) server stomps Apache in the ground as far as dynamic pages are concerned.
High performance PHP (Score:2)
Phillip.
Re:And...? (Score:3, Funny)
Re:And...? (Score:1)
Re:And...? (Score:2)
Re:And...? (Score:1)
-1 Off Topic
There is more to that (Score:4, Informative)
However, it gets complicated when you serve pages that are dynamically generated for various users. You want to be able to pass content of a file through various modules. You can tell that you want the page to go through mod_perl and then through SSL modules. You can also stack any modules in between.
The new version makes it easy.
Of course there is a lot of other things besides the "reading and shooting" files (IPv6, web caching, etc).
Covalent (Score:1, Redundant)
I'd like to know the changes between their version and the 'official' version. It'd be interesting to note which features/bugfixes the Apache Foundation felt was worth waiting for.
Re:Covalent (Score:2)
"With Covalent already selling a commercial version of 2.0, hopefully we will see a full release of the open source version in the near future." -krow
well done
Re:Covalent (Score:1, Offtopic)
Apache 2.0 Threads (Score:3, Interesting)
Apache 2.0 brings some nice and intresting new features that only a multithreaded server can bring, but these are all features already available in tons of other web servers..
Unfortuantly, the programmers working on Apache 2.0 don't know how to write thread safe code. Don't believe me? Go get the source yourself, cuddle up to a posix threading book and pull out a 100% correct threading library. (Like the FreeBSD one.)
Example... DONT USE SLEEP(3) in a multithreaded application!.. but whatever
What I am basically saying is.. I would't get apache 2.0 for production _yet_. Someday Apache 2.0 will be the model for how a stable multithreaded multi-protocol server can be written.
By the way, I normally don't take time out to actually post. But since my moderation and meta moderation privs were removed since i moderated a post I found intresting.. to be intresting. (The great slashdot troll investigation). About 500 people lost their moderation ability at that time. What a nice brave new world.
The advance is. I can now say what I truely feel and not care about karma.. because this place is a joke.
Re:Apache 2.0 Threads (Score:1, Offtopic)
Re:Apache 2.0 Threads (Score:4, Informative)
Re:Apache 2.0 Threads (Score:4, Informative)
I don't think he's talking about sleep being thread-safe. I think he's talking about using sleep rather than a condition variable and a while loop to wait for access to a shared resource. The problem with using sleep is that it's entirely dependent on system load/ speed/ alignment of the moon. Code like that assumes that if it waits a certain amount of time, the resource will be free.
Imagine checking to see if a pool is dry, noticing that it is, coming back later and jumping in without looking. It might be full later, but it's much better to keep looking and not jump until the pool actually has water.
This type of thing is especially hard to debug when you upgrade your hardware and your software mysteriously fails. Suddenly, you're not sleeping long enough to get an exclusive lock on a shared resource.
Re:Apache 2.0 Threads (Score:5, Informative)
When did FreeBSD get 100% compliance?
In addition, ngpth [ibm.com] has been accepted by Linus and they are very close to 100% compliant as well as providing for M:N mapping to scale on multiple processors, and to give programmers choice of kernel or userland threads with standard calls. BSD is great and all, but you guys do way too much chest-pounding.Re:Apache 2.0 Threads (Score:2)
What do you mean about sleep(3) not being thread-safe? I'd like to see more explaination about how you see Apache's code as not thread-safe. You are likely talking out of your arse, and you don't deserve to get moderated to '5'.
Re:Apache 2.0 Threads (Score:1)
Now, those thread libraries are suppost to relink the sleep calls to a thread safe way to accomplish the same thing.. but not all of them do.
Linux never had this problem, because of the _clone system call, which makes threads to be seperate processes that share memory. That isn't necessary a bad thing, but it makes developing threaded applications on Linux a bad idea because non thread safe code will work better on linux than other places.
Re:Apache 2.0 Threads (Score:1)
Re:Apache 2.0 Threads (Score:3, Informative)
Well, generally, when I see something like sleep(3), it means that a thread is waiting for an event to finish.
That notation tells which manual section the name is in, not what parameters if any the function may be called with (many times the name is not a function). In this case, the "sleep" function is in manual section 3. i.e. you run "man 3 sleep".Re:Apache 2.0 Threads (Score:3, Interesting)
FreeBSD's threading it actually supposed to be rather smelly - just ask on freebsd-hackers or so.
This is why Apache 2 on FreeBSD is best off sticking with the prefork MPM. The introduction of KSE's in -current will alleviate this, but that's still heavily in development.
Re:Apache 2.0 Threads (Score:3, Informative)
Re:Apache 2.0 Threads (Score:2)
The real improvements are things like the cool forwarding that allows you to build simple modules that say -- parse an XML with embedded PHP and pass it off to SSI and then XSLT it.
Re:Apache 2.0 Threads (Score:1)
BINGO!
Excellent Work - Worth the wait (Score:5, Insightful)
With the new threading, it should manage to push out pages a lot faster under load, and make better use of the processors. Might have to go download today. Here's a project for those of you bleeding edgers out there. I've yet to manage this one myself:
Apache 2.0 + mod_perl + php4 (with support for MySQL 4.x) + mod_ssl.
I don't think non-CVS PHP4 will handle MySQL 4.x, but perhaps there are others that know how.
Back to topic, way to go guys!!
MySQL? PostgreSQL is better! (Score:3, Funny)
Re:MySQL? PostgreSQL is better! (Score:4, Informative)
I managed to get mod_php + Apache 2b28 coexisting, but it liked to segfault a lot (even when idle) and always ended up eating 100% CPU. I even managed to add Zend 2 (next-gen PHP engine) to the mix, but, well, I haven't seen Apache fall over so much since I got PHP 4.0.0 to generate 50,000 internal errors on a single script.
Re:Excellent Work - Worth the wait (Score:1)
Re:Excellent Work - Worth the wait (Score:2)
Apache2 with php4 was up and running for a little bit, I hit one php page, it worked fine, and I think apache2 segfaulted sometime after that, I might have hit the status page first. Now apache2 won't even start with php4 enabled, no error messages, no nothing, not even turning on debug in the error_log, still no messages. It simply doesn't start. If I disable the php module it starts fine. Oh well, guess I'll stick to apache 1.3.23 for the time being.
Here's a piece of the error_log for anyone intersted:
[Wed Feb 20 13:06:22 2002] [notice] Apache/2.0.32 (Unix) PHP/4.2.0-dev configured -- resuming normal operations
[Wed Feb 20 13:06:45 2002] [error] [client 216.4.165.11] Invalid method in request ***binary junk here
[Wed Feb 20 13:10:59 2002] [notice] Graceful restart requested, doing restart
[Wed Feb 20 13:11:08 2002] [notice] seg fault or similar nasty error detected in the parent process
[Wed Feb 20 13:27:52 2002] [notice] Apache/2.0.32 (Unix) configured -- resuming normal operations
It's not just for break^H^H^H, er, files anymore (Score:4, Informative)
And far from being bloatware, Apache has (at least during 1.*) gotten more modularized over time, making it easier to fine-tune logging, access control, URL rewriting, etc, etc. I don't know squat about 2.x, but I expect good things.
Just the $0.02 of a Perl/Java hacker who uses it extensively...
Apache 2 is going to kick ass (Score:5, Informative)
I've been using Apache 2 on Linux and FreeBSD for about 2 months now (got into it while playing around with Subversion [tigris.org], another project that seems to be making excellent progress), and IMHO it is really going to rock the server world. Some major plusses:
People have been complaining that Apache 2 is slow to come out, but from what I've seen lurking on the mailing list, it's because they want to ensure the quality of this release. They've also been talking about how they want a lot of beta testers, because (<rumor mode on>)they want to release soon, maybe even from 2.0.32. So get out there and beta test it!
---
Have you crashed Windows XP with a simple printf recently? Try it! [zappadoodle.com]
Re:Apache 2 is going to kick ass (Score:1)
Re:Apache 2 is going to kick ass (Score:2, Interesting)
I've been using Apache 2 on Linux and FreeBSD for about 2 months now (...), and IMHO it is really going to rock the server world.
This isn't meant to be a flame, but a genuine complaint of the Apache web server that I haven't seen adequately addressed anywhere. How can Apache claim to be a modern web server if it continues to use an outdated request model? Having a separate process or thread for each request is completely unnecessary. Even for a site with dynamic content, the majority of the requests will be for static content (images). So why use up system resources when not necessary?
A request for static content is essentially just moving data from one file descriptor to a socket, something that sendfile(2) can be used for on operating systems that implement it. If a single system call combined with a select(2) loop can handle the majority of the requests, then why is each request tying up a process or a thread? When reading the Apache mailing lists, you get answers such as "it's too difficult for other programmers to extend the server", "processes or threads don't have to be expensive depending on how the operating system implements them", "everyone is happy with how it works now", and "Apache is meant to be correct first and fast second". None of these address the issue that Apache's request model is flawed, and it will never be high performance until it is corrected.
Additionally, the Zeus Web Server [zeus.com] is well implemented and doesn't suffer from any of the problems that seem to keep Apache from being implemented correctly. It's also better than Apache in every way, ranging from performance to configuration (with the exception of not being open source). Zeus did everything right and built a great web server. Years later, Apache is just now getting their next version into beta, and it seems to be just as fundamentally flawed as the first version. If there is ever an open source web server as high quality as Zeus, then it more than likely won't be Apache.
Re:Apache 2 is going to kick ass (Score:2, Informative)
But if you would stop to think for a while, you would see that no one does that. Nowdays, it's all about dynamic content. And in that case the overhead of using multiple threads is tiny compared to the added benefits of scalability and stability.
It is actually possible to use a kernel-based server like Tux for static content and let Apache take care of the dynamic bits.
Re:Apache 2 is going to kick ass (Score:5, Insightful)
If serving huge amounts (>1 GB/hour)of static content from a single-CPU computer is what your server does, Apache is not for you.
A well designed non blocking server can run in multiple processes, to take advantage of multiple CPU's. Zeus does this.
But if you would stop to think for a while, you would see that no one does that. Nowdays, it's all about dynamic content. And in that case the overhead of using multiple threads is tiny compared to the added benefits of scalability and stability.
That's wrong. As I said, most of your requests will be static content. Take Slashdot, for example. This comment posting page is one perl page, and six images. Do you really need six extra processes for those images? Especially large Apache processes that have mod_perl and who knows what else compiled into them. Sure, the code pages should be shared, but it's still poor design.
It is actually possible to use a kernel-based server like Tux for static content and let Apache take care of the dynamic bits.
Sure you can do that, but wouldn't it be better to use a well designed server in first place, and not have to kludge around design flaws in the web server? Your web server should not be your application server. Your web server should be serving web pages. Your application server should be running applications. The Apache model of "build everything conceivable into the web server process" is a bad idea, and is not consistent with the unix philosophy of doing one thing, and doing it well.
Everyone knows CGI's are bad for performance because it causes forking a separate CGI process for each request. Turning the CGI's into Apache modules solves this problem, but not in an optimal way. Applications do not belong in the web server. A model such as FastCGI is a much better approach. It is similar to CGI, especially in the sense that it is easy to program for. But instead of running the process and using stdin/stdout as with a CGI, it connects to the FastCGI via a socket. Thus the application stays running, and there is no process creation overhead. It keeps any necessary load balancing on the application end where it belongs, and out of the web server.
Additionally, the application doesn't even need to be on the same box. You can have one or several application servers, and a single web server. A web server only needs to handle data. A single box should be able to fill your outbound pipe, or at least around 100mbits of it. If an application is slowing it down, then you need another application server, not another web server. It is unfortunate that the two are not seen as the separate entities that they should be.
Re:Apache 2 is going to kick ass (Score:1)
I doubt that any mod_perl based site is set up in such a way. At a bare miniumum, mod_perl sites have two apache binaries serving pages: one for the static pages, one for the dynamic pages. The static binary is obviously as lightweight as possible. If you're really interested in mod_perl tuning check out the mod_perl guide at perl.apache.org.
Re:Apache 2 is going to kick ass (Score:2)
I doubt that any mod_perl based site is set up in such a way. At a bare miniumum, mod_perl sites have two apache binaries serving pages: one for the static pages, one for the dynamic pages. The static binary is obviously as lightweight as possible. If you're really interested in mod_perl tuning check out the mod_perl guide at perl.apache.org.
Why should you go through all that extra hassle to make up for a design flaw in the web server? Wouldn't it make more sense to use a non blocking web server with a single process per CPU, and have the Perl FastCGI handling the Perl code?
Re:Apache 2 is going to kick ass (Score:1)
What extra hassle? It took me 15 minutes.
As to the why, that's easy: so I can use Mason [masonhq.com], which is IMHO the greatest web development tool since sliced bread.
Re:Apache 2 is going to kick ass (Score:2)
Been there, felt that pain (Score:1)
A second apache also requires a second set of configuration files and virtual servers which have to be maintained and provisioned. It's just a waste of time, although it does reduce the stupid memory requirements somewhat...
Re:Apache 2 is going to kick ass (Score:2)
Then use zeus for static pages, and Apache (an APPLICATION SERVER which happens to talk HTTP and feed static content, conveniently) for dynamic content. Zeus doesn't DO dynamic stuff...
Zeus most certainly does handle dynamic content, and it handles it very well. Zeus supports CGI, FastCGI, NSAPI and ISAPI (basically everything that's not proprietary, like Apache).IIS is still the way to go (Score:1, Funny)
Performance results (Score:5, Informative)
http://webperf.org/a2/v29/Apache2_26-Nov-2001.htm
Love to hear the lowdown on performance advantages of the new Apache from someone in the know or someone who has done some actual testing.
Also, PHP/Apache perl/Apache integration are probably very high on many folks lists, what is the status of those two vis a vis apache?
Re:Performance results (Score:3)
Re:Performance results (Score:1)
But 1.3 seems to bear up great for me at least in those respects, and higher performance means fewer servers is always appealing.
Re:Performance results (Score:1)
Re:Performance results (Score:1)
It is true it isn't a huge performance win, but it is better than 1.3.
Re:Performance results (Score:5, Informative)
1 lower memory footprint.
you can run a a server which normally took 4G of memory in 512M
2. speed
http://webperf.org/a2/v31/2002-02-11-v29/
the page is similiar to the 'NEWS-STORY-NORMAL' column in the old one..
check out the response time in the graphs.. can v1.3 get a 1-1.5 second response time as CPU increases like that ?? doubt it
3. mtmalloc
we found that using mtmalloc with apache 2.0 gave us a performance increase of 30% (yes 30%) by preloading the library
4. v31 has got a different pool allocater, which reduces the mutex contention considerably.
nice to see someone is referenceing my benchmarks
BTW
while your surfing webperf.org.. why not download the agent and run it for a while?
Re:Performance results (Score:2, Informative)
Don't loose your moderator points on AC... (Score:1)
Per-per-gripe whinging? (Score:1)
What's with all the griping about how bloated and bad apache is, then how great IIS is, and how a web server should just read and write?
Is this item being taken over by Microsoft?
Everyone, download it and try it for yourself. It's really cool.
Re:Heh heh. (Score:1)
It was constructive criticism, not a troll. Down to 49 karma, I suppose.
MSI Installer == Spiffy (Score:3, Interesting)
With that said, has anyone tried the MSI for this latest beta? It didn't create the service for me automatically, and I wasn't sure if it was just my crackpipe or if it was an actual problem. Bug report's been filed already, just wanted to see if anyone else had any input...
Re:MSI Installer == Spiffy (Score:3, Informative)
I've just switched to 2.0 a few days ago on win32... so far it's been about the same as 1.3 for me, the only thing I had a problem with is that it doesn't substitute paths for shebang lines in cgi-bin files, so I have to write out full paths (1.3 did). And the conf file from 1.3 doesn't exactly work right away with 2 (which would be nice), I had to tweak it. Otherwise it's great.
Re:MSI Installer == Spiffy (Score:1)
I'm a CS student graduating soon, why is there such a hard time making bosses see the beauty and less hassle of these projects linux/apache/etc compare to the MSWin/IIS choice...I mean, who with the smallest notion on what is good would put up a fight to choose IIS over apache!? Will I have the same wonderful challange?
Why pointy-haired-bosses are a pain (Score:2)
Before you graduate, be sure to catch up on the industry literature [dilbert.com] for valuble insights into how the real world works.
-- MarkusQ
P.S. Pay special attention to what happens to Asok [dilbert.com], and lean how to duck.
try authentication integration for one (Score:2, Insightful)
Re:MSI Installer == Spiffy (Score:2)
So I'm starting to get away with using Linux and *BSD for things that they're better for, and as a result I'm slowly chipping away at the MS-dominant infrastructure we have piece by piece. YMMV, but it seems that the 'notion on what is good' doesn't always click with management.
Much like Linux 1.0 (Score:1)
It keeps getting closer and closer--so amazingly close--but it never seems to actually be final. It gets tweaked and patched and asymptotically approaches 2.0, but doesn't seem to get there.
I'm not bashing the Apache developers, quite the opposite as I am very happy that they are absolutely not releasing it until it is ready--and we all know (I hope) that Linux 1.0 was eventually released. And 2.4. If only some other server apps used were put under such intense scrutiny before release.
Re:Much like Linux 1.0 (Score:3, Funny)
Threading is good (Score:2, Insightful)
The answer to that question is, dynamic transactions often access existing databases, which often have screwed up data models and require insert/updates in multiple tables. Some will run and scream "horror, horror, horror," but now that the .bomb blew up, more and more web developers are finding they have to work with bad, inefficient, poorly documented data models. Having multi-threading in Apache will improve it's scalability.
Better Win32 Performance (Score:1)
kudos.
Re:Better Win32 Performance (Score:1)
"Apache for Windows version 1.3 series is implemented in synchronous calls. This poses an enormous problem for CGI authors, who won't see unbuffered results sent immediately to the browser. This is not the behavior described for CGI in Apache, but it is a side-effect of the Windows port. Apache 2.0 is making progress to implement the expected asynchronous behavior, and we hope to discover that the NT/2000 implementation allows CGI's to behave as documented."
The phrase "we hope discover" bothers me. Are they designing it to work correctly under Win32 or not?
Re:Better Win32 Performance (Score:2)
IBM has it too (Score:1)
Re:IBM has it too (Score:2, Informative)
perchild MPM (Score:5, Interesting)
I've been looking forward to the perchild MPM. It can run different server processes under different UID/GIDs. This is important because mod_{perl,php,python,snake} run in-process with the Apache server. It's the only way to run them securely for different people other than a completely seperate webserver for each person (with its own IP address, configuration file, memory footprint, etc.)
But perchild doesn't really work:
So, Apache 2.0 may be promising in the future...but when a feature I've been looking forward to for a long time is broken, I'm kind of disappointed.
Key developer: "Two-oh won't release 4 months" (Score:1, Troll)
IOW, don't hold your breath waiting for the non-beta release of 2.0.
Re:Key developer: "Two-oh won't release 4 months" (Score:1)
Threads and processes : why? (Score:2)
And Apache still doesn't have any integrated web administration front-end like Zeus.
Re:Threads and processes : why? (Score:3, Informative)
glib? (Score:1)
The website for the APR says this:
The mission of the Apache Portable Runtime (APR) is to provide a free library of C data structures and routines, forming a system portability layer to as many operating systems as possible
What is the difference between this and the glib library which the GNOME programs use? This seems like the same kind of thing. Granted, it does seem to include some extra stuff which glib doesnt have, but still..
Re:glib? (Score:1)
Portable runtime libraries (Score:2, Informative)
You can see an example of a multithreaded web server using a similar portability library on . [xitami.com]
I remember showing this web server and its multithreaded / portability model to the IBM Apache team in December 1999 during the Bazaar at New York. Maybe they got some inspiration from it.
Re:glib? (Score:2)
That being said, there's definately an overlap.
'2.0' is just a number! (Score:1)
Configure Still Doesn't Work (Score:2)
I downloaded 2.0.28 in December and tried to
I posted to the apache-users mailing list in December, and no one responded. I tried again yesterday, with 2.0.32, and it still doesn't work.
Looking through the bug tracking list, I can see that this bug has been filed since November 2001.
How can Apache 2 be nearing release if you still can't get it to install where you want it to?