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

DigitalOcean Community Blog:
Horizontally Scaling PHP Applications: A Practical Overview
Apr 24, 2015 @ 18:06:49

On the Digital Ocean blog there's a new post with a "practical overview" of how to effectively scale PHP applications, specifically as it relates to horizontal scaling not vertical.

Shipping a website or application to production has its own challenges, but when it gets the right traction, it’s a great accomplishment. It always feels good to see the visitor numbers going up, doesn’t it? Except, of course, when your traffic increases so much that it crashes your little LAMP stack. [...] But fear not! There are ways to make your PHP application much more reliable and consistent. If the term scalability crossed your mind, you've got the right idea.

The article starts with a brief overview of what scalability is and the main difference between horizontal and vertical scaling (scaling out vs scaling up). They then get into a bit more detail about what horizontal scaling is and how it commonly works in relation to the average PHP application (complete with diagrams). They also talk about some things you can do inside your code to help make things flow a bit more smoothly including decoupling between services and user session/file consistency measures. There's also a bit at the end about load balancing but as that depends a good bit on what technology you're using and the actual load, they just provide an overview and some links to other articles and tutorials with more information.

tagged: scaling application horizontal vertical decouple consistency loadbalance

Link: https://www.digitalocean.com/company/blog/horizontally-scaling-php-applications/

Zend Developer Zone:
MySQLND, MySQL_UH and other goodies available to PHP programmers
Jan 26, 2011 @ 17:16:02

On the Zend Developer Zone today there's a new post from Cal Evans mentioning some goodies that are available to PHP programmers in the world of MySQL.

PHP 5.3 shipped with a new driver for MySQL, mysqlnd or MySQL Native Driver. While one of it's biggest features is that it gives us a mysql driver that is part of PHP so it doesn't suffer from licensing issues that the previous driver did. However, in the redesign, the architecture was changed.

He mentions the mysqlnd_uh that's a part of this new MySQL driver and an interesting article from Ulf Wendel about its use in transparent load balancing and sharding. The article includes code that randomly picks a MySQL server for the script to use.

The article is a bit difficult to read at time but trust me, stick with them because the stuff in there is the stuff you want in your head when you are working on your next application.
tagged: mysqlnd mysqluh nativedriver loadbalance shard mysql tutorial

Link:

The Bakery:
Four New Articles - Load Balancing, Request Info, UUID Behavior & Upload Thumbnails
Jun 08, 2007 @ 14:37:00

The Bakery has four new items posted today including articles looking at load balancing, the Request component and UUID behavior in your CakePHP application.

  • Load Balancing and MySQL Master and Slaves - If you are currently using MySql master/slave replication for load balancing and wish to transport to cakePHP, it really couldn't be easier.
  • Request Information Component - Need more insight into how a controller structures a CakePHP request? This little component will log important information and variables for each request to your application's debug log.
  • Uuid Behavior - I have a requirement to use UUID's as primary keys. I was initially using MySQL triggers to call uuid() on insert but in the end decided a behavior makes more sense. This behavior adds a UUID to the field specified in your models.
  • Improved Upload Behaviour with Thumbnails and Name Correction - This is an improved version of Chris Partridge's upload behaviour (http://bin.cakephp.org/saved/17539). The behaviour is able to generate thumbnails if used for images (JPEG/PNG only).

CakePHP users can check out these and more great articles, tutorials and more on The Bakery.

tagged: cakephp tutorial article upload thumbnail uuid request loadbalance cakephp tutorial article upload thumbnail uuid request loadbalance

Link:

The Bakery:
Four New Articles - Load Balancing, Request Info, UUID Behavior & Upload Thumbnails
Jun 08, 2007 @ 14:37:00

The Bakery has four new items posted today including articles looking at load balancing, the Request component and UUID behavior in your CakePHP application.

  • Load Balancing and MySQL Master and Slaves - If you are currently using MySql master/slave replication for load balancing and wish to transport to cakePHP, it really couldn't be easier.
  • Request Information Component - Need more insight into how a controller structures a CakePHP request? This little component will log important information and variables for each request to your application's debug log.
  • Uuid Behavior - I have a requirement to use UUID's as primary keys. I was initially using MySQL triggers to call uuid() on insert but in the end decided a behavior makes more sense. This behavior adds a UUID to the field specified in your models.
  • Improved Upload Behaviour with Thumbnails and Name Correction - This is an improved version of Chris Partridge's upload behaviour (http://bin.cakephp.org/saved/17539). The behaviour is able to generate thumbnails if used for images (JPEG/PNG only).

CakePHP users can check out these and more great articles, tutorials and more on The Bakery.

tagged: cakephp tutorial article upload thumbnail uuid request loadbalance cakephp tutorial article upload thumbnail uuid request loadbalance

Link:


Trending Topics: