Fast Lane! Posted December 22, 2020 Share Posted December 22, 2020 It sounds like "sessions and topic view counters" are stored in Redis, however my question is if these are periodically copied back to the database? What frequency if so. Asking because inevitably services and even servers get reset. Storing in memory forever seems unlikely. sobrenome, MEVi and Jordan Miller 3 Link to comment Share on other sites More sharing options...
Ryan Ashbrook Posted December 22, 2020 Share Posted December 22, 2020 They are not. In the case of sessions - those are always temporary even when using the database, so them being "lost" is not an issue. If the user associated with the session has opted to have their login remembered, then it will just create a new one. Otherwise, they would just need to login again. For views - a task runs through these and updates content items view counts accordingly. If these are lost for some reason before they are applied by the task, then they will not be processed. Jordan Miller and sobrenome 2 Link to comment Share on other sites More sharing options...
Fast Lane! Posted December 22, 2020 Author Share Posted December 22, 2020 8 minutes ago, Ryan Ashbrook said: They are not. In the case of sessions - those are always temporary even when using the database, so them being "lost" is not an issue. If the user associated with the session has opted to have their login remembered, then it will just create a new one. Otherwise, they would just need to login again. For views - a task runs through these and updates content items view counts accordingly. If these are lost for some reason before they are applied by the task, then they will not be processed. Cool ok. Do you know how often that task runs so topic views on the forums reflect the most recent values? Out of curiosity is this a big mysql load savings? Thanks! sobrenome 1 Link to comment Share on other sites More sharing options...
Ryan Ashbrook Posted December 22, 2020 Share Posted December 22, 2020 Every 5 minutes. And yes, it can be beneficial particularly for sites with a lot of simultaneous traffic as it'll offload all session handling from the database. Combined with guest page caching, it's entirely possible to serve a page to guests entirely from Redis and never touch the database. sobrenome 1 Link to comment Share on other sites More sharing options...
Fast Lane! Posted December 23, 2020 Author Share Posted December 23, 2020 Do you have any experience on what a good cache time would be for guests on a busy site? I was thinking 1-2 minutes to keep things fresh but curious on your experience. sobrenome 1 Link to comment Share on other sites More sharing options...
bfarber Posted December 23, 2020 Share Posted December 23, 2020 On a busy site, a cache time of 1-2 minutes can represent significant savings on database overhead. That seems reasonable. Fast Lane! and sobrenome 1 1 Link to comment Share on other sites More sharing options...
sobrenome Posted January 27, 2021 Share Posted January 27, 2021 On 12/22/2020 at 6:47 PM, Ryan Ashbrook said: Every 5 minutes. And yes, it can be beneficial particularly for sites with a lot of simultaneous traffic as it'll offload all session handling from the database. Combined with guest page caching, it's entirely possible to serve a page to guests entirely from Redis and never touch the database. IPS is ultrafast for guests when using redis. A logged user browsing experiencie is clearly much slower. Link to comment Share on other sites More sharing options...
CoffeeCake Posted January 27, 2021 Share Posted January 27, 2021 We turned off "Redis to reduce MySQL overhead" in our testing 4.5 and before upgrading from 4.4. It was significantly slower when logged in. Maybe we have something not optimized correctly. We did not have that issue with memcached, which is what we were using in 4.4. sobrenome 1 Link to comment Share on other sites More sharing options...
Stuart Silvester Posted January 27, 2021 Share Posted January 27, 2021 3 hours ago, Paul E. said: We turned off "Redis to reduce MySQL overhead" in our testing 4.5 and before upgrading from 4.4. It was significantly slower when logged in. Maybe we have something not optimized correctly. We did not have that issue with memcached, which is what we were using in 4.4. We have made some optimizations for 4.6, mainly disabling Redis data being encrypted by default. MEVi, SUBRTX and sobrenome 2 1 Link to comment Share on other sites More sharing options...
CoffeeCake Posted January 27, 2021 Share Posted January 27, 2021 8 minutes ago, Stuart Silvester said: We have made some optimizations for 4.6, mainly disabling Redis data being encrypted by default. sobrenome 1 Link to comment Share on other sites More sharing options...
Recommended Posts