Tagged: high load
September 16, 2015 at 1:47 am #370373
We have a site which is totally cached with Varnish and similar to have high performance for a high number of concurrent users on a single server. When using the popular widget on a page with quite high load, it’s the only request being a HTTP POST and reading/writing to the database, for every single user.
Is there any option to move the view database to a memory abstraction layer like memcached or similar, or even a Redis to unload database writes and traffic?
AndySeptember 21, 2015 at 9:17 pm #373267Xpark MediaKeymaster
The plugin it is Query heavy, specially if you are tracking pageviews instead of visits. It uses post request to accurate register the views.
There is a database cache plugin that my help you but your pageviews/visits will not be accurate. You could also use a hook to change the request and the database write. If you already using memecache you will have to change the request method also.November 26, 2015 at 7:42 am #446765
perfect, thanks a lot. I will check the hooks and maybe write it to memcached/redis, and then import into the DB by CronJob, might be the best idea.
Visits Tracking is not possible (only page views) as we do have caching in place without cookies, and I assume the visits are based on user identification/cookies.
AndyNovember 30, 2015 at 1:05 am #449466
But, just another question. There is no method to exchange the update function at all, correct? I just found the filters “pop_set_post_view” to turn counting on/off, and the before_ and after_ functions, but nothing to really change the update function to write to memcached or redis or similar?
Or did I miss something?December 13, 2015 at 8:51 pm #462943Xpark MediaKeymaster
Using ‘pop_set_post_view’ and returning false turns off the function. But before returning false you can run any function that process the views.December 29, 2015 at 6:12 am #473380
Thanks, I think this will solve my issue so I will write a wrapper with memcached/redis and update the database by WP Cron.
- You must be logged in to reply to this topic.