|
Joomla! Is often used for small business websites because it is easy and quick to set up, customize, and for the clients to learn. What is less known is that it can also quite happily support much larger business websites such as those designed and maintained by Valegro: StartUpSmart, SmartCompany, Property Observer, and The Power Index.
One of the first hurdles that a website needs to overcome when it starts to attract significant traffic is how to scale the infrastructure. Up-scaling is often an initial answer, but once the server is running at maximum specs, or perhaps even before this, out-scaling to a cluster of servers is the best way to achieve more power for the sites.
Joomla! however does not handle multiple servers without a bit of tweaking. It relies on a single database in order to correctly handle user sessions, even when the configuration might suggest this can be done using disk instead or when users are not logged in. Certain components also require a single database for read/write and of course a Master database must be defined so all writes go to a single point which is then replicated across other databases.
Using the excellent HyperDB for Wordpress as inspiration we set about creating a database class which would cycle through an array of databases and use the appropriate one for each task; taking into consideration the type of SQL statement, the component it refers to, the response time and availability of the server, and the server’s known performance limitations. The result is a variation on the Joomla! MySQli class we call HyperMySQLi; which allows both manual and automated balancing across a number of servers, and customization to perform to the maximum capacity possible across a number of different Joomla! And infrastructure configurations.
Additionally, we added support for Memcached to allow individual query caching for an even greater performance boost; and overcame issues with Joomla! Legacy mode which imposed restrictions on the type of database classes you could use. The result, is a collection of sites which we have running with database load-balancing, complete redundancy, and the potential for easy out-scaling whenever required.
Please Contact Us if you want to learn more! |