News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Johannes Schlüter:
Sharding PHP with MySQL Fabric
October 10, 2013 @ 08:30:16

Johannes Schlüter has a new post to his site today showing how to use the MySQL Fabric functionality to do sharding in your PHP application. The MySQL Fabric (recently released) is "an integrated environment for managing a farm of MySQL server supporting high-availability and sharding."

As this release of Fabric put the focus on sharding, this is what I want to show here, too. A general introduction to MySQL Fabric and its sharding features can be found on VN's blog so I'll be quite fast in some areas, for details please refer to the documentation and the mentiond blogs.

He walks you through the installation of the support for Fabric and how to configure it for storage. He then creates some groupings/shards with the "mysqlfabric" command line tool and sets up the sharding rules. Next up is the installation of the mysqlnd_ms extension for PHP and configuring it via a JSON file and in the php.ini. A sample test script is included showing how to create a table, insert a record and pull it back out from the sharded setup.

0 comments voice your opinion now!
sharding mysql fabric tutorial install configure extension

Link: http://schlueters.de/blog/archives/175-Sharding-PHP-with-MySQL-Fabric.html

Derick Rethans:
Read Preferences wth the MongoDB PHP driver
December 20, 2012 @ 13:41:24

Derick Rethans has a new post to his site detailing some of the "read" preferences that you can customize in the latest versions of the MongoClient functionality in the MongoDB PHP extension for replica sets and sharing setups.

Read Preferences are a new Replica Set and Sharding feature implemented by most MongoDB drivers that are supported by 10gen. This functionality requires MongoDB 2.2. In short, Read Preferences allow you to configure from which nodes you prefer the driver reads data from. In a Replica Set environment it is the driver that does the selection of the preferred node, and in a Sharded environment it is the mongos process that routes queries according to the defined Read Preferences.

He starts with a look at the read preference types (like "primary", "secondary" and "nearest") how the connection manager works to handle each type. He includes some code samples showing how to configure your MongoClient connections to use these various types of preferences. He also introduces the concept of "tags" for the replica set - aliases to make them a bit easier to identify when making a connection and how to define them in the connection string.

0 comments voice your opinion now!
mongodb mongoclient read preference replicaset sharding connection tutorial


Brian Swan's Blog:
Using SQL Azure Federations via PHP
January 20, 2012 @ 08:31:46

Brian Swan has a new post to his blog about using Azure Federations in your PHP applications:

In a nutshell, SQL Azure Federations introduces an abstraction layer for the sharding of SQL Azure databases. The value in federations lies in your ability to have elastic scalability of the database layer of your application (to match the elastic scalability of the rest of your application when it's running in the cloud). And, one nice thing about the way federations work is that nearly everything can be done with simple SQL commands. Of course, that means that using SQL Azure Federations via PHP should be easy. So in this post, I'll introduce you to SQL Azure federations by showing you how to use them via PHP.

He uses the SQL Server drivers to make the connection to the Azure instance and, based on his included code, creates a federation and tables inside it. He also shows how to insert data into these tables, split up a federation, insert data after this split and how to query a federation member with the filtering on or off.

0 comments voice your opinion now!
azure federation tutorial windows sharding database


Oracle Technology Network:
Scaling a PHP MySQL Web Application, Part 2
April 12, 2011 @ 13:28:05

On the Oracle Technology Network today, the part two of "Scaling PHP MySQL Web Applications" (from Eli White) has been published. Part one can be found here.

In Part 1 of this article, I explained the basic steps to move your application from a single server to a scalable solution for both PHP and MySQL. While most Web applications will never need to expand beyond the concepts presented in that article, eventually you may find yourself in a situation where the basic steps aren't enough. Here are some more advanced topics on how you might change your setup to support additional throughput, isolate "concerns" better, and take your scalability to the next level.

He starts with a look at database pooling and how it can not only help you on load balancing your application's resources but also in the caching of the requests. Different resources give different cache results and grouping those together makes life simpler (and faster) for your application. He also talks a a bit about sharding - vertical, manual horizontal and application level techniques.

0 comments voice your opinion now!
scaling application mysql database sharding pooling performance



Community Events





Don't see your event here?
Let us know!


api framework list package podcast series opinion voicesoftheelephpant tips release introduction community laravel deployment language bugfix install symfony interview library

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework