How to run timers in specific front-ends?

How to run timers in specific front-ends?

  
Hi everyone,
 
A question that sometimes pops up from our OutSystems Platform's users is "How can I make my timers run only in specific front-ends?".
 
The rationale behind this question is that, in a lot of infrastructure setups, different front-ends have different configurations and computational resources (CPU, RAM, etc.). 
Some timers may perform highly demanding operations and we want to make sure that they are run in a machine that is capable of handling the timer's processing with good performance and without affecting the front-end's ability to process web requests.
 
Some users are unaware that they can simply configure some of the front-ends to not run timers at all.
Just enter Service Center through a browser, access the "Administration" tab and then the "Front-end Servers" sub-tab. You will see a list of your configured front-end servers / deployment controller server. Enter each one and you will see the "Execute Timers" check-box that you can change:
 
 
If you disable the check-box and press "Save", this specific front-end will not process timers. 
 
You will also notice that there is an "Execute Processes" check-box. Processes may also perform asynchronous processing that is highly demanding and sometimes you just want them to run in a specific server. You can also segment which front-end servers will run processes through this option.
 
Now, let's say that you do not want to segregate timer processing only to some front-ends. Instead, there is a timer or two that you know are particularly CPU-intensive and should run in a specific front-end (maybe you have several timers that conduct small operations and one or two that are more complex).
For these scenarios, you have the following options:
 
  1. Use Zones: by using the Zones feature in Service Center, you can specify that an eSpace is available on a specific zone and, in consequence, in the set of front-ends configured in the zone.
    You can build the heavy-load timers in a small eSpace just for that purpose and set him to be active only in one zone. This will make the timers only run in the front-ends configured in that zone.
     
  2. Web Services: if for some reason you do not want to use zones (e.g. you want the timer eSpace to be available in all front-ends), another option is to include the logic of the timer in a web service of your eSpace. The timer itself consumes the web service through a web reference, with its URL set to a specific front-end. This enables you to run the timer from any front-end but the heavy-load processing is always conducted in the front-end you specified in the web reference. Just make sure that you appropriately set the web reference's call timeout values to something appropriate, if the processing requires some time to finish.
 
I hope this helps!
 
Cheers,
João Proença
 
Hi,

Is there any API (or other supported method) that would allow us to enable/disable the execution of Timers and Processes on a specific server?

Currently we have a farm with one server fully dedicated to these asynchronous tasks, and we would like to automate the server restart process, by switching (via script) this services from this server to another one in an automated way.

Thanks,
Miguel Gonçalves
Hi Miguel,

I believe there isn't an API for enabling / disabling the execution of timers and processes in front-ends.

Check in our Ideas forum ( https://www.outsystems.com/ideas/ ) if there are more people looking for this feature, or you can even propose it yourself!

Cheers!