1

Is it possible to stop the cron on the main web server and run it on another web server that is using the same codebase, same MySQL server and same Memcache sever?

The cron web server will run import and other heavy operations that Drupal is doing during Cron.

Is anyone doing this? Also some tips for the implementation of the shared codebase(performance wise) would help.

1

This would be very easy to do by either running a run cron job or a jenkins job on the server/node you want to run drupal cron on. This is very common practice in all of our projects.

If you are doing a large data import on cron, be sure you are using cron queue. http://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_cron_queue_info/7

| improve this answer | |
0

What I can advise you its to use two same servers, a frontend and a backend. In the backend where you will run the Cron you don't need to install caching stuff like Varnish or Memcache, as it's only to run your cron.

You should also create a circular replication between your frontend and backend server, like frontend server has backend slave and backend has frontend as slave. Like that, your heavy cron will not impact so much the frontend.

The both code base should be the same, even if the backend is not used for public, so its better to use Git or versioning system to keep it updated.

Finally, I suggest you to give a look to this module to improve your cron system.

| improve this answer | |
  • you're right. varnish has no use in that case. wouldn't performance of the cron be improved by using memcached however? – vladady Mar 16 '12 at 11:00
  • No one, as running the cron clear all caches every time. – yvan Mar 16 '12 at 11:46
  • Wouldn't not clearing the cache cause the cache to fill up with old data? – vladady Mar 16 '12 at 12:43
  • Its possible yes, that why you should use the module I mentioned instead of Drupal cron. Also, your Drupal cache needs expire time, like 5 minutes. – yvan Mar 16 '12 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.