Request_URI For IIS Updated with ISAPI_Rewrite 3 Support

Request_URI for IIS, NeoSmart Technologies’ compatibility toolkit for IIS on Windows, has been updated to version 1.1, with support for Helicon’s ISAPI_Rewrite 3.x

With this update the installation process has been simplified somewhat, in particular the need modify HTTPD.INI to set the server variables has been eliminated – you just need to install ISAPI_Rewrite 3, configure php.ini to load up request_uri.inc, and you’re set.

Request_URI for Windows 1.1 retains backwards compatibility with ISAPI_Rewrite 2.x for those of you who’d rather not switch to the new (and much-improved) version 3.x.

Continue reading

Facebook’s Staggered Maintenance Procedure

Facebook has one of the world’s largest server farms and for good reason – with all that traffic no amount of servers can be considered too much. While Facebook’s uptime is a lot better than many most of the other “Web 2.0” services, we’ve been seeing a lot of maintenance-related downtime recently (see possible reasons below).

You’ve got to hand it to the Facebook team though, they have scaling and uptime perfected down to an art. For instance, when servers are due for updates, the maintenance is performed in a staggered manner, updating one set of servers at a time as attested to by the unavailability of certain Facebook accounts while others can still be accessed.

If your account is on one of he servers being serviced/maintained/upgraded, you’ll see a message like this:

Continue reading

Weighted Round-Robin DNS Solutions?

The round-robin algorithm is often used as a simple-yet-effective method of distributing requests to a single-point-of-entry to multiple servers in the background. It’s used by DNS servers, peer-to-peer networks, and many other multiple-node clusters/networks.

In a nutshell, round-robin algorithms pair an incoming request to a specific machine by cycling (or, more specifically, circling) through a list of servers capable of handling the request. It’s a common solution to many network load balancing needs, even though it does not result in a perfectly-balanced load distribution, strictly speaking. In the non-ideal world we our servers live in, there are many reasons why the stock round-robin algorithm just isn’t good enough when it comes to properly balancing server loads.

The first and most important thing to keep in mind is that not all servers are created equal. One should be able to take advantage of all available resources, and it’s impossible to guarantee that all the servers available to process incoming requests are capable of dealing with the same load quantities, take as long to carry out each command, and deal with larger/longer queues as elegantly. Nor can all requests be treated the same, either. Some take longer to process than others, involve more work, and are generally more-demanding than the rest – just as others are finished relatively fast and with far-fewer resources.

Continue reading

Server Move Completed – NeoSmart Technologies Fully Optimized!

We’ve been working on moving to a new server all week, and we’ve just finished the transition. Best of all, we’ve switched to the new servers without any downtime in-between. Our new server is a 1.86 GHz Core 2 Duo and with 3GB of DDR2 RAM – all thanks to the awesome guys and gals at Lunarpages, the best host there is.

A lot of work has gone into this transition in hopes of raising the performance – and more importantly, the reliability – of our server. In the past year (since we first started our hosting with LP), we’ve gone from several million hits a month to dozens of millions, and our old server took quite a hit. To that end, we’ve focused on deploying lightweight and highly-optimized code all around; hopefully there will be no more un-expected downtime… ever.

Our current software setup is very complicated, but hopefully it’ll take us all the way to 0.00 minutes of downtime – that’s our goal! We have multiple application servers and programs running in the background each doing what they best – instead of the traditional have-the-web-server-do-it-all way. At the moment, we currently have a software stack comprising of a tightly-knit mesh of these products:

Continue reading

FastCGI for IIS Final Released, Congratulations to the IIS Team!

Congratulations are in order for Microsoft’s IIS development team – today they’ve just announced the public availability of the final version of the IIS-FastCGI ISAPI Extension – a long-awaited and much-improved way of running just about any open-source scripting engine on IIS, safely and quickly.

The Microsoft [[MSFT]] FastCGI module for IIS 5.1, 6, and 7 (with Windows Vista and Server 2008) have been in the works for quite a while now, and we’ve been using them since the first beta release – they’re good. While the biggest benefit will be seen in using FastCGI w/ IIS7 to take advantage of the new kernel-mode caching, it’s still a huge improvement over the old way of running scripting engines for languages like PHP on Windows.

