Some day or other, every PHP programmer is faced with the performance issue caused by a script with a huge loop. If one its operation takes a lot of time and there are thousands of such iterations, then the threat of script execution time lack is more than real. One of the options is to bypass the problem with CRON tool: schedule to execute CRON…
Category: AWS
Automating RDS scaling using HAProxy with AWS SDK for PHP
This article is a sequel of Automating EC2 scaling using on-demand and spot instances with AWS SDK for PHP. The system we described there is not perfect for using it as a platform for web application: several EC2 instances are launched from the same AMI but each instance has its own database isolated from others. Here we’re going to use the already existing system and…
Automating EC2 scaling using on-demand and spot instances with AWS SDK for PHP
One of the Amazon Web Services features is to run and manage virtual servers provided by Amazon Elastic Compute Cloud (Amazon EC2). This service covers most use cases, including the case when your project needs additional resources: then you can simply scale your system capacity with new instances and remove them when they aren’t needed any more. One more great feature of AWS is its…
Creating Amazon CloudFront distribution with S3 storage backend
We’re always trying to reduce the number of HTTP queries to our servers, hence trying to utilize various CDN solutions. One of these is Amazon CloudFront which is a part of AWS infrastructure. In this article we are going to upload all our static content, such as JS, CSS files, images, to Amazon S3, create a CloudFront distribution and point it to the S3 bucket…
AWS EC2: how to attach your root volume to another instance
It happens sometimes with an AWS EC2 instance that you made a mistake in network configuration or just your instance is inaccessible via SSH for some other reason. In this case the recommended solution is attaching your root volume of your instance to another one (most likely micro instance – who wants to pay more?) and editing the files on it. Below you can find…