Search code examples
wso2wso2-api-managerapi-manager

WSO2 Publisher/Store api-manager.xml config GatewayEndpoint with gateway clustering


If i have multiple gateway worker nodes, how can i config the GatewayEndpoint?

I read the post of setup gateway endpoint, it that case just has one gateway worker node. I also had nginx node before WSO2 clustering, so we also need to display final endpoint URL in store to end users. for ServerURL, i can config it as url: "https://mgt.gw.devzone.com/services/" .

<APIGateway>
   <Environments>
       <Environment type="hybrid" api-console="true">
            <Name>Production and Sandbox</Name>
            <Description>This is a hybrid gateway that handles both production and sandbox token traffic.</Description>          
            <ServerURL>https://<API-Gateway-Host>:9443/services/</ServerURL>
            <Username>${admin.username}</Username>
            <Password>${admin.password}</Password>          
            <GatewayEndpoint>http://<API-Gateway-Host>:8280,https://<API-Gateway-Host>:8243</GatewayEndpoint>
       </Environment>
   </Environments>
</APIGateway>

Solution

  • Yes for the ServerURL you should point to the GW Manager node. When specifying the GW worker URLs you need to point to NginX. The GatewayEndpoint you are including here should resolve to NginX and NginX will loadbalance the request between the worker nodes. The URL you add here will be shown in the API Store.