Jump to content

Featured Replies

Posted

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.  

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.

  • Author
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!

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.

  • Author

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.

On a busy site, a cache time of 1-2 minutes can represent significant savings on database overhead. That seems reasonable.

  • 1 month later...
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.

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.

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.

8 minutes ago, Stuart Silvester said:

We have made some optimizations for 4.6, mainly disabling Redis data being encrypted by default.

Meme Reaction GIF

Recently Browsing 0

  • No registered users viewing this page.