Replacating some tables to slaves

Discussion in 'Developers' Forum' started by branov, Apr 2, 2020.

  1. branov

    branov Member

    Hey, I wonder why is table "client" replicating to the slave servers? Is there way how to prevent it? I do not feel very comfortable when I see our clients details distributed among all slaves servers.

    Thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If I remember correctly, it is somewhere used in the apache or Nginx plugin, or at least it was used in there in the past. If it is still sued there or in another server plugin (to be researched) then one option might be to remove sensitive data or all data not required on the slave servers in datalogSave function of the MySQL lib in ISPConfig.
     
  3. branov

    branov Member

    Thanks, I'm gonna research it among server plugins.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    One other possible part where it might get used are the cron plugins, some of thems end email notifications, e.g. for quota. It might be that the client's email address is queried there.
     
  5. branov

    branov Member

    Maybe would be better to give slaves permission to access client table and required columns on master, instead of replicating the whole table to all slaves?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Database access from slave to master will get completely removed in future and slave server should be fully self-dependent and should always be able to work when master is offline, so giving access to master database is not an option.
     
  7. branov

    branov Member

    Oh, sure. OK, in that case, should be the solution to limit what is replicated from master to slave regarding to client table. I did som research:

    Code:
    300-quota-notify - client.email
    shelluser_base_plugin - client.ssh_rsa
    shelluser_jailkit_plugin - client.ssh_rsa
    nginx_plugin - client.username
    apache2_plugin - client.username
    
    So, my guess is that limiting what is replicated to slaves is a good idea how to solve this.
     
    till likes this.
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so we should limit the replication to the sys_* columns, client_id column plus the ones you mentioned in your post.
     
  9. branov

    branov Member

    OK, great. Thank you.
     

Share This Page