Video of this talk from the Velocity Conference 2012: http://www.youtube.com/watch?v=bM0yL0eQ9EM
Large-scale sites are complex systems, where every page is generated with data pulled from multiple back-end data stores and services. Yet, not every piece of data on the page is critical to the user experience. The front-end of your site (i.e. front-end applications, templates, and user interface) needs to be designed to tolerate service outages. We can achieve this by teaching our product design teams about working with an operational mindset, and having our product teams inform our engineering and operations teams about business priorities so that they can anticipate the right patterns to use for fault-tolerance.
2. Interfaces and user experiences
that adapt to technical and
architectural failure
3.
4.
5.
6.
7.
8. /**
* Creates a database connection.
*/
public function __construct($host, $user, $pass, $db) {
parent::__construct($host, $user, $pass, $db);
if (mysqli_connect_error()) {
throw new DBConnection_Exception(
sprintf("Error: %s, %s",
mysqli_connect_errno(),
mysqli_connect_error()));
}
}
9. try {
$conn = new DBConnection('viewsdb.host', 'db_read_user',
'ssssshh!', 'views_db');
} catch (DBConnection_Exception $e) {
// TODO: Someone should figure out what to do if
// we can't connect to the views db.
throw $e;
}