Changes

Jump to: navigation, search

Webtools:Scalability

983 bytes added, 07:39, 15 April 2007
no edit summary
Behind the Netscaler is a cluster of 12 webservers (+/- a few at any given time). Most sites are on one or more webservers. When developing code, realize that requests can go to any of the webservers at any time, so it's important to make your code independant of the specific server (use the db for sessions, etc.)
 
* [https://nagios.mozilla.org/graphs/mpt/Systems/webapp_81.html Load graphs] (ldap login) for the webheads are available
* A read-only slave is available, and is generally only a couple seconds (<10) behind the master.
* When doing large batch jobs, or expensive queries that will lock db tables, it's best to use the read-only slave so the master can keep working.
* [https://nagios.mozilla.org/graphs/mpt/Systems/ Load graphs] (ldap login) for the db servers are available
Currently, development is done on standalone virtual machines running all the software (mysql, apache, etc.). Generally, development servers are only available in the VPN.
 
 
* In AMOv3 (remora) we're storing db query results using the query as a key
* [http://en.wikipedia.org/wiki/Memcached Additional Memcache Info]
 
==Profiling==
 
If you're using up a lot of CPU on the web servers, profiling the code is a great way to tell where the bottlenecks are. You should be able to get similar profiles no matter what machine you run on, so the development machines are fine.
 
===[http://xdebug.org/ Xdebug]===
* They provide [http://xdebug.org/docs-profiling.php documentation on using it]
 
===[http://pecl.php.net/package/apd APD]===
* [http://www.linuxjournal.com/article/7213 A good APD walkthrough]
 
I'm adding links to the two most popular php profiling tools because I've had mixed results with both. If one is giving you seg faults, try the other. Both generate files that can be read by [http://kcachegrind.sourceforge.net/cgi-bin/show.cgi KcacheGrind] - a good tool for visualizing the data. Otherwise they both have command line utilities as well.
Confirm, emeritus
1,737
edits

Navigation menu