Over a million developers have joined DZone.

PHP in the Cloud: PHP Tools for Scalable Apps

DZone's Guide to

PHP in the Cloud: PHP Tools for Scalable Apps

· Cloud Zone ·
Free Resource

Learn how to migrate and modernize stateless applications and run them in a Kubernetes cluster.

Why develop for the cloud? In a word: tons of headaches vanish (scalability, reliability, interface complexity, all of IT). But you don't need to use a PaaS or IaaS in order to kill these headaches, using cloud-like techniques.

All website-serving servers, for example, need to be scalable, simply because they are accessible from the web. (What happens when reddit latches on to your site?)

Precisely for this reason, the PHP ecosystem has engendered a set of awesome scalability tools, designed to give each part of the web-serving infrastructure (storage, database, cache, queues) enough independence that a change in the size of one won't break any of the others

The basic concept is called 'shared-nothing architecture', the infrastructural analogue of modular object-oriented code. And David Coallier -- president of PEAR and co-founder of Orchestra -- is the perfect person to explain it.

In a recent blogpost titled 'Egomaniacal and Scalable Apps' (which I take to mean that good PHP apps don't have boundary issues), David explains:

A system that is tightly linked to its filesystem for file uploads, databases, sessions, &c. is not scalable. Luckily, in the PHP world, we have quite a few tools to help us attain a high degree of selfishness.

He goes on to list, describe, and code-snippify some of his favorites:

  • Memcached
  • Membase
  • Redis
  • SessionHandler
  • Amazon S3

Plus a few more not so directly pluggable-into PHP tools (Gearman, ZeroMQ).

If you're not already using these tools, they could make a big difference in your PHP application reliability and performance. (And if you are already using these tools, you probably can't imagine webserving without them.)

Check out David's full post for more.

Join us in exploring application and infrastructure changes required for running scalable, observable, and portable apps on Kubernetes.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}