We’ve been running TYPO3 on the cloud since AWS released their API and we’ve recently become Amazon Web Services Partners
. Back then there was less support and training so we had the happy time of working out how to do this from scratch. And we did it.
and I were at T3CON10, the TYPO3 conference there were some talks on hosting TYPO3 in the cloud but not many people had actually done this so the talks were a little academic. We spoke to people in the bar, and decided we would share what we have learnt over the past few years.
This is the first of a few posts which explain how we’ve done this, in low-level nerdy terms. There will be jargon…
So, why bother with the cloud? Simple answer: it solves lots of old problems and presents better ways of dealing with hosting. There is no need these days to think about physical drives or even when you should replace them. Cloud hosting takes the physical problems away from you.
You can achieve greater resilience – far greater than you’d ever be able to afford – at a far lower price. All your hardware can be programmed, so your entire hosting environment can be recreated automatically. This is a rule if you’re in the cloud: automate everything.
Breaking up TYPO3
To scale, you have to split the site into ‘code’, ‘data’ and ‘assets’.
In TYPO3 the code is: index.php, typo3, t3lib, typo3conf and these files can sit on each server independently of all others. if you’re working on EC2, you can either bundle this code up into the image or copy it down to the server via a script.
The second item is ‘data’. This is simply MySQL data (or whichever DB you’re using), and simply needs to be loaded into the database.
The third thing is TYPO3’s achilles heal. ‘typo3temp’, ‘uploads’ and ‘fileadmin’ are problems. Common answers are to use NFS, so the files are shared over multiple machines but actually live on a single machine. (There are better solutions – watch this space for them…)
Having split your site you simply write a script which places the code on each new web server, shoves the data in the database and mounts the NFS drive. Nothing new?.. No, not really. There are some tricks such as DynamicDNS or DNS Zones which are a must if you want your cloud to be self-healing. These allow servers to change their IP addresses without taking down your entire site, something that dedicated hosting doesn’t even have to consider.
For the most part, putting TYPO3 – or any CMS – in the cloud is down to sensible planning and splitting the concerns. While it is true that CMSs have their own bottlenecks, we’ve found that we can put most legacy apps in the cloud.
There are lots of subtle benefits in moving to the cloud, which I’ll cover in another post. Surprisingly, the best benefits are business benefits – even though using this stuff is incredible nerdy fun. If want to know more, talk to us
WRITTEN BY DAN
ON THE 11TH JANUARY 2011
Want to receive our free newsletters and special alerts?
Simply enter your email address and hit enter/return.