salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.35k stars 2.05k forks source link

Heartbeat for SuiteCRM #8034

Open Abuelodelanada opened 4 years ago

Abuelodelanada commented 4 years ago

Issue

When having a big SuiteCRM instance deployed in many application nodes it is necessary a load balancer (Like HAProxy or Nginx) before que WebServers.

SuiteCRM does not have a way to inform a load balancer (or any external system) if an instance it's "healthy."

Expected Behavior

Would be great to have a heartbeat in SuiteCRM that could inform the load balncer if the SuiteCRM instance is "healthy".

Obviously we should define what "SuiteCRM instance is healthy" means. But at least we can say that a SuiteCRM instance is "healthy" if:

  1. A config.php file exists.
  2. If config_override.php exists, SuiteCRM should have write access to this file
  3. SuiteCRM should have write access to cache_dir
  4. SuiteCRM should have write access to log_dir
  5. SuiteCRM should be able to connect to the database

Actual Behavior

SuiteCRM does not have a heartbeat.

Possible Fix

Write a heartbeat (As much separated from SuiteCRM as possible)

Your Environment

lazka commented 4 years ago

I've locally created a dummy empty no-auth entry point for this. So :+1:

Abuelodelanada commented 4 years ago

Hi @lazka

Yes, I have done something similar. Sometimes I think the heartbeat have to be as isolated from the application as possible, but for this we will have to write may pieces of extra code. Maybe we can find a midpoint.