60 PI/s with TYPO3

Transcription

60 PI/s with TYPO3
EXTRACT
Knut Möller
60 PI/s with TYPO3
TYPO3 has established itself for small and medium-sized internet presences. The content
management system is in less demand for large and heavily frequented projects, since
commercial CMSs suggest an excess of security and reliability. This makes the web presence
of the renowned publisher 'Heinrich Bauer Programmzeitschriften' all the more interesting. It
was redesigned by the Hamburg agency 'Hafenkrone' as well as converted to TYPO3 and
migrated by 'Metaways Infosystems GmbH'.
Sophisticated caching-mechanisms are needed to make possible
the tremendous number of hits on tvmovie.de. For one thing, pages that are required frequently are generated and released as
static content. This is because the considerable server capacity
needed for a fully dynamic output from TYPO3 via PHP cannot be
achieved at a reasonable operating cost.
The data comes from many sources, including the editorial office and databases such as kino.de. The amount of data to be
distributed is enormous: the order of magnitude is around 100
tables with as many as five million datasets. MySQL was used as
the database. The processing of the voluminous stock data, which
were even changing throughout the job, was a particular challenge.
The Starting Point
tvmovie.de had been online since 1999, on a technological foundation of Servlets and Jserv. It was a self-developed solution with
a backend strongly resembling phpMyAdmin. From the point of
view of the publisher Heinrich Bauer Programmzeitschriften, the
new conception was to bring greater internal and external flexibility as well as the switch to proven and standardised programming methods and to a contemporary user interface. The backend
was to be better adapted to the presentation of editorial procedures, and performance was to be increased. In addition, existing
database structures had to be adopted while keeping alterations
to a minimum.
The impressive key facts at a glance:
• 14.6 million page impressions and 2.93 million visitors per
month (IVW 03/06)
• Peak demand between 8pm and 8:30pm of up to 60 page
impressions per second.
The positions in the backend are firmly assigned to positions on the page via
TypoScript.
1
TV Movie tips are selected dynamically from the database and can be influenced manually.
Not only did the choice of TYPO3 save the clients from licensing
costs, it also ensured lower costs during the actual implementation. The whole project was completed in only four months at a
price which would merely have covered the licensing costs of
other commercial content management systems.
In addition to the speed of the project and the high flexibility
afforded by special programming and customer-specific expansions, the performance was also increased through optimisation
of caching mechanisms.
The quick and reliable delivery of data, even at peak times with
60 page impressions per second, was ensured by relatively affordable standard hardware (SUN). The environment consists of a
load balancer, two web servers and two database servers.
As for software, stable versions were used: Solaris 10 (on Sun
Opterons), Apache 1.3, PHP 5, MySQL 4.1 and TYPO3 3.8.1. The
functions of TYPO3 were expanded with the help of roughly 150
self-developed modules.
The need for speed: caching mechanisms
One of the biggest concerns at the beginning of the project was
the requisite system performance and the server capacity this in
turn required. A lot can be done with the right hardware, but not
if you are on a tight budget. To achieve a high system capacity
while minimising hardware costs, a multi-layered caching concept
© yeebase 2006. Publication and reproduction only with approval by yeebase GbR. www.t3n-magazin.de
EXTRACT
was developed and applied. In this respect, the project greatly
benefited from the long experience Metaways Infosystems has
had with hosting and server administration. The original estimates
of the server load at peak times were too low. In fact, the actual
number of hits was three times as large as first anticipated; but,
thanks to the sophisticated design, this was not a problem in the
end.
One of the problems with TYPO3 is the time-consuming output of all contents via PHP. To reduce the load, a portion of the
most requested pages is, according to strict rules, not produced
dynamically, but generated statically instead. Indeed PHP itself
was accelerated, in this case with the use of e-Accelerator. Pages
that are requested without POST/GET parameters are generated
once only and thereafter read directly from the cache file. This
minimises the PHP overhead and the burden on the database.
The HTML edition of each individual module is stored in a file
cache. Validity is set in the module itself. In this way, time-consuming database requests can be reduced. Pictures as well as CSS
and flash data are delivered by a squid server in order to take
pressure off the Apache processes. The TYPO3 cache stores the
page reproduction and the output of cacheable elements in a database table.
Good arguments for TYPO3 for 1) The decision maker:
standardised and open solution, good extendability with individual modules, affordability
2) The developer:
good documentation, active development community, widespread experience and satisfaction with the system, complete separation of layout and content
3) The administrator
scalability, system divides (database, editors, web server), applicable to Unix und Windows, applicable to already present
Unix systems
4) Advantages for visitors to tvmovie.de
better EPG (e.g. program guide), clearer navigation/page structure, important information at a glance (e.g. about stars or
detailed news about a film), more visually appealing and clearer
in general, better picture quality, current trailers in the cinema
and DVD domains
5) Advantages for the publisher
contemporary web presence (e.g. layout), flexible placement
of advertising, more advertising places on the page
The editorial system and workflows
Only in Version 4.0 did the capabilities of TYPO3 become stable
enough to execute editorial procedures. For this reason it was decided to administer the exchange of information in an entirely
different way. In fact, there are two environments, one being for
creating or editing pages, the other one is publicly accessible.
Das aktuelle TV-Programm: Rund 150 Plugins wurden programmiert, sie beeinflussen sich gegenseitig.
Thus, changes are implemented and tested on an internal system
before the editorial decision is made to release them into the live
environment. In this way, everything – from the creation of individual pages to a complete update of all files – is possible.
Conclusion
The choice of TYPO3 has led to a very flexible and easily extendable
system. The ongoing maintenance and expansion were secured
by clear modularisation. TYPO3 has given a practical demonstration of its suitability for systems with strong peak demands.
Through the multilayered optimisation, the response times remained quick and the implementation of the system ideal.
The project benefitted from the long experience Metaways has
had with servers, as well as with the implementation of websites
in TYPO3. The project shows that, with the right optimisations,
TYPO3 can be used for heavily-frequented websites. Web presences with individual data from existing databases can be migrated very well indeed via the TYPO3 extension interface.
One of the more than 150 extensions and modules which were
developed for this project will flow back into TYPO3 as free software. 'Imagemap' is an extension of TYPO3 enabling interactive
image domains to be provided with links. The release of further
plugins is planned – to contribute to the improvement of TYPO3,
and to give something back to the development community.
THE AUTHOR
Knut Möller works as a programmer at Metaways Infosystems
GmbH, where he played a significant role in the conversion of
tvmovie.de. He is a contact person and is happy to share information with interested developers, as long as professional discretion
is not violated.
© yeebase 2006. Publication and reproduction only with approval by yeebase GbR. www.t3n-magazin.de
2