简体   繁体   中英

Scaling for TYPO3 site

I'm asked by a customer to deliver a TYPO3 based website with the following parameters: - small amount of content (about 50 pages) - very little change frequency - average availabilty about 95%/day - 20% of pages are restricted, only available after login - No requirements for fancy typo3 extensions or something else (only Typo3 core) - Medium sized pages - Only limited digital assets (images etc.) included

I have the requirements to build an infrastructure to serve up to 1000 concurrent users. With the assumption of having an average think time of 30 sec. this would result in 33 Requests per second.

How could an infrastructure look like?

I know that system scaling is a highly individual task depending on the implementation of the system and needs testing, but I need a first indication where to start (single server, separating components to different servers,...).

Any idea?

Easier solution is EXT:nc_staticfilecache . This saves the static pages as HTML and your web server automatically delivers them through rewrite rules (in case of Apache through mod_rewrite). This works very well for static content and should already enable you to do >100req/s.

The even more fancier way is to use Varnish Cache . Varnish is a reverse proxy server that holds your web site content in memory and can run on a dedicated host. If you configure it correctly (send correct cache headers!), it serves you line speed (some million req/s). There is also a TYPO3 Extension moc_varnish , which eg purges the varnish cache, when a page is changed in TYPO3. Also support for edge side includes exists to eg only retrieve the user-specific data from TYPO3 and use the static parts of a page from varnish cache (everything except the " Welcome user Foo Bar ".. ;)).

As mentioned: Don't forget to configure correct cache headers (Expires etc) for your assets. This already removes some load from your web server.

It's quite possible, already made something like this. You need at least one dedicated server with >= 8GB of RAM.

If we are speaking about infrastructure, the minimal combination is :

  • nginx/Varnish for front/load balancing
  • Apache HTTP Server
  • MySQL could be on standalone server, could be clustered

Performance optimization is very important in such cases.

Some links for further reading :

I'd put this on a single dedicated server (or well specified VPS) but maybe keep all the static assets on a third party CDN so you can focus on the dynamic stuff. I don't know Typo3 but can't see any reason why you couldn't have your db on the same server for this level of usage - there is sure to be caching options of various kinds. Or perhaps consider a cloud server, so if you need more oomph, just add more resources.

Edit: I don't think it is a good idea to build a scalable architecture just yet eg proxy servers and all that stuff. If it is slow and you find you really can't cope with one machine, scale up at that point. I'm of the view you can make do with a much simpler architecture given your expected traffic.

I would look into a virtual sserver or a ksm and a good mysql and php configuration. When I have a ksm I would tweak Linux and use iptables for traffic shaping. A dedicated root server would be nice but it's expensive. Then I would think about using a nginx or lighttpd webserver with eaccellerator and memcache. If that doesn't help I would try to compile php and mysql with optimize flags or I would try to compile it with the Intel C Compiler. ICC can optimize C code better then gcc. If the server has many ram I would use ramdisk.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM