PHP Classes

PHP Circuit Breaker class: Test if a service is ready checking status first

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (4 months ago) RSS 2.0 feedNot enough user ratingsTotal: 301 All time: 7,405 This week: 206Up
Version License PHP version Categories
php-circuit-breaker 1.9BSD License5.0PHP 5, Systems administration


This class can test if a service is ready checking status first.

It can keep track of the status of services like databases or remote Web services to determine if they can be accessed normally or they are down for some reason.

The class uses the APC extension to store cached values of the status the services, so applications avoid trying again while the services are down until they are not brought up again.

The class can be configured to try a given number of times until the service being tested is considered to be down.

A timeout period can be configured after which a failed service should get only one more chance to become available.

Innovation Award
PHP Programming Innovation award nominee
May 2013
Number 2

Prize: One subscription to the PDF edition of the PHP Architect magazine
Circuit breaker is method to prevent excessive use of resources that may not be available for some serious reason.

This class provides a PHP implementation of this circuit breaker method.

Manuel Lemos
Picture of Yasir Siddiqui
  Performance   Level  
Name: Yasir Siddiqui is available for providing paid consulting. Contact Yasir Siddiqui .
Classes: 14 packages by
Country: Pakistan Pakistan
Age: 40
All time rank: 3143 in Pakistan Pakistan
Week rank: 94 Up2 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 8x

Winner: 1x


php-circuit-breaker-design-pattern-implementation ================================================= This PHP package implements Circuit Breaker Design Pattern. You can track any service you want. All you need to do is configure all services in Config.php. See example.php to see how it works. For more information on Circuit breaker pattern visit

  Files folder image Files  
File Role Description
Plain text file CircuitBreakerClass.php Class Class source
Accessible without login Plain text file Config.php Conf. Configuration script
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:7,405
This week:206Up