[TYPO3-performance] Scaling TYPO3 horizontally

lene preuss regnans at gmail.com
Tue Jul 2 17:22:08 CEST 2013


I cannot give you details for all the stages in our delivery scenario,
because they are handled by the UNIX admins, but roughly our system is
like this.

Frontend delivery is handled by a Varnish cache. Can't tell you about
how SSL is handled, sorry. I know it *is* handled, though.

The pages are assembled with XSLT from various XML files.The XML files
are stored statically. We have developed our own system to render these,
because every change on a record in the BE can trigger changes in
several FE pages, and none of the pre-existing solutions was able to
handle this.

Because we use static files that are updated with every change, we don't
need multiple FE servers.

PHP runs on Apache/mod_php with eaccelerator. We recently tried APC, but
it crashed. Because switching to APC was not a priority, we did not
investigate it further.

MySQL is set up as a master for writes and a single slave for reads (we
are currently investigating the use of multiple slaves, but that does
not really seem necessary right now). I wrote a simple patch to
class.t3lib_db.php in the FE that sends the write requests to the master
and the reads to the slave(s). (I'm sure this could be done more
cleanly, but I was in a hurry back then and it works well until now, so
I never had a motivation to do this right. Priorities! :-))

The BE accesses only the master. The master/slave configuration was used
initially only to enhance performance in the BE, but with an increasing
number of editors and an increasing number of searches from the FE,
which are not cached statically, it proved valuable for FE performance too.

We recently started using memcached as backend for the caching framework
which halved the load on the MySQL slave. Cache eviction has not been a
problem for us (yet *ehem*).

One issue we ran into when separating the BE from the FE was that
entries in typo3temp were not synchronous in the FE which led to missing
images in some TYPO3 CEs (IIRC, FCEs had this problem). We solved that
by exporting typo3temp as NFS volume from the FE and mounting it in the
BE. For other images, we added a save hook that executed an rsync from
the BE's uploads folder to the FE's.

HTH,

Lene

On 28.06.2013 22:17, Ernesto Baschny [cron IT] wrote:
> Hi,
>
> I've got some questions for the "performance-freaks" amongst us.
>
> What techniques are you using for scaling TYPO3 in a "Cloudy" scenario
> (or in a scenario where you need horizontal scaling)?
>
> Using some Load-Balancer in front of multiple frontend servers? Which?
> Varnish? Nginx? Pound?
>
> If only Varnish, how are you handling SSL?
>
> Where is your PHP running? Apache with mod_php? Nginx with FastCGI?
> PHP-FPM with either Apache or Nginx? Or some other method?
>
> What PHP opcode cache are you using? APC? Zend? eAccelerator?
>
> How are you synchronizing the file storage amongst the multiple frontend
> webservers (typo3temp, fileadmin, ...)? NFS? DRBD with OCFS2 or GFS2?
> rsync "from time to time"? iSCSI
>
> How are you scaling MySQL? Master and multiple slaves? How are you
> ensuring TYPO3 writes only to the Master and reads from "some" slave?
> MySQL-Proxy? Some TYPO3 Extension?
>
> Where are you letting TYPO3 cache your data? Redis? Memcache?
> File-Based? A mix?
>
> If you are using Redis, how are you scaling this? Also Master-slave's?
> Sharding?
>
> Are you separating the editors (Backend) on a separate frontend server?
> Are they working on the "live database" or on some copy? If on some copy
> of it, how are you synchronizing it to the live server(s)?
>
> Well, many questions, but I expect many interesting answers. :) Maybe
> this could serve as a base for some documentation on this topic in future...
>
> Kind regards,
> Ernesto
> _______________________________________________
> TYPO3-performance mailing list
> TYPO3-performance at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-performance
>


-- 
Lene Preuss
Freelance Software Developer
+49 30 40 30 10 90
+49 177 2262 484
lene.preuss at gmx.net



More information about the TYPO3-performance mailing list