Microsoft Releases IIS FastCGI Module
Marcy writes "Microsoft has just announced the final release of the IIS FastCGI module for IIS 5.1 (XP), 6 (2003), and 7 (2008). This FastCGI module was built with collaboration from Zend, the creators of PHP, and is intended to solve the CGI on Windows problem." It's free as in beer.
What's wrong with apache?
One thing I've been keeping an eye on is WPHP. It's only alpha-quality at the moment, but it's basically a WSGI application (WSGI is the standard Python web application interface) with a FastCGI backend that runs PHP. With something like this, you can mix and match PHP and Python — for example, you could write an authentication handler in Python and link it to a legacy PHP application.
Bogtha Bogtha Bogtha
"Forking" (launching) a process is much more expensive on Windows than it is on Linux. Windows NT is architected after VMS (in part because of Dave Cutler). Processes are expensive on windows.
The game.
so you're paying out the nose, ears, ass for Windows and MS IIS and you care about free fastCGI?
And IMO, it may be free as in beer but it's poisoned beer by virtue of where it plays.
LoB
"Anyone who stands out in the middle of a road looks like roadkill to me." --Linus
Can somebody who speaks Web-Gobbledygook translate for us surface-dwellers?
Why use IIS - just install WAMP (windows,Apache,MySQL,PHP).
If it tastes bad, there are always other beers. Unfortunatly, I can't brew my own beer. Nobody I know is good enough at it either. Ans I won't want to taste a beer brewwed by a thousand hands, thank you very much.
It's time to realise that Abble's products are the biggest abomination these days. Just say NO to the dumb iAbble way!!
Sure we can do that, but first you need to tell us more about this horrible rumor about this evil daystar that burns us vamp... I mean us technical type folk who dare venture out in the daytime.
I only look human.
My mother is a halfling and my dad is an ogre, so that makes me an Ogreling
Since when did Zend "create" PHP?
Well put.
Even as a often-self-brewer, there is something to be said for "it exists and works well, or at least well enough". It is often nice to not have to go through the effort of making it yourself (or improving it to your needs).
34486853790
Connection too slow for X forwarding? Try "ssh -CX user@host"
ah php, the unholy merger of c/c++, perl and java.
...and that is all I have to say about that.
http://jessta.id.au
Its kind of a fallacy that 'forking' processes on Windows is significantly more expensive than forking them on Linux. I think it is somewhat more expensive, but that doesn't alter the fact that forking processes on linux is still expensive in the first place.
So, we needed ways to make things go faster - mod_php for example, that ran php scripts inside an apache process, but you still had to fork the apache process for each web request because of many thread-safety issues in php modules. This was also a security problem because every php script ran as the apache user. So the next idea was to start an apache process for each client and re-use it until that client disconnected (and stayed disconnected). This is the fastCGI approach.
With windows, you had 2 ways of running PHP scipts: as a CGI application (slow due to new processes all the time), and as an ISAPI (think of this as the equivalent of mod_php) module. The ISAPI one worked but you had the thread-safety issues of PHP to contend with (just like on Apache 2 that doesn't spawn worker processes).
In summary: nothing much to see, someone's just released fastCGI for IIS now so you have the same configuration options for IIS as you have for Apache.
I think it is somewhat more expensive...
It's a lot more expensive. Some numbers MSR came up with while working on their research OS Singularity put process creation on Linux at ~700,000 cycles, just over 1 million on FreeBSD, and just under 5.4 million cycles on XP. Here's one source; slide 23.
I'm not arguing against your main point; I'm just pointing out that there is actually a huge difference between process creation time on the different systems.
Over on Linux, my perception is that FastCGI enjoyed a brief reawakening as it was (for a while) _the_ way to deploy Ruby on Rails apps with Apache. But now that seems to have changed to over to using Apache + mod_proxy_balancer + Mongrel.
One nice thing about mod_proxy_balancer is that it's easy to distribute the Mongrels across a couple of machines... and Apache will take them out of the loop if the machine goes down or they become unresponsive or whatever. Works for us, anyhow....
The Army reading list
Because, sometimes, you also have to run 3rd party, non-free software... that was written to require IIS.
Ha ha! Very good! Now, let me know when 802.11 wireless works in fucking linux without having to move heaven and earth.
Also, kill yourself.
Zend gives aid and comfort to the enemy.
Methinks it's all over but the funeral for FOSS.
Windows doesn't even support forking. You can start new processes, but forking the existing process is impossible. Even things like Cygwin only emulate it with threads.
You're talking about a flaw in a apache's security model there, not PHPs. Apache runs as a single user. When it runs PHP as a module, then PHP runs as a single user. Same with Perl, or Ruby, or anything else that relies on a module interface as far as I know. If you use FastCGI (which this article is about, you may have noticed) then you can get it to suexec to a different user when it makes the CGI process, and you don't have the security problem you're whining about.
The bit about PHP admin scripts is application specific - nobody's forcing the authors to do it that way, and you can do the same with any other language. PHP has had it's flaws (register_globals and magic_quotes still give me the shivers), but if you're going to bitch about it, at least educate yourself first.
Just because you're paranoid doesn't mean there isn't an invisible demon about to eat your face
How exactly does this help open source?
Copyright infringement is "piracy" in the same way DRM is "consumer rape"
When? A few years ago...
Why don't you try Mandriva 2008? It has wizards for everything - ideal for the pointy-clicky masses.
Excuse me, but please get off my Pennisetum Clandestinum, eh!
I know in my case, when I administrate IIS, I use both the GUI and the text file.
Because you, like me, spent the time to actually learn how to properly run IIS.
Most complaints about point and click seem to be done by people who never bother to learn the other methods.
"architected" is not a word, since "architect" is not a verb
A. You're wrong. English is a living language. Any word that people understand as a verb is a verb. You understood what was written, therefore you are lying.
B. Your conclusion ("architected" is not a word) does not automatically follow from your premise (since "architect" is not a verb). Your logic is not logical.
C. Any grammer nazi who does not capitalize the first word in a sentence is a hypocrite.
D. Any grammar nazi who does not end sentences with a period is a hypocrite.
E. Any grammar nazi who complains that the "nazi" in "grammar nazi" should be capitalized does not understand how words can be used in a generic sense and thus no longer be proper names.
F. Grammar nazis suck.
Infuriate left and right
Sorry, but that's bollocks.
Cygwin fork() does create a new process. It calls CreateProcess() and then copies the current process into the new one. See the relevant Cygwin API FAQ for a full explanation.
Why doesn't the gene pool have a life guard?
Doh. the relevant API FAQ.
Why doesn't the gene pool have a life guard?
There are new updates / patches / versions of PHP coming out all the time. How is that going to work with this new FastCGI? Is Microsoft really going to take the time to continually update it? Or is Zend going to get screwed into doing all of the update work themselves? If you *do* end up deciding to use this who the heck do you contact regarding support issues? I read the "article" (press release really) and didn't see any of these questions answered. It seems to me that anyone that's actually serious about using PHP for any sort of reasonably useful app will want to know the answers.
You are using English. Please learn the difference between loose and lose; they're, there, and their; your and you're.
A. There is a difference between spoken and written language. Spoken language can indeed mutate as we go along; written language changes by (written) decree. This is what the 'living language' apologists usually forget.
B. - F. The rest of your points have no real bearing to the point at hand.
Religion is what happens when nature strikes and groupthink goes wrong.
Is it the same on Win2k3 Server?
This is a web forum. Formal language rules need not apply. It's like speaking with characters.
I have nothing to say.
Score 1 for this. I wonder is anyone else out there using (Windows, IIS, MySQL, PHP5) in production servers? It's a little unorthodoxed but Me knows Windoze. Also, I hear about all the licensing issues and costs associated with running windows over linux and etc., and I'm wondering what about when you rent from a hosting provider who has to worry about the licensing costs and all that jazz and all you have to do is admin and deploy your applications. Granted if the business gets serious you'll likely want to start hosting your own dedicated servers, but I also figure since there are so many linux web/database server deployments out there the transition should be minimally painful. Adding this fastCGI enhancement should make that even easier. We'll see if we get there.
You do realize that you're going to be awfully thirsty, considering that rather contradictory statement? ;)
Quo usque tandem abutere, Nimbus, patientia nostra?
I don't know where you get such a laughable idea, that written language changes by written decree. If that were the case, we'd get new slang from the written dictionary which would come from written articles, not the other way round. Written and spoken language drive each other. Language is language. Spoken or written makes no difference as to how it evolves.
Infuriate left and right
Probably higher, considering the layers of security checks and "reducing the threat surface" whatnot which MSFT applied to IIS for Windows 2003 Server.
Quo usque tandem abutere, Nimbus, patientia nostra?
Congrats, Microsoft, you came in late for about a FULL DECADE and STILL people buy your crap. No matter how unethical is the fact that your "web" thing never did anything other than crash for no reason, spawn windows when anyone hit the webserver, and eat away all resources; people do bow unto you, take your crap and PAY FOR IT.
I can understand Microsoft very well. What ill never understand is its fanbois.
NO SIG
The Apache.org download page.
-- and --
The Win32 binary download mirror.
Just as "free" as Apache for Linux/UNIX...
I didn't realise it was that larger, but CPU cycles doesn't tell the whole story. On a 1.8Ghz CPU, that's... 0.03 seconds on Windows.
Still, if only PHP could fix their threading issues in their modules, it'd make sense to run scripts in worker threads (using Apache 2, of course) and Linux webservers would appear to run faster.
Win32 doesn't support forking, but the NT kernel does. For that matter, by far most of the expense of starting a Win32 process on Windows is due to Win32 subsystem overhead, including compatibility database lookups, not the kernel. SFU processes (that belong to the POSIX subsystem) and native processes (that belong to no subsystem) are MUCH cheaper, and incidentally support true kernel level copy-on-write fork.
Cygwin doesn't use the kernel's fork support because Cygwin is built upon on Win32. SFU can because it runs parallel to Win32.
Natural != (nontoxic || beneficial)
And if you have, say, 100 visitors at the same time? That's 3 seconds just to start the processes, much less actually run anything. It's multiplicative ;)
My blog. Good stuff (when I remember to update it). Read it.
>>WAMP still beats them anyway.
.NET 2.0 web services under WAMP?
.NET web services are just too good to ignore when designing big, complex web/intranet applications (not some Mom & Pop shopping cart).
.NET 2.0 web services like IIS can, then I'd be sold.
So how can I run all my lovely
I use LAMP/WAMP plenty and often, but
If Apache under Windows could offer
Before anyone tells me to write my web services using some lame Java technology - JUST DON'T!!!!
FastCGI is a good idea that's underutilized, underdocumented, and undermaintained. It's straightforward enough; the web server launches a subprocess, as with CGI, to handle the transaction. But instead of running it only once, the transaction process can be reused to process additional transactions. The web server and transaction process communicate via interprocess communication over local sockets. If the transaction process crashes, the server starts another one. Multiple transactions processes can be run simultaneously.
This is the obvious way to do transactions. Yet it's much more common to build the transaction program into Apache's address space, with mod_php, mod_perl, mod_python, etc. This leads to security and reliability problems; you're trusting the interpreter and all its libraries. This is a real problem in shared hosting environments. Also, if there's a memory leak, eventually Apache will choke. With FastCGI, the transaction programs have a finite life; they're usually terminated and reloaded every N transactions or N minutes, to flush them out and get a clean copy.
The problem seems to be that the Apache support organization dropped support for fast CGI when its developer fell behind the Apache distros some years back. A later version, mod_fcgi, comes from China, and has almost no documentation in any language.
I've used mod_fcgi to run Python. It took several days to get the first program running, because the documentation is sparse and mod_fcgi doesn't produce useful error messages in the Apache log. There's also no mechanism to find out what mod_fcgi is doing, and the transaction parameters are configurable only on a per-server basis, rather than on a per-transaction basis.
That sort of thing is probably why it doesn't get used much. This could be fixed with a few weeks of work, if anybody cared. The basic idea and code are sound. Now that Microsoft is in the game, the open source world needs to play catch-up here.
There's absolutely nothing wrong with text file configuration.
I call BS. There's plenty wrong with text file configuration. One example is the free form syntax that you have to learn for every piece of software. It is rarely consistent and sometimes there are options are not even documented.
Another annoying issue is how many config files there are. For some pieces of software it is all piled into one configuration file, for others it is separated into multiple files scattered in different places. Sure, to some degree it is up to the distro to determine how they want to organized everything, but half the time I find myself trying to hunt down a config file in some awkward place in /etc.
Also there is no feedback to you if you did something wrong until you try to start the software. Even then, it is up to the software to determine if the error was truly an error and whether or not to tell you about it. For example if I have a config file that has the line Option="off" and I happen to want to change it to Option="on" but fat finger it to Option="om" when will I find out that I've made a mistake? Lucky for me I can touch type so I can read what I'm typing on the screen. But I've seen many people glance down at the keyboard, type what they want, and move on without knowing that they've made a mistake. Just read Slashdot to find a good percentage of the geek population making these errors.
How many times have you blown up your X configuration and got tired of restarting X to fix it?
Don't get me wrong, I understand that there are many good points to text config files and in some cases I would prefer it to a GUI. But to say there's absolutely nothing wrong with it is stupid. You also cannot ignore the benefits of GUI configuration (preventing "wrong" options from being chosen, providing some documentation right next to the configuration option, very little learning curve, etc). Text file configuration has its advantages and disadvantages. GUI configuration has its advantages and disadvantages. I think we can still do better than both. But if everyone just sits around and thinks to himself "text is better than GUI" or "GUI is better than text" then we get no innovation.
One really simple solution is simply to provide both interfaces! For example I see no reason Apache can't start itself with a default configuration just for apache configuration purposes. It would tell the user to browse to localhost:888 where the user is presented with a web interface. Now we have a simple graphical html forms interface for configuring apache. Once the configuration is complete, the settings would be saved in a valid httpd.conf or whatever it was file and when the user does /etc/init.d/httpd start everything works. If you still felt you wanted to edit the config file by hand, you could still do it. If you wanted to archive the config file you could still do it. Also, most web browsers (even lynx) have a "search" feature built-in to the browser. So voila, searchable GUI interface!
I didn't do the comparison, m'kay?
Besides, XP and Server 2003 have the same architecture and use almost the same kernel. Server 2003 could start processes four times faster than XP (what I suspect is a very liberal assumption) and it would still be almost twice as slow as Linux.
This is why THREADS are in use on Windows so much, vs. forking an ENTIRELY NEW PROCESS, from the parent one. Thread uaage costs much less than forking an entirely diff. worker process (child) off the parent process.
fork the apache process for each web request
Wait... under apache mod_php you don't reuse the forked child to handle mutliple requests? I assumed you did because that's what mod_perl does.
Crazy, if I'm understanding correctly!
1) IIS need not be restarted to apply changed settings.
2) IIS's cofiguration is stored in a XML file, which can be edited by hand.
I don't always use unix-like operating systems; but when I do, I prefer FreeBSD.
You don't "write web services" using .NET or Java or what ever. You IMPLEMENT them. You write web services using WSDL and XML.
That's the whole point of them.
A. You're wrong. English is a living language. Any word that people understand as a verb is a verb. You understood what was written, therefore you are lying. who knew that George Bush posted on Slashdot?
I was dumbing it down a little for easier understanding. In Apache, using mod_php (like mod_perl too), you fork a heap of processes and reuse them. But you only ever have 1 client running on each process. In apache 2 (not in worker MPM mode) I believe you'd run the php sessions in a single process.
Windows NT is archityped? architectured? ... how about "was built?"
But you have nothing to back up your guess at all, do you? Much of reducing the threat surface had to do with disabling features by default, not adding more security checks. IIS 7 may be another story though.. but IIS 6 I seriously doubt.
Ah well, at least you got a +3 for posting something as a statement even if you can't back it up.
In either case, don't complain to me - complain to Microsoft's marketing department, who went well out of their way to push that perception back when Windows Server 2003 launched (well, it came in second - right after the bazillion demonstrations showing how easy they made it to migrate for all the holdouts still using Windows NT 4.0).
Quo usque tandem abutere, Nimbus, patientia nostra?
Impressive, jokes are now modded as "troll". Could you folks not figure that one out?
Do you have ESP?
Exactly. Unix is built around the process model, where forking is common. People do things with the command line a ton, piping output between programs, so process creation time is more important there than under a typical Windows workload, where programs tend to do more. (I'm not trying to place a value judgment on this; each approach has advantages and disadvantages. I tend to think that the Unix approach is better for command line manipulation, and the Windows approach of monolithic processes are better if you're using a GUI.) This means that different tasks are more tightly bound on Windows than they are on Unix, and a shared-memory approach is perhaps more natural for such things if the interaction is higher.
I would have been very interested to see the Windows thread creation time on there as well. I thought the same thing when I first saw the numbers.
Conversely, the reason people first chose to write in English was very deliberately to use the current language of the common people, and that has by and large continued to be a goal, so English writing has always been more likely to conform to the usage of the day than to any literary standard. Read any great author and you will, I strongly suspect, find that their writing is sprinkled with usages that grammar nazis deplore; there are whole books dedicated to pointing out "mistakes" made by great authors.
It is very important not to create a false dichotomy here, by the way. The fact that language is living and evolving does not mean that it does not have rules, and it does not mean that there's no such thing as a grammatical mistake. It merely means that the rules that were true 10 years ago may not be true today, and that the rules that grammar nazis hold dear (particularly regarding things like sentence-final prepositions, sentence-initial conjuncitons, split infinitives, and so forth) are likely to be arbitrary constructs that do not bear any relation to the language as spoken and written by real people.
believe me, you wouldnt be able to find a host with windows and php and any other meshup. you would need to REALLY look hard for it.
almost ALL of the shared hosting is being done out of linux boxes, and mysql and php are a given on them.
check the hub to get to know whats going on with the hosting scene better : www.webhostingtalk.com
just our own box hosts more than 350 accounts on linux/apache/mysql/php, many community sites, and around 60 of it are 1000-2000 product strong big estores on oscommerce/creloaded.
microsoft is archaic, not late on this one.
Read radical news here
when they notice that the millions of (around 40 million) small to medium web hosting providers will be rather irritated that they are making love to microsoft than supporting their products on the linux/apache/mysql/php hosting scene. that scene is what made zend what it is, and boy i wouldnt ever dream of going at odds with it if i was any executive at zend.
Read radical news here
Read radical news here
basically what they did is to take a 10 year old technology to run cgi scripts faster, and integrate it to IIs.
cgi scripts are behind the web page you are seeing as of now, running the go-between between the database and your interface, and processing your inputs and database info at the same time. so its something major.
but as said what they did is 10 years old, nobody needs or uses it anymore. so its rather "gook"
Read radical news here
Forking has gotten a lot cheaper in Linux since we originally sought out better ways to demand more from our webs servers. It's still probably not the ideal way to do high-load stuff but it's improved.
Why anyone would use Windows for a web server I can't really imagine. Linux or BSD is cheaper, easier, more flexibile, more reliable, more secure, and runs faster with less overhead. I hate when I need to develop for, or admin, IIS-based web servers because they are such poor systems.
At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
No, if you think it's lame you ignore it and move on. I seem to have picked up a "friend" or two who follow me around and hit troll on about half my postings.
Do you have ESP?
Okay, he uses the .Net framework to create web-service functionality.. which is far nicer than *ANY* comparative option I've seen... Then again, I (heart) ASP.Net, but have worked with other web technology platforms.
Michael J. Ryan - tracker1.info
Isn't it just the recurrent WINDOWS PROBLEM?
If you read the cygwin mailing list archives (http://sourceware.org/ml/cygwin/2002-04/msg01071.html) it looks like you can on Windows NT/XP. However, it doesn't sound like they went through the trouble to figure out why their implementation was actually slower because it wasn't compatible with Win95.
FYI, there are just "Web services". Whether it's .NET or Java (or Python, or C++ ...) implementation under the hood, it doesn't matter - that's kinda the point of Web services. And it's just as easy to write a Web service in Java as it is in .NET.
I didn't mean to hurt your feelings or anything - There's a good reason why I qualified it as "probably" as opposed to "definitely".
/. modding up any crap someone tosses out on /. as it if were true. Bash MS, you get karma it seems, regardless of facts.
Didn't hurt my feelings; even probably implies that you have good reason to believe something. Good reason, not "well this is how I view things." I'm just sick of
If such follies as UAC in Vista is any indication (and that's just the tip of one very bloated iceberg), it's a pretty solid bet that MSFT simply tacked on more cycle-eating code to prevent break-ins.
And this has exactly what to do with Win2003 server? I can see you haven't actually used the product, so perhaps you should not comment on it with speculation. The OP posted some benchmarks at least. I at least work with Server 2003 everyday. Did you even check out the Server 2008 beta to see if this "safe bet" is as safe as you think?
In either case, don't complain to me - complain to Microsoft's marketing department, who went well out of their way to push that perception back when Windows Server 2003 launched (well, it came in second - right after the bazillion demonstrations showing how easy they made it to migrate for all the holdouts still using Windows NT 4.0).
Don't blame you for throwing out some statement for which you really have no basis in fact? I requested fact, you came back with your bias perceptions. Ya, I think I can blame you for that.
Good point. Too many people think of web servers as if they're only serving their mommy's baby photos. Starting/forking procs on *busy* web servers is a major issue and can kill a server. Ask anyone who hosts more than his mommy's baby photos.
They already have IIS, and it takes 5 minutes to set it up. The cost of time alone on setting up a new box to run something else...
For your customers IIS is great. Really. Except they probably bought one of those low-end crippleware Windows Server versions. They'll probably never need the features on these low-end versions. You're successful, so everyone wins.
But, when the win32 consulting cash starts running dry, you'll could add Linux or possibly BSD to your business. So, start now by grabbing Debian and get a feel for it. That way you'll be prepared for what's coming and the more experienced Linux admins like me won't eat your lunch.
http://www.maxineudall.com/2010/02/should-economists-be-sued-for-malpractice.html