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

Cloudways Blog:
Integrate CloudwaysCDN With Laravel Applications
Oct 30, 2017 @ 15:12:50

The Cloudways blog has a post showing you how to integrate their content delivery network (CDN) with Laravel applications to take some load off of your servers by serving up static content from a fast, remote location.

With the recent release of Laravel 5.5 and Laravel Horizon, the Laravel ecosystem has reached a whole new level of maturity. In effect, Laravel has become a great option for PHP projects. the whole new level.

[...] Cloudways has recently launched a Content Delivery System (CDN) to help the users provide a better UX their Laravel projects. In this article, I will demonstrate the process of implementing Laravel CDN.

With Cloudways account in hand they start by showing how to map a domain and enable the SSL certificate functionality (a requirement). Next they show how to enable the CDN functionality for your domain and get the source URL to use in your application. Next the tutorial moves over to the Laravel side including a custom handler that checks for a CDN configuration. If present, the asset() call returns that URL rather than a local one.

tagged: laravel integration cdn cloudwayscdn application tutorial asset

Link: https://www.cloudways.com/blog/integrate-cdn-in-laravel/

AboutPerformance Blog:
How to Spruce up your Evolved PHP Application - Part 2
Aug 08, 2014 @ 15:57:51

On the About:Performance site today there's a new post (part two in the series, part one is here) about increasing the performance in your PHP application. In this new post he talks about a few other updates that can be made to make your app fly.

In the first part of my blog I covered the data side of the tuning process on my homegrown PHP application Spelix: database issues, caching on both the server and the client. [...] In this part, I will concentrate more on technical topics: network traffic, code caching and session handling.

The post shares helpful tips and code examples showing how to:

  • Reduce Network Traffic
  • Leverage Browser / CDN cache
  • Use Conditional and Non-Conditional Caching
  • Using the HTML5 Application Cache
  • Optimize Session Handling

He does suggest the use of a commercial tool for a more in-depth analysis, but there's nothing here that it's required for. A little poking around in your browser can yield most of the same results.

tagged: application performance tips traffic cdn cache session optimize

Link: http://apmblog.compuware.com/2014/08/06/spruce-evolved-php-application-part-2/

Daniel Cousineau' Blog:
A Lesson in Good Architecture
Jan 31, 2011 @ 17:14:40

In his latest post Daniel Cousineau talks about a good architecture decision (involving the Zend Framework) that allowed his company to stop on a dime and shift CDNs.

Only a few hours before our event and our CDN was failing probably 80% of the SSL handshakes for our requests to publish files. There is no need to name names as it was a difficult and obscure bug to diagnose in an extremely short amount of time. We needed to get it working, our CDN provider wasn’t going to be able to resolve the problem in the extremely short timeframe we required, so the decision was clear: we needed to switch providers for the new content.

Normally such a switch would take quite a while (2 weeks by his estimate) but because of their use of a Zend Framework-based setup and the API libraries that they'd written for it, the switch over was as easy as creating a new FileStore abstraction for the new CDN and changing some configuration settings. Thanks to the implementation of the Adapter pattern, his company was able to make a big change in a matter of minutes, saving them and their content.

So let this be a lesson to us all. Abstraction and design patterns sometimes feel like an "enterprisey overcomplication" but they aren't there for everyday needs. [...] So suck it up, use them, and thank yourself when you find yourself in such a situation.
tagged: designpattern zendframework api cdn architecture

Link:

Brandon Savage's Blog:
Scaling Up: Picking The Right Setup
Mar 31, 2009 @ 12:52:15

Brandon Savage has a few recommendations when it comes to taking your application to the next level - scaling it up to meet the needs of the masses using your application every day.

The modern age has brought us lots of new ways to take a growing site and scale it. From Amazon Web Services to cloud computing and grid computing, to Mosso and Akamai, there are lots of options we should consider. This article won't make a recommendation as to which you should pick; it will simply discuss what each service has to offer and leave it up to you.

He suggests four different alternatives to pick from when making the move up - the old standby of purchasing more hardware, making use of the Amazone Web Services, using a "cloud" like Mosso or implementing a Content Delivery Network to lighten the load and spread it out across a wider range of servers.

tagged: scaling options amazonewebservices aws mosso cloud cdn hardware

Link:


Trending Topics: