jwdenzel Posted May 10, 2021 Posted May 10, 2021 I understand that Memcache will be depreciated in IPS 4.6. But what methods of caching are going to be available instead? From what I understand, only redis caching is available now. But you can't use redis with a MySQL database. I have Cloudflare... will that be enough? Advice?
The Old Man Posted May 11, 2021 Posted May 11, 2021 Hi, Good news! You can definitely use Redis for caching and it works well with MySQL or MariaDB. It's a separate entity, and you can configure IPS to use it for various tasks. NadimD 1
Thomas P Posted May 11, 2021 Posted May 11, 2021 (edited) 13 hours ago, jwdenzel said: From what I understand, only redis caching is available now. But you can't use redis with a MySQL database. Give Redis a try, works fine and requires little maintenance. Installation is easy on all major Linux distros. Setup is easy, too. What do you mean by it won't work with MySQL. Redis is a separate caching/key storage instance, which is being used by your Invision Community software. Instead of saving caching information to MySQL or to a Memcache daemon it is being sent to your Redis server instance. This will take load off the MySQL Server... Edited May 11, 2021 by Thomas P
jwdenzel Posted May 17, 2021 Author Posted May 17, 2021 On 5/11/2021 at 2:43 AM, Thomas P said: What do you mean by it won't work with MySQL. Redis is a separate caching/key storage instance, which is being used by your Invision Community software. Instead of saving caching information to MySQL or to a Memcache daemon it is being sent to your Redis server instance. This will take load off the MySQL Server... Thanks for this info. I misinterpreted the "Advanced Configurations / Data Caching" page and thought that I could not use Redis with MySQL. But I see that's incorrect. I have a dedicated server running MySQL for my website. It's got some good horsepower behind it. Does it makes sense to install Redis on that mysql server? Would I gain any advantage from that even though they are on the same box? Thanks! Thomas P 1
jwdenzel Posted June 15, 2021 Author Posted June 15, 2021 On 5/17/2021 at 4:58 PM, jwdenzel said: I have a dedicated server running MySQL for my website. It's got some good horsepower behind it. Does it makes sense to install Redis on that mysql server? Would I gain any advantage from that even though they are on the same box? @Thomas P: Apologies for the tag, but you replied earlier. Any thoughts on my question quoted here? I have 2 physical servers: an Apache server and a separate MySQL database server. Based on that configuration, where should I install redis for caching? Should I place it onto my Apache server so it offloads the MySQL machine? (Interestingly, the MySQL server is totally dedicated as a db server. I think the Apache server has more load on it) Thanks in advance.
Thomas P Posted June 16, 2021 Posted June 16, 2021 @jwdenzel I don't have a distributed setup atm, we once had webserver and mysql separately where memcached lived on the webserver. Currently we use Webserver, MySQL (i.e. MariaDB) and Redis on the same (powerful) machine, which works really great. If your MySQL has a lot to handle offloading the queries to the webserver using Redis on the Apache host would be effective. But it depends on your setup and your load during peak times. So my recommendation is: Try both variants and do some measurement on the box to monitor CPU, RAM, Swap and response times etc. when Redis is installed and active on your Apache host for a while (e.g. one week) and on a second try when it is active on your MySQL host in the following week. Btw. it is common as well to use Redis on the MySQL host as a front-end database between an application and the MySQL DB. If you want to offload even more and you don't use it yet: Think about using elasticsearch, it removes a lot of data (i.e. search index) from the MySQL DB and search queries run a lot faster and more accurate. jwdenzel 1
jwdenzel Posted June 16, 2021 Author Posted June 16, 2021 @Thomas P: Thanks for this advice. I'll try it out with redis on the Apache server first and see what happens. Thomas P 1
jwdenzel Posted June 18, 2021 Author Posted June 18, 2021 (edited) I upgraded to 4.6 and disabled all server-side caching. Result: the website is incredibly faster. Like, not even kidding you, 50x faster. Memcache must not have been set up wrong. The site is blazing fast now. (I use Cloudflare for CDN caching, but even with that disabled, it's fast) So will will forego using redis for right now, but I'll implement it in the future if necessary. Thanks for all the advice. Edited June 18, 2021 by jwdenzel
Terry Ellison Posted October 22, 2021 Posted October 22, 2021 On 5/11/2021 at 10:43 AM, Thomas P said: What do you mean by it won't work with MySQL. Redis is a separate caching/key storage instance, which is being used by your Invision Community software. Instead of saving caching information to MySQL or to a Memcache daemon it is being sent to your Redis server instance. This will take load off the MySQL Server... We currently use MSQL + memcache, but I am currently doing a test upgrade to v4.6.7. I would be happy to switch to MySQL + Redis cache. However, in this version of the ACP > Advanced configuration > Data Storage page, in that the qualifying paras and interlock are now quite explicit: it's an either / or: MySQL + no caching or "Enabling Redis will use Redis for storage and caching". This withdrawal of a RAM cache option for MySQL users seems to be a fundamental change to the storage architecture at a minor dor release without being reflected in the current online documentation or raised in release notes. What is the maintainers' position on this?
Recommended Posts