Skip to main content

Version: 3.6.x

Synchronize Services between Gateway Groups

Synchronizing published service versions between gateway groups is a helpful part of API version control. For example:

  1. When using gateway groups to isolate environments, such as test and production, you can synchronize a service version from test to production, after all tests are passed.
  2. If you are using gateway groups to separate business segments, such as regions or teams, synchronizing a service can help distribute the service across multiple gateway groups.
note
  • Synchronizing keeps the service version the same between gateway groups, while publishing creates a new service version each time.

Prerequisites

  1. Install API7 Enterprise.
  2. Configure two gateway groups - one for the initial test environment and another as the final destination (e.g., production environment) - each with at least one gateway instance.
  3. Publish a service version in the initial gateway group for test environment.

Sync Single Service to Other Gateway Group

  • Service in "No Version" state can also be synchronized to other gateway groups. After synchronization, both gateway groups will have a same version number for the service.
  • You can only synchronize the currently running service versions, not the older ones.
  1. Select Published Services of your initial gateway group from the side navigation bar, then click the service version you want to synchronize, for example, httpbin with version 1.0.0.
  2. Click the button next to Enable/Disable at the page header, then select Sync to Other Gateway Group.
  3. From the dialog box, do the following:
  • In the Gateway Group field, choose your destination gateway group, for example, Production Group.
  • If the service is in the "No Version" state, enter a version number (e.g., "2.0.0") in the Version field. Otherwise, the existing version number will be automatically copied and cannot be edited.
  • Click Sync.

:::Note

When synchronizing a service for the first time, configure the necessary service runtime configurations and enable the service to activate your APIs. For subsequent synchronization and publications, the service status and runtime configurations will be inherited from the previous version.

:::

Configure Service Runtime Configurations

  1. After synchronization, you will be redirected to the published service httpbin 1.0.0 on the Production Group.
  2. Select the Upstreams from the side navigation bar.
  3. Click Add Node.
  4. From the Add Node dialog box, do the following:
  • In the Host field, enter httpbin.org.
  • In the Port field, enter 80.
  • In the Weight field, enter 100.
  • Click Add.
  1. Click Enable from the top header of the published service and confirm.

Validate the APIs in Production Group

Send a request to validate the API:

# Replace with your production group address.
curl "http://127.0.0.1:9080/ip"

You should see the following response:

{
"origin": "127.0.0.1"
}

Additional Resources


API7.ai Logo

The digital world is connected by APIs,
API7.ai exists to make APIs more efficient, reliable, and secure.

Product

API7 Gateway

SOC2 Type IIISO 27001HIPAAGDPRRed Herring

Copyright © APISEVEN PTE. LTD 2019 – 2025. Apache, Apache APISIX, APISIX, and associated open source project names are trademarks of the

Apache Software Foundation