9

I've got a mysql server with in North America (using Amazon RDS) and a read replica. I've also got a read replica for a new region - Australia.

The Australian server is brutally slow due to the dynamic nature of Joomla reading off the main DB server in N.America. I've tried to use mysql proxy for this to split the read/write but that isn't a long term solution. Mysql proxy looks to be effectively dead.

What other options do I have?

2

Joomla (and other similar CMSs) have been developed for a LAMP architecture, with the common hosting in mind. E.g. Low latency between Web server and Database.

Amazon RDS is designed to scale a relational database in the cloud. So, as regional distribution and redundancy are important, higher lantencies are expected.

If your have specific requirements asking for Amazon RDS, you can configure:

  • Joomla with a local MySQL for site general management (static assets, easy to replicate)
  • Amazon RDS connection, an application-specific connection for your development

Third-party extensions, developed with low-latency in mind, are not going to work with Amazon RDS.

  • Not sure I understand your two points? I will continue to use RDS, so are you suggesting a Master RDS in Australia? Also I can certain y leverage an RDS connection with the read replica with my custom components but not with Joomla core. So not sure what you mean by an application-specific connection. Can you please elaborate? – Tom May 12 '14 at 3:20
2

If your using a decently recent version of PHP then you probably are using the php mysqlnd driver. http://us3.php.net/manual/en/book.mysqlnd.php

Mysqlnd has a custom plugin API and can function in the same manner is mysql proxy - for example http://pecl.php.net/package/mysqlnd_ms is a plugin which splits reads and writes and had a recent official release 9/2013

Also keep in mind, Joomla always writes to the session table. Using memcache or apc just stores the session data in the cache - not the session metadata.

You can get the same performance boost by dropping your #_sessions table and recreate it using the Memory data engine instead of innodb or myisam.

1

Every page generated by Joomla will need to write to session table.

So I would suggest to use memcache or apc for session management. That should help you achieve zero-write to database, hence read-replica will be sufficient for most of the pages.

  • That is an excellent point. That will help with the writes but what is really important is how do I use the read-replica for Joomla's core? Right now I only see mysql proxy or hacking the core as options. I suppose HAproxy is also an option but that is not as clear. – Tom May 12 '14 at 12:36
  • 1. AWS itself support the replication (aws.amazon.com/rds/faqs/#replication) 2. Other option is mysql built-in replication – Shyam May 12 '14 at 13:57
  • I think you are misunderstanding. I'm already using replication with RDS. My question is how can I split the Joomla read operations to that read replica. – Tom May 12 '14 at 15:11
0

Another speed improvement option would be to put Nginx in front of it as a reverse proxy. This would reduce a lot of database access as the common pages would never go to joomla and mysql Cant find the proxy config but these are the base setup

http://docs.joomla.org/Nginx

http://www.nginxtips.com/nginx-joomla-friendly-url/

https://stackoverflow.com/questions/23960359/how-to-get-nginx-proxy-caching-to-work-with-dynamic-content

https://stackoverflow.com/a/2655023/6096

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.