Configure API Portal multi-datacenter deployment

This topic describes how to deploy API Portal in multiple datacenters using the recommended deployment architecture (Multi-datacenter deployment with shared file system).

Configure the database cluster for multiple datacenters

You must configure a relational database management system (RDBMS) to store API Portal data. Use a RDBMS cluster solution that supports connectivity across geographically distributed datacenters.

Note   You must install and configure the database on each database node in both datacenters before installing and configuring API Portal.

The database cluster has the following requirements in a multi-datacenter production environment:

  • The database must be supported by API Portal. For more information on supported databases, see Software requirements.
  • You must have at least three database nodes per datacenter for high availability (HA). Install the database on each node.
  • Choose a unique name for the database cluster.
  • Do not start any of the databases until the database cluster is fully configured.
  • You must synchronize time on all servers.
  • Renaming a datacenter is not possible, so choose names carefully and determine a naming convention for each datacenter and rack. For example:
    • DC1, DC2
    • RACK1, RACK2, RACK3
  • To avoid firewall issues, you must open the RDBMS ports needed to allow bidirectional communication among the database nodes.

For more details on installing and configuring your database, see MySQL documentation or MariaDB documentation.

Configure the shared file storage

You must set up a shared file system between API Portal instances to keep them synchronized. For better performance, it is recommended to have a local shared file system in each datacenter, and sync the shared file systems between datacenters.

Configure API Portal

After setting up the database cluster, install API Portal. For HA, you must have at least two API Portal instances per datacenter.

Install API Portal in multiple datacenters as a software installation

  1. Start installing API Portal on the first node. For more details, see Install API Portal as software installation.
  2. When prompted for database settings, enter the access host of the database cluster located in the same datacenter.
  3. After installation, complete the Post-installation steps.
  4. Repeat the installation steps on the next API Portal node.
  5. When you enter the database settings and are prompted that a database already exists, answer Y, and the installation continues normally.
  6. Repeat the installation steps on the rest of the API Portal nodes.

Install API Portal in multiple datacenters as a virtual appliance

  1. On the first datacenter, create at least two API Portal instances from the virtual appliance image. For more details, see Install API Portal as virtual appliance installation.
  2. After installation, complete the Post-installation steps.
  3. Installation creates the API Portal database schema on the local MySQL server on each virtual appliance. Dump the database schema from one of the local MySQL servers, and import it to the database cluster located in the same datacenter.
  4. Note   You only need to do this once, so you do not have repeat this step when configuring the rest of the instances.
  5. To set database configuration to use the database cluster, on the first API Portal instance, edit the /opt/axway/apiportal/htdoc/configuration.php file, and set the following:
  6. public $host = '<access host of the database cluster>';

    public $user = '<user from the database cluster>’;

    public $password = '<password if set for the user from the database cluster>';

    public $db = '<database name in the database cluster>';

  7. Save the file.
  8. Repeat steps 4 and 5 on the rest of the API Portal instances.
  9. Stop the local MySQL server on each API Portal instance.
  10. Repeat the installation steps for the other datacenters.

Configure load balancers

Configuring the load balancer may vary depending on the load balancer in question. Set up and configure the load balancer as instructed in the documentation of your load balancer.

You must situate the external load balancer to route traffic between the datacenters, and an internal load balancer in each datacenter to route the traffic between the API Portal instances.

Related Links