This article explains the approach to setup Developer Portal in two data-centers:
- Make sure you install the on-premises Developer portal in both the data-centers. This is required so that all the required software/dependencies are installed correctly.
- Verify the individual developer portals are working fine.
- Make sure you have the nightly database backups in-place. This is useful to make sure you have a copy to rollback to.
- When you want to perform a Multi Data-center Drupal setup, we recommend you use the Active-Passive approach. Only one data-center can be active at a time, second data-center kicks in only when the first data-center is down.
- Load Balancer for the Developer Portal
- Make sure it points to data-center 1 and switches to data-center 2 in case of a failover
- If the HTTP request times out a few times, we can assume the data center is down.
- Postgres replication
- Please refer to this doc on how to setup Postgres replication
- File System synchronization
- Drupal stores user uploaded files on the file system in sites/default/files and sites/default/private directories.
- We have to make sure that these two directories are synchronized between the two data-centers. You can use NFS, GlusterFS, S3, or other type of syncing mechanism to sync
- One way sync from the active DC to the passive DC should be enough for this.
- Cron Job
- Make sure that you setup the cron job in only one of the data-centers
- In this case would be data-center 1
- Reason for this is to ensure only one data-center writes to the DB.
- Settings.php
- The settings.php file in individual data-centers will still hold the database connection to servers in their Data-Centers.
- This eliminates the need for adding an additional load balancer in front of the database servers and having to switch them in case of a failover.