This two-part article shares some of the lessons learned and take you step by step through a standard process of scaling your PHP-MySQL application based on real-world experiences at Digg, TripAdvisor, and other high-traffic sites.
Sites have also learned how to scale to keep pace with demand. Need more bandwidth? Lease a bigger pipe. Need to run faster? Crank up the clock cycles. Need to push more pages? Deploy more Web servers. Yet more servers? Perhaps. If you have cash to burn.
In fact, you can scale a site many ways, and multiplying servers is but one (albeit often practical and necessary) approach. Another technique reallocates existing servers to defuse overwhelming incoming traffic. The kernel of the idea: Why generate a page anew again and again? There are many cases in which a generated page can live for seconds, even longer. The trick is to keep the page handy when the second, third, and 10,000th visitor visits its URL. Here, I combine PHP with smart software called a reverse proxy to cache pages and save servers.
The Xdebug extension for PHP helps you autopsy your application when an error or crash occurs. Learn how to use Xdebug to trace the call stack, analyze memory usage, and comb through the contents of arguments and variables.
A special application called a debugger probes running code, allowing you to suspend execution arbitrarily, examine objects, explore the call stack, and even change the value of a variable on the fly. Learn how to use a debugger to squash bugs in your PHP code.
Learn how to set up and use the universal database connection technique known as Open Database Connectivity in conjunction with the web development language PHP. This is an introductory article for the technologies required to make an open, reliable, and standardized web application — namely, PHP, ODBC, and SQL.
Learn about shared memory and how to use it in web applications as a data storage option, benefiting from high speed, reliability, and data exchange with other applications. The examples provided will show its use to solve common problems in web application development.
With the growth of PHP from a simple scripting language to a full-fledged programming language, there has been a parallel growth in the complexity of the code bases of a typical PHP application. To control support and maintenance of these applications, various testing tools help automate this process. One method, unit testing, allows you to test the code you write directly for correctness. However, often legacy code bases aren't adaptable to this kind of testing. This article looks at strategies for refactoring common problematic PHP code to make it easier to test using popular unit testing tools, while reducing dependencies that improves your code base.
In this tutorial, you take a look at where your service code,your server-side class files, need to be placed on your web server so your Flex application can access them. Because this is application server dependent,refer to the section for your server side-technology—PHP, ColdFusion, or Java.