The Problem: Most open-source scripting engines like PHP and Ruby on Rails were initially developed on/for the *nix world. On Unix-based platforms, the easiest way of creating multi-threaded applications is just to run the same app twice or more (The CGI model). On Windows, that doesn’t work out so well, because it takes a lot more resources to create another process. So these engines released Windows-specific single-process multi-threaded engines; the only problem was, they weren’t stable. Too many race conditions in some very non-thread-safe code wreaked havoc on many Windows systems, with the PHP developers themselves giving “Stability on IIS” the lowest level of concern.

Continue reading

eAccelerator PHP Extension Isn’t Thread-Safe…

For all the Windows-bound PHP users out there, consider yourselves warned: even if you’re running the (supposedly) thread-safe PHP Win32 binary redistribution, you’re still susceptible to PHP Access Violation Errors, race problems, heap corruption, and much worse if you use the popular eAccelerator opcode-caching extension.

We did our testing with the binaries compiled by SiteBuddy using the latest versions of both PHP and eAccelerator. Almost immediately after initiating a stress test on our test servers we experienced the dreaded “PHP Access Violation” error – which brings down the entire IIS Worker Process to its heels.

Continue reading

MySQL on the Fritz

Earlier today (according to UTC at any rate), NeoSmart Technologies had a severe MySQL problem. After some very heavy load on our resource-intensive NST Gallery it seems that MySQL just started coughing up bytes, nuts, and bolts. It’s all fixed now though, and we’re sorry for the downtime.

The reason it took so long is that we decided to “seize the moment” to upgrade MySQL to the new 5.1.x series, and unfortuantely, we ran into a bug that has been in the 5.1.x series for a while that stops InnoDB tables from loading up. We tried to go back to the 5.0.x line, but that didn’t work either. It took a long time to get our binary recovery data from MySQL to another server to get a SQL dump of the data, then completely scrub the main NST server clean of all MySQL residue, then restore the SQL dumps.

Hopefully everything is well now, and we’ve put in some safeguards that should prevent or at least minimize this kind of problem in the future. If you notice anything weird still happening, please do let us know. Some of the symptoms included an inability to view Forum posts, crashes when commenting here on The NeoSmart Files, and some problems in the Gallery. Again, our sincerest apologies for the downtime.

20 Hours of Downtime

PHP really sucks. Unbelievably so. On LAMP, it’s awesome. But if you’re on a new, shiny WIMP server, PHP is the pits. PHP stability on IIS is about 1 over a million that on a LAMP server. So we’re sorry. We’re sorry we had a 20 hour outage and couldn’t do anything about because we had no idea it happened. We’re sorry we ever thought we could trust PHP on Windows/IIS for even a minute under virtually no-load without keeping our eyes on it. We’re especially sorry that NeoSmart Technologies, the blog, the forums, the downloads, the whitepapers, and all the resources were unavailable for that long.

Ever since moving to Windows, we’ve had unbelievably great results on MySQL, JSP, and ASP. But with PHP, it’s been nightmare after nightmare to no end. PHP corporation (or whatever it is) is aware of this, though they’re not confessing to any particular bugs nor are they expressing any interest in solving this. We moved to PHP 5.2 in hopes of addressing the stability – according to PHP, that was fixed. What they neglected to mention was a bunch of other bugs that still haunt PHP’s quest for stability on a Windows Server. IIS auto-restarted per our configuration, but the entire server needed a reset to get PHP working again. Ugh!

Anyway, we’re back up now, and we’re looking at some of the alternate PHP engines out there. Nothing is like PHP of course, because “there isn’t a need” for a PHP-compatible PHP replacement (then again, just by the sound of it..) but several Windows-specific “PHP compilers” exist that would take care of the issue. Then again, we could always jump down to PHP 4 – but that’s just scary. At any rate, rest assured, we’re scouring the web and working nonstop looking for a solution to this nonsense.

100% Apache-Compliant REQUEST_URI for IIS and Windows!

Ever since moving NeoSmart Technologies to a Windows server, we’ve had one headache after the other dealing with various PHP scripts that included references to $_SERVER["REQUEST_URI"], and unfortunately, none of the “workarounds” or hacks provided on the internet work. Some of them are for Apache on Windows, and others work most of the time, but break the minute you introduce url rewriting or launch scripts as the default files in a directory.

REQUEST_URI for Windows is a must-install for absolutely anyone that uses IIS & PHP, no matter what software you run. It’s free, it’s one-hundred percent compatible with Apache’s own REQUEST_URI, and best of all, it’s guaranteed to work no matter what. REQUEST_URI for Windows gets whatever the user entered into the address bar – period. Nothing more, nothing less. And of course, you never have to modify a single script to make them work, this does all the work for you.

Continue reading