Fast Lane! Posted December 22, 2020 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. Jordan Miller, sobrenome and MEVi 3
Ryan Ashbrook Posted December 22, 2020 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. sobrenome and Jordan Miller 2
Fast Lane! Posted December 22, 2020 Author 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
Ryan Ashbrook Posted December 22, 2020 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
Fast Lane! Posted December 23, 2020 Author 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
bfarber Posted December 23, 2020 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. sobrenome and Fast Lane! 1 1
sobrenome Posted January 27, 2021 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.
CoffeeCake Posted January 27, 2021 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
Stuart Silvester Posted January 27, 2021 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. sobrenome, MEVi and SUBRTX 2 1
CoffeeCake Posted January 27, 2021 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
Recommended Posts