in reply to Re: Daemonizing (or otherwise speeding up) a high-overhead script?
in thread Daemonizing (or otherwise speeding up) a high-overhead script?

I'm not a huge fan of running periodic tasks through the public-facing app, but it works. One of the problems would be if the public hit the app with so many requests that there weren't available workers to serve the cron jobs. Another problem is the potential for hackers who found your source code to issue bogus cron tasks from the public.

An easy solution is to run another copy of the Catalyst app (or even a second Catalyst app entirely) for handling cron tasks, and not expose it to the public. This also lets you restart them independently, knowing whether you're disrupting the users or crashing a long-running cron task.

  • Comment on Re^2: Daemonizing (or otherwise speeding up) a high-overhead script?

Replies are listed 'Best First'.
Re^3: Daemonizing (or otherwise speeding up) a high-overhead script?
by Anonymous Monk on Aug 28, 2023 at 11:52 UTC
    I appreciate your concerns. But it's not a public-facing app; it's purely internal, and it only responds to requests that are from the internal network, and have some appropriate API key for the relevant task. We monitor this pretty closely. It can, of course, still happen that we get more requests than we expect, but we have a fair amount of cushioning built into the system.