Platform as a Service (PaaS) is a cloud computing delivery model which enables companies to focus on business and development, leaving infrastructure management, life cycle management, etc. to service providers. Customers need not worry about installation and configuration of their environment, or its management and monitoring. Working with PaaS is also inherently agile.
Platform services like Heroku and AppEngine have been well-known for the last few years and many companies have been using them successfully in their business. They are more attractive to startups, due to low initial cost and smaller headaches involved in setup. 2011 was a great year for platform services, with the emergence of many platform services and a new trend for supporting multiple languages instead of supporting a single language. In fact, having support of multiple (but specific) languages will become a necessity for any Platform service. Companies such as Xeround go a little beyond this, and provide explicit support of Databases (Database as a Service or DBaaS). Here, I will go through two of the PHP platform services I have experimented with: PHPFog and Pagoda Box.
PHPFog are one of the leading services in the PHP platform landscape. They were founded in August 2010 and went public in May 2011, the first player in the PHP PaaS market to do so. They have provided a decent service since they started, and offer a free six month plan with 100 MB storage and 15GB bandwidth. You can have up to three applications running under this free plan. Their paid-for plans start from $29 per month. PHPFog have added support for many other languages, including Ruby, Java, Nodejs, and more, through the AppFog platform. As a key contributor to the CloudFoundry ecosystem, they are looking forward to becoming a key player in the Platform service sector with multiple language support.
One of the cool feature of PHPFog is the support for one-click installation for many applications, such as WordPress, SugarCRM, and frameworks such as Zend, and CodeIgniter. This lets us easily create and launch applications within minutes. Pointing to a domain is also made very easy – simply give the domain name in the app dashboard and point a CNAME to the app. PHPFog uses Varnish in the cache layer and Nginx as load-balancer, which ensures very low response time. PHPFog is also an excellent resource center, from which you can get information about almost anything.
Although they are providing great services and features, there are some limitations as well, in the areas listed below.
PHPFog only give git access to the application. Although this is enough for deployment, you won’t be able to connect through SSH or FTP. Though this is OK in many cases, it restricts you from creating cronjob and many other server side features.
Currently, PHPFog don’t support auto-scaling. Apparently they are working on it and say they’ll be adding it shortly.
PHPFog don’t provide monitoring tools by default, but they’re tightly integrated with New Relic who provide world-wide monitoring and alerting. PHPFog give a free bronze account on New Relic to all paying customers on paid-for plans.
For caching, PHPFog basically use Varnish Cache, which can be controlled by setting appropriate headers. If you need to have memcached, you need to set it up in AWS’ Eastern region. PHPFog recommends using Eastern region for minimizing the data transfer delay. If you set up Memcache in another region, it will increase the wait time substantially.
PHPFog currently provide a shared database only, using popular web-based management tool PHPMyAdmin. If you need to have dedicated databases, you can set them up in RDS and use them for your application.
Pagoda Box is another player in PHP platform services, which went public very recently. Unlike most of the Platform services, they’re built on top of the SoftLayer cloud infrastructure.
Pagoda Box offer a free account with 200mb RAM for free. You need to pay only when you need additional resources. They also provide a free 10MB MySQL cloud database. When compared with PHPFog’s ‘Silver Cloud’, with 610 MB ram and 2 burst ECUs, this is a bit costly.
One of the most attractive looking features of Pagoda Box is the dashboard analytics. You can see the details of requests processed, average time taken for requests, etc., but the feature was not functioning when I wrote this article.
Pagoda Box also use git for deployments. To deploy your latest changes, all you need to do is push the changes to Pagoda Box. You can switch between branches and deploy any commits from the dashboard – it’s a really cool and useful feature. Application configurations are stored in ‘Boxfiles’, located at the base of git repo. When you deploy an application it will read the Boxfiles and make necessary changes.
For scaling a Pagoda Box app, you can add more resources from the dashboard. You can add more instances and workers, increase the RAM (which is not there in AWS), and so on. Pagoda Box provides writable storage shared among the instances to keep sessions and logs.
You can create databases from the dashboard. As mentioned, you get a 10MB RAM database server free with an App, but this is absolutely insufficient. You’ll have to increase the RAM for running applications in production. Managing databases is done by creating a tunnel from your local machine then connecting to it using any MySQL client.
Pagoda Box currently supports memcached and will be adding redis soon. Since I haven’t been able to check this feature yet, I can’t say how effective it is.
There are many other services such as DotCloud, Red Hat OpenShift, Zend phpcloud, and Orchestra.io, that can be discussed here, but I feel that these two are particularly comparable and both are publicly available now. Comparing two services on the basis of some ‘Hello World’ experience (or a little beyond) isn’t really representative, though. Real comparison must be done against the reliability and cost-effectiveness of the service. PHPFog and Pagoda Box are providing good services, though they differ in the way they do it. Both have simple-to-use interfaces and can easily deploy and scale applications. So far my experience with both was pleasant and I got quick responses to any issues and queries. Pagoda Box’s choice to use SoftLayer cloud as the infrastructure was interesting for me – we shouldn’t put only AWS in the picture – though for some users it may raise interoperability issues when it comes to scaling options. Still, the question “which one is the best?” depends on your goals and requirements.