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

Freek Van der Herten:
Taking care of backups with Laravel
Sep 19, 2016 @ 14:34:13

Freek Van der Herten has posted a new article to his site covering the backup of your Laravel-based application with a handy package, laravel-backup. He's released a new major version so he wanted to catch you up on some of the features and functionality the package includes and how to use them for your application.

A new major version of laravel-backup was recently tagged. This package can backup files and databases of your Laravel app (or any PHP application really). The backup consists of a zipfile containing a dump of the databases and all files that are selected for backup. The package will copy over the zipfile to external storage such as S3, Dropbox, SFTP, … If something goes wrong during the package can notify you via, amongst others, mail or Slack. In this post I’d like to give some background on why and how it was built.

Keep in mind that there is no one size fits all solution for backups. A small company will probably handle backups in another way than a bigger company. This post has small companies in mind with a couple of developers and no dedicated operations person or team.

He starts off talking about "modern hosting" services and some of the issues that can come with them (downtime being one of the worst). He point out that providers like Linode and DigitalOcean only make periodic backups of your application and restoring from these could mean a lot of data loss - one of the worst things that can happen to an online business. With the laravel-backup package protecting against this kind of failure is easier, letting you automatically back up your site to an off-server source (like S3, Dropbox, or even another local location). He also describes the handling to clean up old backups, sending notifications when problems come up and simple monitoring functionality. He ends the post by mentioning once again that this package is designed for use with small-to-medium sized applications. Larger ones should work up a more robust, possibly external solution that doesn't rely on the application framework for its functionality.

tagged: backup laravel package laravelbackup tutorial downtime

Link: https://murze.be/2016/09/taking-care-of-backups-with-laravel/

Freek Van der Herten:
Zero downtime deployments with Envoy
Nov 23, 2015 @ 16:52:36

In this post to his site Freek Van der Herten shares an Envoy script that can be used to deploy an application to a remote server with (or without I suppose) one key thing: downtime.

Envoy is Laravel’s official task runner. Using a Blade style syntax tasks can be defined that can be run both locally and remotely. At Spatie, we’ve been using Envoy for quite some time to deploy code on production servers. [...] [Our trusty Envoy scriot] had a big downside: the application would be down for close to a minute. This week I took the time to solve that issue.

He talks about the changes he made to their deployment process towards using a symlink-based system as suggested by this guide. The result is an updated script that follows the same flow. He steps through the changes he made to the script and tweaks used to get the best performance out of the deploy process.

tagged: downtime deployment laravel envoy automation symlink update script

Link: https://murze.be/2015/11/zero-downtime-deployments-with-envoy/

Edin Kadribasic's Blog:
PECL4WIN Build Box Dead
Nov 14, 2006 @ 22:38:00

Some unfortunate news from Edin Kadribasic to be felt particularly by the Windows PHP users out there - the box that hosts the PECL packages for Windows has suffered a bit from a power failure.

The power failures are very rare in Denmark, but nonetheless this one managed to take out the build box. The website itself is not affected, but there are no updates for the time being.

The PECL4WIN project hosts a repository of PECL extensions precompiled for the Windows platform. The packaging and distribution system used by PECL is shared with its sister, PEAR.

UPDATE (11.15.2006) - The box is back up and working at 100% again (faulty memory was to blame). A new build has already been created.

tagged: pecl4win box machine power failure downtime update pecl4win box machine power failure downtime update

Link:

Edin Kadribasic's Blog:
PECL4WIN Build Box Dead
Nov 14, 2006 @ 22:38:00

Some unfortunate news from Edin Kadribasic to be felt particularly by the Windows PHP users out there - the box that hosts the PECL packages for Windows has suffered a bit from a power failure.

The power failures are very rare in Denmark, but nonetheless this one managed to take out the build box. The website itself is not affected, but there are no updates for the time being.

The PECL4WIN project hosts a repository of PECL extensions precompiled for the Windows platform. The packaging and distribution system used by PECL is shared with its sister, PEAR.

UPDATE (11.15.2006) - The box is back up and working at 100% again (faulty memory was to blame). A new build has already been created.

tagged: pecl4win box machine power failure downtime update pecl4win box machine power failure downtime update

Link:

Jamroll.co.uk:
Using Lighttpd to Dodge the Digg Effect
Jun 15, 2006 @ 01:25:34

Everyone that knows of the social news site Digg.com knows the problems that being linked on it can cause. Smaller servers get overloaded and pages can either be very slow loading or completely offline within minutes of being "digged". There's a few out there that have come up with different solutions, but several of them involve mirroring the content somewhere else. In this proposal, however, they combine the power of Lightttpd and PHP to handle the loads.

We host a wide variety of sites, covering everything from converting your garage into a living space to video game addictions. Because we are such a small operation, being hit by a link from a big site such as Digg would be both a blessing and a curse.

In order to place our ads on each page, we use PHP's auto_append_file feature to run our advertisement code. By using PHP's other neato function, auto_prepend_file, I can create a small piece of PHP code to detect when the site is being hit by Digg. In this situation, I have chosen to use Lighttpd to handle the increased loads, because of its proven high performance with large numbers of concurrent connections.

In his example code, he shows how you can detect when a user is coming from a digg.com page and take them to a cached version of the page they've requested (with the .cache extension).

tagged: lighttpd digg effect prevent downtime slow cache lighttpd digg effect prevent downtime slow cache

Link:

Jamroll.co.uk:
Using Lighttpd to Dodge the Digg Effect
Jun 15, 2006 @ 01:25:34

Everyone that knows of the social news site Digg.com knows the problems that being linked on it can cause. Smaller servers get overloaded and pages can either be very slow loading or completely offline within minutes of being "digged". There's a few out there that have come up with different solutions, but several of them involve mirroring the content somewhere else. In this proposal, however, they combine the power of Lightttpd and PHP to handle the loads.

We host a wide variety of sites, covering everything from converting your garage into a living space to video game addictions. Because we are such a small operation, being hit by a link from a big site such as Digg would be both a blessing and a curse.

In order to place our ads on each page, we use PHP's auto_append_file feature to run our advertisement code. By using PHP's other neato function, auto_prepend_file, I can create a small piece of PHP code to detect when the site is being hit by Digg. In this situation, I have chosen to use Lighttpd to handle the increased loads, because of its proven high performance with large numbers of concurrent connections.

In his example code, he shows how you can detect when a user is coming from a digg.com page and take them to a cached version of the page they've requested (with the .cache extension).

tagged: lighttpd digg effect prevent downtime slow cache lighttpd digg effect prevent downtime slow cache

Link:


Trending Topics: