magemojo / m2-ce-cron

Magento 2 cron project to fix bugs and common cron issues.
https://magemojo.com
MIT License
165 stars 45 forks source link

Add support for clustered environments #87

Closed JesKingDev closed 2 years ago

JesKingDev commented 4 years ago

The MageMojo m2-ce-cron extension doesn't currently support clustered environments. In my installations, I have implemented a script which ensures that the cron only runs on a single server at any one time. One best practice is to offload admin and cron execution to a dedicated server. However, I would like to spread the load of cron execution across multiple servers for better throughput and to handle situations where certain synchronization crons take a lot of time. Spreading out cron execution across multiple servers would allow for much quicker execution of certain jobs and less potential for frontend impact when crons are resource intensive.

The implementation would need to take into account multiple servers running a cron process and uniquely identify them in some way (local hostname or local IP).

I am happy to provide additional use cases if needed, test a pre-release version, or assist with development.

gnuzealot commented 4 years ago

Interesting use case. Will consider it for a future version, but can see a lot of potential there for job overruns.

JesKingDev commented 3 years ago

@gnuzealot Has this module been tested to work on Magento Commerce Cloud?

gnuzealot commented 2 years ago

Feature merged in 1.4.2 thank you @JesKingDev for the contribution!